- Tokens CSS con variables para ambos temas (dark/light) - 21 componentes reutilizables (buttons, cards, tables, modals, etc.) - 10 pantallas POS (login, catálogo, POS, inventario, clientes, facturación, contabilidad, dashboard, configuración, reportes) - Preview interactivo con selector de tema - Generado por el equipo de Hugo (Milo-UX, Iris-UI, Zara-Frontend)
279 lines
8.8 KiB
HTML
279 lines
8.8 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 — Pagination</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: var(--z-sticky);
|
|
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); }
|
|
.label { font-size: var(--text-caption); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: var(--tracking-widest); font-weight: var(--font-weight-semibold); margin-bottom: var(--space-2); }
|
|
|
|
/* ====== Pagination ====== */
|
|
.pagination {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-1);
|
|
margin-bottom: var(--space-6);
|
|
}
|
|
|
|
.page-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 36px;
|
|
height: 36px;
|
|
padding: 0 var(--space-2);
|
|
background: var(--color-bg-elevated);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-md);
|
|
color: var(--color-text-secondary);
|
|
font-family: var(--font-body);
|
|
font-size: var(--text-body-sm);
|
|
font-weight: var(--font-weight-semibold);
|
|
cursor: pointer;
|
|
transition: var(--transition-fast);
|
|
text-decoration: none;
|
|
}
|
|
|
|
[data-theme="industrial"] .page-btn {
|
|
border-radius: 0;
|
|
}
|
|
|
|
.page-btn:hover:not(:disabled):not(.active) {
|
|
background: var(--color-primary-muted);
|
|
border-color: var(--color-primary);
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
.page-btn.active {
|
|
background: var(--color-primary);
|
|
color: var(--color-text-inverse);
|
|
border-color: var(--color-primary);
|
|
}
|
|
|
|
.page-btn:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.page-ellipsis {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 36px;
|
|
height: 36px;
|
|
color: var(--color-text-muted);
|
|
font-size: var(--text-body-sm);
|
|
}
|
|
|
|
/* ====== Pagination with info ====== */
|
|
.pagination-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-4);
|
|
padding: var(--space-4);
|
|
background: var(--color-bg-elevated);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-md);
|
|
margin-bottom: var(--space-6);
|
|
}
|
|
|
|
[data-theme="industrial"] .pagination-wrapper {
|
|
border-radius: 0;
|
|
}
|
|
|
|
.pagination-info {
|
|
font-size: var(--text-body-sm);
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.pagination-info strong {
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
.pagination-per-page {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
font-size: var(--text-body-sm);
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.pagination-per-page select {
|
|
padding: var(--space-1) var(--space-3);
|
|
background: var(--color-bg-base);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--color-text-primary);
|
|
font-family: var(--font-body);
|
|
font-size: var(--text-body-sm);
|
|
cursor: pointer;
|
|
}
|
|
|
|
[data-theme="industrial"] .pagination-per-page select {
|
|
border-radius: 0;
|
|
}
|
|
|
|
/* ====== Simple Pagination ====== */
|
|
.pagination-simple {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-4);
|
|
}
|
|
|
|
.pagination-simple-text {
|
|
font-size: var(--text-body-sm);
|
|
color: var(--color-text-muted);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="theme-switcher">
|
|
<button class="active" onclick="setTheme('industrial')">🔧 Industrial</button>
|
|
<button onclick="setTheme('modern')">⚡ Moderno</button>
|
|
</div>
|
|
|
|
<h1>Pagination</h1>
|
|
<p class="subtitle">Paginación para tablas e inventario del sistema POS</p>
|
|
|
|
<!-- Full Pagination -->
|
|
<section>
|
|
<h2>Paginación Completa</h2>
|
|
<div class="label">Navegación de páginas con números</div>
|
|
|
|
<div class="pagination">
|
|
<button class="page-btn" disabled>← Anterior</button>
|
|
<button class="page-btn">1</button>
|
|
<button class="page-btn">2</button>
|
|
<button class="page-btn active">3</button>
|
|
<button class="page-btn">4</button>
|
|
<button class="page-btn">5</button>
|
|
<span class="page-ellipsis">…</span>
|
|
<button class="page-btn">42</button>
|
|
<button class="page-btn">Siguiente →</button>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Pagination with Context -->
|
|
<section>
|
|
<h2>Paginación con Contexto</h2>
|
|
<div class="label">Información de registros y resultados por página</div>
|
|
|
|
<div class="pagination-wrapper">
|
|
<div class="pagination-info">
|
|
Mostrando <strong>41-60</strong> de <strong>1,247</strong> productos
|
|
</div>
|
|
|
|
<div class="pagination">
|
|
<button class="page-btn">←</button>
|
|
<button class="page-btn">1</button>
|
|
<button class="page-btn">2</button>
|
|
<button class="page-btn active">3</button>
|
|
<button class="page-btn">4</button>
|
|
<button class="page-btn">5</button>
|
|
<span class="page-ellipsis">…</span>
|
|
<button class="page-btn">63</button>
|
|
<button class="page-btn">→</button>
|
|
</div>
|
|
|
|
<div class="pagination-per-page">
|
|
<span>Mostrar</span>
|
|
<select>
|
|
<option>10</option>
|
|
<option selected>20</option>
|
|
<option>50</option>
|
|
<option>100</option>
|
|
</select>
|
|
<span>por página</span>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Simple Pagination -->
|
|
<section>
|
|
<h2>Paginación Simple</h2>
|
|
<div class="label">Para listas cortas o navegación rápida</div>
|
|
|
|
<div class="pagination-simple">
|
|
<button class="page-btn">← Anterior</button>
|
|
<span class="pagination-simple-text">Página 3 de 12</span>
|
|
<button class="page-btn">Siguiente →</button>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Large Dataset Pagination -->
|
|
<section>
|
|
<h2>Paginación — Dataset Grande</h2>
|
|
<div class="label">Para el catálogo de 1.4M+ partes</div>
|
|
|
|
<div class="pagination-wrapper">
|
|
<div class="pagination-info">
|
|
Mostrando <strong>10,001-10,050</strong> de <strong>1,423,847</strong> partes
|
|
</div>
|
|
|
|
<div class="pagination">
|
|
<button class="page-btn">←</button>
|
|
<button class="page-btn">1</button>
|
|
<span class="page-ellipsis">…</span>
|
|
<button class="page-btn">199</button>
|
|
<button class="page-btn active">200</button>
|
|
<button class="page-btn">201</button>
|
|
<span class="page-ellipsis">…</span>
|
|
<button class="page-btn">28,477</button>
|
|
<button class="page-btn">→</button>
|
|
</div>
|
|
|
|
<div class="pagination-per-page">
|
|
<span>Mostrar</span>
|
|
<select>
|
|
<option>25</option>
|
|
<option selected>50</option>
|
|
<option>100</option>
|
|
</select>
|
|
<span>por página</span>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<script>
|
|
function setTheme(theme) {
|
|
document.documentElement.setAttribute('data-theme', theme);
|
|
document.querySelectorAll('.theme-switcher button').forEach(btn => {
|
|
btn.classList.toggle('active', btn.textContent.includes(theme === 'industrial' ? 'Industrial' : 'Moderno'));
|
|
});
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|