Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c2f42dd
Agregada la clase FeatureLaunchScreenPreview a la carpeta preview
AlejandroHZ858 May 1, 2025
bd1d2bb
archivos de carpeta screens
AlejandroHZ858 May 2, 2025
710dd6a
archivos de carpeta screens
AlejandroHZ858 May 2, 2025
5578955
archivos de carpeta previews
AlejandroHZ858 May 2, 2025
2090b4b
pantalla home boton
AlejandroHZ858 May 2, 2025
7a05cdc
imagen home
AlexandraOrtizV May 2, 2025
026eae0
actualizacion
AlejandroHZ858 May 2, 2025
79cec91
Merge branch 'UI_Preview' of https://github.com/eddn-dev/TibiBalanceA…
AlejandroHZ858 May 2, 2025
b0455c3
ultima actualizacion
AlejandroHZ858 May 2, 2025
8e464cf
pantalla home lista
AlejandroHZ858 May 2, 2025
95a2658
FeatureHomeScreen
AlejandroHZ858 May 2, 2025
b966952
primer avance recuperar contraseña
AlexandraOrtizV May 2, 2025
5b3430f
Cambios del Equipo UI Compose
AlexandraOrtizV May 2, 2025
fb0c74e
imagenprueba
AlexandraOrtizV May 2, 2025
94a8e24
Feature Forgot Password
AlexandraOrtizV May 2, 2025
7f2c983
Edit Profile Feature
AlexandraOrtizV May 2, 2025
07b1b3a
Más cambios del equipo UI Compose
AlexandraOrtizV May 2, 2025
93b921f
Cambios para que corran los campos de UI Compose
AlexandraOrtizV May 2, 2025
03e5c9b
actualizacion
emali07 May 2, 2025
662f9a9
Merge resuelto: FeatureLoginScreen actualizado tras conflicto
emali07 May 2, 2025
8e2654f
Screens Login y ResetPassword
AlejandroHZ858 May 2, 2025
4788316
Screens Login y ResetPassword v2
AlejandroHZ858 May 2, 2025
f3ac966
pantallas terminadas Alejandro Login,ResetPassword y avance AddHabit
AlejandroHZ858 May 2, 2025
ba058c4
EditProfile
AlexandraOrtizV May 2, 2025
33cfa7a
patallas antes del pull
AlejandroHZ858 May 2, 2025
3602343
Merge branch 'UI_Preview' of https://github.com/eddn-dev/TibiBalanceA…
AlejandroHZ858 May 2, 2025
610736a
Volviendo a subir los cambios del equipo UI Compose
AlexandraOrtizV May 2, 2025
499e5cb
Merge branch 'UI_Preview' of https://github.com/eddn-dev/TibiBalanceA…
AlejandroHZ858 May 2, 2025
68046a7
Cambios a Editar perfil y Avance de Mis Logros
AlexandraOrtizV May 2, 2025
1ee649f
actualizacion
emali07 May 2, 2025
460ab1e
header bien colocado,cambio en botones,login y resetPasswor ya estan …
AlejandroHZ858 May 2, 2025
4c9a9e9
Pantallas login,ResetPasswor completas y con header corregido
AlejandroHZ858 May 2, 2025
750d7ea
Merge branch 'UI_Preview' of https://github.com/eddn-dev/TibiBalanceA…
AlejandroHZ858 May 2, 2025
1201b43
modificaacion comoponente SeondaryButton e InputSelect, se cambio el …
AlejandroHZ858 May 2, 2025
b7c5e3a
Merge branch 'main' into UI_Preview
AlexandraOrtizV May 2, 2025
099dd9d
Feature My Achivements Finalizada + Cambios en el header
AlexandraOrtizV May 2, 2025
9a0bd3a
agregado de imageButton, pantalla agregar habito falata boton de noti…
AlejandroHZ858 May 2, 2025
41ac63e
pantlla crear habito(hace falta boton de notificaciones)
AlejandroHZ858 May 3, 2025
539bb6d
actualizacion
emali07 May 8, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
.externalNativeBuild
.cxx
local.properties

3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/appInsightsSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ app/
El directorio `ui/components` está destinado a albergar **elementos de UI reutilizables y atómicos (o de bajo nivel de composición)**. Estos componentes son la base fundamental sobre la cual se construyen pantallas más complejas. Idealmente, estos componentes deberían ser:

1. **Sin estado (Stateless):** Reciben datos y callbacks como parámetros y no gestionan su propio estado interno complejo.
. **Foco único:** Cada componente realiza una tarea específica de UI.
3. **Foco único:** Cada componente realiza una tarea específica de UI.

### Organización Interna

Expand Down
19 changes: 15 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,34 @@ android {
}

dependencies {
// Íconos extendidos (válidos y estables)
implementation("androidx.compose.material:material-icons-extended:1.5.4")

// Material 3 base (botones, layouts, etc.)
implementation(libs.androidx.material3)

// Firebase
implementation(platform("com.google.firebase:firebase-bom:33.13.0"))
implementation("com.google.firebase:firebase-analytics")
implementation("com.google.firebase:firebase-auth-ktx") // La extensión -ktx es para soporte de Kotlin
implementation("com.google.firebase:firebase-auth-ktx")

// Core de AndroidX
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)

// Compose
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.ui)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)

// Testing
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
implementation("androidx.compose.material:material-icons-extended")
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import androidx.compose.material.icons.filled.CheckCircle
import androidx.compose.material.icons.filled.Warning
import androidx.compose.material.icons.filled.Error
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fun FormContainer(
)
}

/*

@Preview
@Composable
fun LoginScreen() {
Expand All @@ -51,4 +51,40 @@ fun LoginScreen() {
}
}
}
*/

/*@Preview
@Composable
fun LoginS() {


FormContainer {
// Nombre de Usuario
TextField(value = "", onValueChange = { }, label = { Text("Nombre de Usuario*") },
modifier = Modifier.fillMaxWidth()
)

// Fecha de Nacimiento (con ícono)
TextField(
value = "", onValueChange = { }, label = { Text("Fecha de nacimiento*") },
modifier = Modifier.fillMaxWidth()
)

// Correo
TextField(
value = "", onValueChange = {}, label = { Text("Correo*") },
modifier = Modifier.fillMaxWidth()
)

// Contraseña
TextField(
value = "", onValueChange = { }, label = { Text("Contraseña*") },
modifier = Modifier.fillMaxWidth()
)

// Confirmar Contraseña
TextField(
value = "", onValueChange = { }, label = { Text("Confirmar contraseña*") },
modifier = Modifier.fillMaxWidth()
)
}
}*/
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.app.tibibalance.ui.components

import com.app.tibibalance.R
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
Expand All @@ -10,7 +9,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp

@Suppress("UNUSED_FUNCTION")
Expand All @@ -35,4 +33,5 @@ fun IconContainer(
tint = iconTint
)
}
}
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.app.tibibalance.ui.components

import com.app.tibibalance.R
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
Expand All @@ -11,20 +10,24 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.tooling.preview.Preview
import com.app.tibibalance.R


@Suppress("UNUSED_FUNCTION")
@Composable
fun ImageContainer(
imageResId: Int,
contentDescription: String?,
modifier: Modifier = Modifier,
backgroundColor: Color = Color.LightGray,
cornerRadius: Int = 12,
backgroundColor: Color = Color.Transparent,
contentScale: ContentScale = ContentScale.Crop
) {
Box(
modifier = modifier
.clip(RoundedCornerShape(cornerRadius.dp))
.background(backgroundColor)
) {
Image(
Expand All @@ -35,7 +38,7 @@ fun ImageContainer(
)
}
}
/*

@Preview
@Composable
fun ImageContainerPreview() {
Expand All @@ -44,4 +47,4 @@ fun ImageContainerPreview() {
contentDescription = "ImagenPrueba",
modifier = Modifier.size(100.dp)
)
}*/
}
16 changes: 14 additions & 2 deletions app/src/main/java/com/app/tibibalance/ui/components/InputSelect.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.foundation.background
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color

@Composable
fun InputSelect(
Expand All @@ -29,16 +32,25 @@ fun InputSelect(
shape = RoundedCornerShape(16.dp),
modifier = Modifier
.width(300.dp)
.height(45.dp)
.height(30.dp)
.clip(RoundedCornerShape(16.dp))
.background(Color.White)
.clickable { expanded = true },
trailingIcon = {
Icon(
imageVector = Icons.Default.ArrowDropDown,
contentDescription = "Desplegar opciones"
)
}
},
colors = OutlinedTextFieldDefaults.colors(
unfocusedBorderColor = Color.White,
focusedBorderColor = Color.White,
cursorColor = Color.Transparent,
disabledBorderColor = Color.White
)
)


DropdownMenu(
expanded = expanded,
onDismissRequest = { expanded = false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fun InputText(
Box(
modifier = modifier
.width(300.dp)
.height(26.dp)
.height(30.dp)
.padding(start = 5.dp)
.background(
color = MaterialTheme.colorScheme.surface,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,24 @@ fun ModalContainer(
}
}
}

//Este es el uso que me imagino debe tener este componente - Alexandra
@Preview(showBackground = true)
@Composable
fun ModalContainerPreview() {
MaterialTheme {
// Usamos un Box para simular una pantalla base
Box(modifier = Modifier.fillMaxSize()) {
ModalContainer(
onDismissRequest = {}, // Aquí puedes conectar a una variable si lo deseas
closeButtonEnabled = true
) {
Text("Este es un ejemplo de contenido del modal.")
Spacer(modifier = Modifier.height(8.dp))
Button(onClick = {}) {
Text("Aceptar")
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fun ProfileContainer(
}
}

/*

@Preview
@Composable
fun ProfilePreview() {
Expand All @@ -50,4 +50,3 @@ fun ProfilePreview() {
contentDescription = "Foto de perfil"
)
}
*/
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// file: ui/components/ProgressBar.kt
package com.app.tibibalance.ui.components

import androidx.compose.foundation.background
Expand Down Expand Up @@ -64,4 +63,4 @@ fun ProgressBar(
@Composable
fun ProgressBarPreview() {
ProgressBar(percent = 100)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ fun SecondaryButton(
text: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true
enabled: Boolean = true,
backgroundColor: Color = Color.Transparent // Nuevo parámetro
) {
OutlinedButton(
onClick = onClick,
modifier = modifier.width(120.dp).height(40.dp),
enabled = enabled,
shape = RoundedCornerShape(12.dp),

colors = ButtonDefaults.outlinedButtonColors(
containerColor = backgroundColor, // Aquí aplicamos el fondo
contentColor = Color.Black
),
border = BorderStroke(1.dp, Color.Black)
border = BorderStroke(1.dp, Color.White)
) {
Text(
text = text,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ fun SwitchTogglePreview() {
SwitchToggle(checked = on, onCheckedChange = { on = it })
}
}
}
}
38 changes: 38 additions & 0 deletions app/src/main/java/com/app/tibibalance/ui/components/imageButton.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.app.tibibalance.ui.components


import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.size
import androidx.compose.material3.IconButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp

@Composable
fun ImageButton(
onClick: () -> Unit,
imageRes: Int, // Recurso de la imagen
modifier: Modifier = Modifier,
size: Int = 48 // Tamaño del botón
) {
IconButton(
onClick = onClick,
modifier = modifier.size(size.dp) // Tamaño del botón
) {
// Usamos Image para mostrar la imagen dentro del botón
Image(
painter = painterResource(id = imageRes), // Recurso de imagen
contentDescription = "Botón de imagen",
modifier = Modifier.size(size.dp) // Ajustar tamaño de la imagen
)
}
}

@Preview(showBackground = true)
@Composable
fun ImageButtonPreview() {
// Reemplaza el recurso con la imagen que tienes en tus recursos
ImageButton(onClick = { /* Acción al hacer clic */ }, imageRes = android.R.drawable.ic_menu_add)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.app.tibibalance.ui.preview

import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.app.tibibalance.ui.screens.FeatureAddHabitScreen

@Preview
@Composable
fun FeatureAddHabitScreenPreview() {
FeatureAddHabitScreen()
}
Loading