pkg-components
Version:
181 lines (158 loc) • 3.28 kB
CSS
/* CONTENEDOR PRINCIPAL */
.wrapper {
position: relative;
display: flex;
align-items: center;
justify-content: flex-start;
overflow: hidden;
margin-top: var(--spacing-xl);
}
/* PANEL DESLIZANTE (DERECHA, DETRÁS DEL CARD) */
.sidePanel {
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 180px;
background-color: var(--color-neutral-gray-white);
border-radius: 16px;
box-shadow: inset 2px 0 6px rgba(0, 0, 0, 0.05);
padding: 16px 12px;
display: flex;
flex-direction: column;
gap: 10px;
transform: translateX(-125%);
transition: transform 0.4s ease;
z-index: 0; /* Detrás del card */
align-items: flex-end;
}
.sidePanelOpen {
transform: translateX(0);
}
/* OPCIONES */
.optionItem {
background: transparent;
border: none;
display: flex;
gap: 8px;
padding: 8px 10px;
align-items: center;
font-size: 0.9rem;
justify-content: flex-end;
color: #333;
cursor: pointer;
border-radius: 8px;
transition: background 0.2s ease;
width: min-content;
}
.optionItem:hover {
background: rgba(0, 0, 0, 0.05);
}
.danger {
color: var(--color-danger);
}
/* CARD PRINCIPAL */
.card {
position: relative;
background-color: var(--color-base-white);
border-radius: 10px;
box-shadow: var(--box-shadow-xs);
cursor: pointer;
display: flex;
flex-direction: column;
gap: 12px;
justify-content: space-between;
padding: 16px;
width: 100%;
transition: transform 0.4s ease, box-shadow 0.2s ease;
z-index: 1; /* Encima del panel */
border: 1px solid var(--color-neutral-gray-silver);
}
/* 🌀 Cuando el panel está abierto, el card se mueve un poco a la izquierda */
.cardShifted {
transform: translateX(-100px);
box-shadow: var(--box-shadow-2xs);
}
.card:hover {
box-shadow: var(--box-shadow-2xs);
}
/* HEADER */
.header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.logo {
width: 40px;
height: 40px;
border-radius: 8px;
object-fit: contain;
}
.title {
font-size: 1rem;
font-weight: 600;
color: #222;
margin: 0;
}
.company {
font-size: 0.875rem;
color: #777;
margin: 0;
}
.amount {
font-weight: 500;
font-size: 0.95rem;
color: #333;
}
.footer {
display: flex;
align-items: center;
justify-content: space-between;
}
.avatars {
display: flex;
align-items: center;
}
.avatar {
width: 28px;
height: 28px;
border-radius: 50%;
object-fit: cover;
border: 2px solid #fff;
margin-left: -8px;
transition: transform 0.2s ease;
}
.avatar:first-child {
margin-left: 0;
}
.avatar:hover {
transform: scale(1.1);
}
.stats {
display: flex;
gap: 8px;
font-size: 0.85rem;
height: min-content;
color: #666;
}
.date {
font-size: 0.8rem;
color: #999;
align-self: flex-end;
}
/* BOTÓN DE OPCIONES */
.optionsButton {
background: transparent;
border: none;
cursor: pointer;
padding: 4px;
border-radius: 50%;
transition: background 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
}
.optionsButton:hover {
background-color: rgba(0, 0, 0, 0.05);
}