Bloqueantes POS: modal-pago, ticket-termico, banner-cliente, fkeys-footer, columnas-costo-margen Componentes nuevos: calculadora-cambio, panel-deslizante, badge-cfdi, arbol-colapsable, tarjeta-metrica, grafica-barras, selector-periodo, etiqueta-codigo-barras Estados: estado-vacio, banner-offline, modal-confirmacion Páginas actualizadas: facturación, contabilidad, dashboard, configuración, reportes
560 lines
17 KiB
HTML
560 lines
17 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es" data-theme="industrial">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Nexus Autoparts — Panel Deslizante</title>
|
|
<link rel="stylesheet" href="../tokens/tokens.css">
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body {
|
|
font-family: var(--font-body); background: var(--color-bg-base);
|
|
color: var(--color-text-primary); padding: var(--space-8);
|
|
transition: var(--transition-normal);
|
|
}
|
|
.theme-switcher {
|
|
position: sticky; top: 0; z-index: calc(var(--z-modal) + 10);
|
|
display: flex; gap: var(--space-2);
|
|
padding: var(--space-3) var(--space-4);
|
|
background: var(--color-bg-elevated);
|
|
border-bottom: 1px solid var(--color-border);
|
|
margin: calc(-1 * var(--space-8)); margin-bottom: var(--space-8);
|
|
}
|
|
.theme-switcher button {
|
|
padding: var(--space-2) var(--space-4);
|
|
border: 1px solid var(--color-border);
|
|
background: var(--color-bg-base); color: var(--color-text-primary);
|
|
border-radius: var(--radius-md); cursor: pointer;
|
|
font-family: var(--font-body); font-size: var(--text-body-sm);
|
|
transition: var(--transition-fast);
|
|
}
|
|
.theme-switcher button.active {
|
|
background: var(--color-primary); color: var(--color-text-inverse);
|
|
border-color: var(--color-primary);
|
|
}
|
|
h1 { font-family: var(--font-heading); font-size: var(--text-h2);
|
|
font-weight: var(--heading-weight-primary); margin-bottom: var(--space-2);
|
|
color: var(--color-text-accent); }
|
|
.subtitle { color: var(--color-text-muted); font-size: var(--text-body); margin-bottom: var(--space-8); }
|
|
section { margin-bottom: var(--space-10); }
|
|
section > h2 {
|
|
font-family: var(--font-heading); font-size: var(--text-h4);
|
|
font-weight: var(--heading-weight-secondary); color: var(--color-text-secondary);
|
|
margin-bottom: var(--space-4); padding-bottom: var(--space-2);
|
|
border-bottom: 1px solid var(--color-border);
|
|
}
|
|
|
|
/* Trigger button */
|
|
.btn-open-panel {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
padding: var(--space-3) var(--space-5);
|
|
background: var(--btn-primary-bg);
|
|
color: var(--btn-primary-text);
|
|
border: 1px solid var(--btn-primary-border);
|
|
border-radius: var(--radius-md);
|
|
font-family: var(--font-body);
|
|
font-size: var(--text-body);
|
|
font-weight: var(--font-weight-semibold);
|
|
cursor: pointer;
|
|
transition: var(--transition-fast);
|
|
}
|
|
.btn-open-panel:hover {
|
|
background: var(--btn-primary-bg-hover);
|
|
}
|
|
.btn-open-panel:active {
|
|
background: var(--btn-primary-bg-active);
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
/* Demo context: fake table behind */
|
|
.demo-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: var(--space-4);
|
|
}
|
|
.demo-table th, .demo-table td {
|
|
padding: var(--space-3) var(--space-4);
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--color-border);
|
|
font-size: var(--text-body-sm);
|
|
}
|
|
.demo-table th {
|
|
color: var(--color-text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: var(--tracking-wide);
|
|
font-size: var(--text-caption);
|
|
font-weight: var(--font-weight-semibold);
|
|
background: var(--color-surface-1);
|
|
}
|
|
.demo-table td { color: var(--color-text-secondary); }
|
|
.demo-table .name-link {
|
|
color: var(--color-text-accent);
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
font-weight: var(--font-weight-semibold);
|
|
}
|
|
.demo-table .name-link:hover { text-decoration: underline; }
|
|
|
|
/* Overlay */
|
|
.panel-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: var(--overlay-backdrop);
|
|
z-index: var(--z-modal);
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transition: opacity var(--duration-normal) var(--ease-out),
|
|
visibility var(--duration-normal) var(--ease-out);
|
|
}
|
|
.panel-overlay.open {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
}
|
|
|
|
/* Slide-in panel */
|
|
.slide-panel {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
width: 380px;
|
|
max-width: 90vw;
|
|
height: 100vh;
|
|
background: var(--color-bg-elevated);
|
|
border-left: 1px solid var(--color-border);
|
|
box-shadow: var(--shadow-xl);
|
|
z-index: calc(var(--z-modal) + 1);
|
|
transform: translateX(100%);
|
|
transition: transform var(--duration-slow) var(--ease-out);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
.slide-panel.open {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
/* Panel header */
|
|
.panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--space-4) var(--space-5);
|
|
border-bottom: 1px solid var(--color-border);
|
|
flex-shrink: 0;
|
|
}
|
|
.panel-header h3 {
|
|
font-family: var(--font-heading);
|
|
font-size: var(--text-h5);
|
|
font-weight: var(--heading-weight-secondary);
|
|
color: var(--color-text-primary);
|
|
}
|
|
.btn-close {
|
|
width: 32px;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: transparent;
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-md);
|
|
color: var(--color-text-muted);
|
|
cursor: pointer;
|
|
font-size: 18px;
|
|
transition: var(--transition-fast);
|
|
}
|
|
.btn-close:hover {
|
|
background: var(--color-surface-2);
|
|
color: var(--color-text-primary);
|
|
border-color: var(--color-border-strong);
|
|
}
|
|
|
|
/* Panel body */
|
|
.panel-body {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: var(--space-5);
|
|
scrollbar-width: thin;
|
|
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
|
|
}
|
|
|
|
/* Client info sections */
|
|
.client-avatar-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-4);
|
|
margin-bottom: var(--space-5);
|
|
}
|
|
.client-avatar {
|
|
width: 56px;
|
|
height: 56px;
|
|
border-radius: var(--radius-full);
|
|
background: var(--color-primary-muted);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-family: var(--font-heading);
|
|
font-size: var(--text-h4);
|
|
font-weight: var(--heading-weight-primary);
|
|
color: var(--color-text-accent);
|
|
border: 2px solid var(--color-border-accent);
|
|
flex-shrink: 0;
|
|
}
|
|
.client-info-main .client-name {
|
|
font-family: var(--font-heading);
|
|
font-size: var(--text-h5);
|
|
font-weight: var(--heading-weight-primary);
|
|
color: var(--color-text-primary);
|
|
margin-bottom: 2px;
|
|
}
|
|
.client-info-main .client-rfc {
|
|
font-family: var(--font-mono);
|
|
font-size: var(--text-body-sm);
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.panel-section {
|
|
margin-bottom: var(--space-5);
|
|
}
|
|
.panel-section-title {
|
|
font-size: var(--text-caption);
|
|
text-transform: uppercase;
|
|
letter-spacing: var(--tracking-widest);
|
|
color: var(--color-text-muted);
|
|
font-weight: var(--font-weight-semibold);
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
|
|
/* Credit bar */
|
|
.credit-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr 1fr;
|
|
gap: var(--space-3);
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
.credit-item {
|
|
text-align: center;
|
|
padding: var(--space-3);
|
|
background: var(--color-surface-1);
|
|
border-radius: var(--radius-md);
|
|
border: 1px solid var(--color-border);
|
|
}
|
|
.credit-item .credit-label {
|
|
font-size: var(--text-caption);
|
|
color: var(--color-text-muted);
|
|
margin-bottom: var(--space-1);
|
|
}
|
|
.credit-item .credit-value {
|
|
font-family: var(--font-mono);
|
|
font-size: var(--text-body);
|
|
font-weight: var(--font-weight-bold);
|
|
color: var(--color-text-primary);
|
|
}
|
|
.credit-item .credit-value.success { color: var(--color-success); }
|
|
.credit-item .credit-value.warning { color: var(--color-warning); }
|
|
|
|
.credit-bar-track {
|
|
height: 8px;
|
|
background: var(--color-surface-2);
|
|
border-radius: var(--radius-full);
|
|
overflow: hidden;
|
|
}
|
|
.credit-bar-fill {
|
|
height: 100%;
|
|
border-radius: var(--radius-full);
|
|
background: var(--color-primary);
|
|
transition: var(--transition-normal);
|
|
}
|
|
|
|
/* Vehicle list */
|
|
.vehicle-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
padding: var(--space-3);
|
|
background: var(--color-surface-1);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-md);
|
|
margin-bottom: var(--space-2);
|
|
}
|
|
.vehicle-icon {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: var(--radius-md);
|
|
background: var(--color-surface-3);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 18px;
|
|
flex-shrink: 0;
|
|
}
|
|
.vehicle-details {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
.vehicle-name {
|
|
font-size: var(--text-body-sm);
|
|
font-weight: var(--font-weight-semibold);
|
|
color: var(--color-text-primary);
|
|
}
|
|
.vehicle-plate {
|
|
font-family: var(--font-mono);
|
|
font-size: var(--text-caption);
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
/* Recent purchases mini-table */
|
|
.purchases-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
.purchases-table th, .purchases-table td {
|
|
padding: var(--space-2) var(--space-2);
|
|
text-align: left;
|
|
font-size: var(--text-caption);
|
|
border-bottom: 1px solid var(--color-border);
|
|
}
|
|
.purchases-table th {
|
|
color: var(--color-text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: var(--tracking-wide);
|
|
font-weight: var(--font-weight-semibold);
|
|
}
|
|
.purchases-table td {
|
|
color: var(--color-text-secondary);
|
|
}
|
|
.purchases-table .amount-cell {
|
|
font-family: var(--font-mono);
|
|
text-align: right;
|
|
font-weight: var(--font-weight-semibold);
|
|
}
|
|
.purchases-table th:last-child { text-align: right; }
|
|
|
|
/* Panel footer */
|
|
.panel-footer {
|
|
padding: var(--space-4) var(--space-5);
|
|
border-top: 1px solid var(--color-border);
|
|
display: flex;
|
|
gap: var(--space-2);
|
|
flex-shrink: 0;
|
|
}
|
|
.panel-footer button {
|
|
flex: 1;
|
|
padding: var(--space-3);
|
|
border-radius: var(--radius-md);
|
|
font-family: var(--font-body);
|
|
font-size: var(--text-body-sm);
|
|
font-weight: var(--font-weight-semibold);
|
|
cursor: pointer;
|
|
transition: var(--transition-fast);
|
|
border: 1px solid;
|
|
}
|
|
.panel-footer .btn-edit {
|
|
background: var(--btn-secondary-bg);
|
|
color: var(--btn-secondary-text);
|
|
border-color: var(--btn-secondary-border);
|
|
}
|
|
.panel-footer .btn-edit:hover {
|
|
background: var(--btn-secondary-bg-hover);
|
|
}
|
|
.panel-footer .btn-sale {
|
|
background: var(--btn-primary-bg);
|
|
color: var(--btn-primary-text);
|
|
border-color: var(--btn-primary-border);
|
|
}
|
|
.panel-footer .btn-sale:hover {
|
|
background: var(--btn-primary-bg-hover);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="theme-switcher">
|
|
<button class="active" onclick="document.documentElement.dataset.theme='industrial'; this.classList.add('active'); this.nextElementSibling.classList.remove('active')">🔧 Industrial</button>
|
|
<button onclick="document.documentElement.dataset.theme='modern'; this.classList.add('active'); this.previousElementSibling.classList.remove('active')">⚡ Moderno</button>
|
|
</div>
|
|
|
|
<h1>Panel Deslizante</h1>
|
|
<p class="subtitle">Panel lateral que se desliza desde la derecha con detalle de cliente</p>
|
|
|
|
<section>
|
|
<h2>Contexto: Lista de Clientes</h2>
|
|
<p style="color: var(--color-text-secondary); margin-bottom: var(--space-4); font-size: var(--text-body-sm);">
|
|
Haz clic en un nombre para abrir el panel deslizante.
|
|
</p>
|
|
|
|
<table class="demo-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Cliente</th>
|
|
<th>RFC</th>
|
|
<th>Saldo</th>
|
|
<th>Vehículos</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="name-link" onclick="openPanel()">Roberto Méndez Gutiérrez</a></td>
|
|
<td style="font-family: var(--font-mono); font-size: var(--text-caption);">MEGR820415QR3</td>
|
|
<td style="font-family: var(--font-mono);">$12,450.00</td>
|
|
<td>3</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a class="name-link" onclick="openPanel()">Taller Mecánico Hermanos López</a></td>
|
|
<td style="font-family: var(--font-mono); font-size: var(--text-caption);">THL950220MN8</td>
|
|
<td style="font-family: var(--font-mono);">$28,900.00</td>
|
|
<td>--</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a class="name-link" onclick="openPanel()">María Elena Ríos</a></td>
|
|
<td style="font-family: var(--font-mono); font-size: var(--text-caption);">RIEM770903AB1</td>
|
|
<td style="font-family: var(--font-mono);">$0.00</td>
|
|
<td>1</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<button class="btn-open-panel" onclick="openPanel()" style="margin-top: var(--space-6);">
|
|
<span>👤</span> Ver Detalle de Cliente
|
|
</button>
|
|
</section>
|
|
|
|
<!-- Overlay -->
|
|
<div class="panel-overlay" id="panelOverlay" onclick="closePanel()"></div>
|
|
|
|
<!-- Slide Panel -->
|
|
<div class="slide-panel" id="slidePanel">
|
|
<div class="panel-header">
|
|
<h3>Detalle de Cliente</h3>
|
|
<button class="btn-close" onclick="closePanel()" title="Cerrar">×</button>
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
<!-- Client avatar + name -->
|
|
<div class="client-avatar-row">
|
|
<div class="client-avatar">RM</div>
|
|
<div class="client-info-main">
|
|
<div class="client-name">Roberto Méndez Gutiérrez</div>
|
|
<div class="client-rfc">RFC: MEGR820415QR3</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Credit info -->
|
|
<div class="panel-section">
|
|
<div class="panel-section-title">Crédito</div>
|
|
<div class="credit-grid">
|
|
<div class="credit-item">
|
|
<div class="credit-label">Límite</div>
|
|
<div class="credit-value">$50,000</div>
|
|
</div>
|
|
<div class="credit-item">
|
|
<div class="credit-label">Utilizado</div>
|
|
<div class="credit-value warning">$12,450</div>
|
|
</div>
|
|
<div class="credit-item">
|
|
<div class="credit-label">Disponible</div>
|
|
<div class="credit-value success">$37,550</div>
|
|
</div>
|
|
</div>
|
|
<div class="credit-bar-track">
|
|
<div class="credit-bar-fill" style="width: 24.9%;"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Vehicles -->
|
|
<div class="panel-section">
|
|
<div class="panel-section-title">Vehículos Registrados</div>
|
|
<div class="vehicle-item">
|
|
<div class="vehicle-icon">🚗</div>
|
|
<div class="vehicle-details">
|
|
<div class="vehicle-name">Nissan Sentra 2019</div>
|
|
<div class="vehicle-plate">JKL-4521 / Motor: MR20DE</div>
|
|
</div>
|
|
</div>
|
|
<div class="vehicle-item">
|
|
<div class="vehicle-icon">🛻</div>
|
|
<div class="vehicle-details">
|
|
<div class="vehicle-name">Toyota Hilux 2021</div>
|
|
<div class="vehicle-plate">ABC-7890 / Motor: 2GD-FTV</div>
|
|
</div>
|
|
</div>
|
|
<div class="vehicle-item">
|
|
<div class="vehicle-icon">🚗</div>
|
|
<div class="vehicle-details">
|
|
<div class="vehicle-name">VW Jetta 2017</div>
|
|
<div class="vehicle-plate">MNO-1234 / Motor: EA211</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Recent purchases -->
|
|
<div class="panel-section">
|
|
<div class="panel-section-title">Compras Recientes</div>
|
|
<table class="purchases-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Fecha</th>
|
|
<th>Folio</th>
|
|
<th style="text-align:right;">Total</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>28/Mar/2026</td>
|
|
<td>V-04521</td>
|
|
<td class="amount-cell">$3,240.00</td>
|
|
</tr>
|
|
<tr>
|
|
<td>15/Mar/2026</td>
|
|
<td>V-04389</td>
|
|
<td class="amount-cell">$1,890.50</td>
|
|
</tr>
|
|
<tr>
|
|
<td>02/Mar/2026</td>
|
|
<td>V-04210</td>
|
|
<td class="amount-cell">$5,620.00</td>
|
|
</tr>
|
|
<tr>
|
|
<td>18/Feb/2026</td>
|
|
<td>V-04098</td>
|
|
<td class="amount-cell">$780.00</td>
|
|
</tr>
|
|
<tr>
|
|
<td>05/Feb/2026</td>
|
|
<td>V-03955</td>
|
|
<td class="amount-cell">$2,410.00</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel-footer">
|
|
<button class="btn-edit">Editar Cliente</button>
|
|
<button class="btn-sale">Nueva Venta</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
const overlay = document.getElementById('panelOverlay');
|
|
const panel = document.getElementById('slidePanel');
|
|
|
|
function openPanel() {
|
|
overlay.classList.add('open');
|
|
panel.classList.add('open');
|
|
document.body.style.overflow = 'hidden';
|
|
}
|
|
|
|
function closePanel() {
|
|
overlay.classList.remove('open');
|
|
panel.classList.remove('open');
|
|
document.body.style.overflow = '';
|
|
}
|
|
|
|
// Close on Escape key
|
|
document.addEventListener('keydown', function(e) {
|
|
if (e.key === 'Escape') closePanel();
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |