feat(ui): рестайл общих компонентов под дизайн-систему
- StationCard: обложка/иконка-заглушка, анимированное сердечко, pressScale - MiniPlayer: elevated-бар, метка «СЕЙЧАС ИГРАЕТ», Crossfade play/pause - SearchBar: surface-поле, акцентный курсор, скругление 14 - FilterChips: акцентный активный чип с анимацией цвета - EmptyState: иконка-плашка + текст - TrackListItem: thumb-заглушка, pressScale
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
package com.radiola.ui.components
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextField
|
||||
import androidx.compose.material3.TextFieldDefaults
|
||||
@@ -14,6 +12,7 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.composables.icons.lucide.Lucide
|
||||
import com.composables.icons.lucide.Search
|
||||
import com.radiola.ui.theme.RadiolaTheme
|
||||
|
||||
@Composable
|
||||
fun SearchBar(
|
||||
@@ -22,22 +21,23 @@ fun SearchBar(
|
||||
placeholder: String = "Поиск станции...",
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
val colors = RadiolaTheme.colors
|
||||
TextField(
|
||||
value = query,
|
||||
onValueChange = onQueryChange,
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
.background(Color(0xFF2A2A2A), RoundedCornerShape(8.dp)),
|
||||
placeholder = { Text(placeholder, color = Color(0xFF888888)) },
|
||||
leadingIcon = { Icon(Lucide.Search, contentDescription = null, tint = Color(0xFF888888)) },
|
||||
modifier = modifier.fillMaxWidth(),
|
||||
shape = RoundedCornerShape(14.dp),
|
||||
placeholder = { Text(placeholder, color = colors.textMuted) },
|
||||
leadingIcon = { Icon(Lucide.Search, contentDescription = null, tint = colors.textMuted) },
|
||||
singleLine = true,
|
||||
colors = TextFieldDefaults.colors(
|
||||
focusedContainerColor = Color(0xFF2A2A2A),
|
||||
unfocusedContainerColor = Color(0xFF2A2A2A),
|
||||
focusedContainerColor = colors.surface,
|
||||
unfocusedContainerColor = colors.surface,
|
||||
focusedIndicatorColor = Color.Transparent,
|
||||
unfocusedIndicatorColor = Color.Transparent,
|
||||
focusedTextColor = Color.White,
|
||||
unfocusedTextColor = Color.White
|
||||
cursorColor = colors.accent,
|
||||
focusedTextColor = colors.textPrimary,
|
||||
unfocusedTextColor = colors.textPrimary
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user