feat: agregar design system completo con 2 temas (Industrial + Moderno)
- 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)
This commit is contained in:
421
docs/design/design-system/components/progress.html
Normal file
421
docs/design/design-system/components/progress.html
Normal file
@@ -0,0 +1,421 @@
|
||||
<!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 — Progress & Loading</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); }
|
||||
.component-col { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-6); max-width: 500px; }
|
||||
|
||||
/* ====== Progress Bar ====== */
|
||||
.progress-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-1);
|
||||
}
|
||||
|
||||
.progress-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.progress-label {
|
||||
font-size: var(--text-body-sm);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.progress-value {
|
||||
font-size: var(--text-body-sm);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
color: var(--color-text-primary);
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
width: 100%;
|
||||
height: 8px;
|
||||
background: var(--color-surface-2);
|
||||
border-radius: var(--radius-full);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
[data-theme="industrial"] .progress-bar {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.progress-fill {
|
||||
height: 100%;
|
||||
border-radius: var(--radius-full);
|
||||
transition: width 0.5s ease;
|
||||
}
|
||||
|
||||
[data-theme="industrial"] .progress-fill {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.progress-fill-primary { background: var(--color-primary); }
|
||||
.progress-fill-success { background: var(--color-success); }
|
||||
.progress-fill-warning { background: var(--color-warning); }
|
||||
.progress-fill-error { background: var(--color-error); }
|
||||
|
||||
.progress-bar-lg { height: 12px; }
|
||||
.progress-bar-sm { height: 4px; }
|
||||
|
||||
/* Striped animation */
|
||||
.progress-fill-striped {
|
||||
background-image: linear-gradient(
|
||||
45deg,
|
||||
rgba(255,255,255,0.15) 25%,
|
||||
transparent 25%,
|
||||
transparent 50%,
|
||||
rgba(255,255,255,0.15) 50%,
|
||||
rgba(255,255,255,0.15) 75%,
|
||||
transparent 75%,
|
||||
transparent
|
||||
);
|
||||
background-size: 20px 20px;
|
||||
animation: progress-stripes 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes progress-stripes {
|
||||
0% { background-position: 20px 0; }
|
||||
100% { background-position: 0 0; }
|
||||
}
|
||||
|
||||
/* ====== Spinners ====== */
|
||||
.spinner-row {
|
||||
display: flex;
|
||||
gap: var(--space-8);
|
||||
align-items: center;
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: 3px solid var(--color-border);
|
||||
border-top-color: var(--color-primary);
|
||||
border-radius: var(--radius-full);
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
|
||||
.spinner-lg { width: 48px; height: 48px; border-width: 4px; }
|
||||
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* Dot loader */
|
||||
.dot-loader {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dot-loader span {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: var(--color-primary);
|
||||
border-radius: var(--radius-full);
|
||||
animation: dot-bounce 1.4s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.dot-loader span:nth-child(2) { animation-delay: 0.2s; }
|
||||
.dot-loader span:nth-child(3) { animation-delay: 0.4s; }
|
||||
|
||||
@keyframes dot-bounce {
|
||||
0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
|
||||
40% { transform: scale(1); opacity: 1; }
|
||||
}
|
||||
|
||||
/* Pulse loader */
|
||||
.pulse-loader {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: var(--radius-full);
|
||||
background: var(--color-primary);
|
||||
animation: pulse 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% { transform: scale(0.8); opacity: 1; }
|
||||
50% { transform: scale(1.2); opacity: 0.4; }
|
||||
100% { transform: scale(0.8); opacity: 1; }
|
||||
}
|
||||
|
||||
/* ====== Skeleton Loaders ====== */
|
||||
.skeleton {
|
||||
background: var(--color-surface-2);
|
||||
border-radius: var(--radius-md);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
[data-theme="industrial"] .skeleton {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.skeleton::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
transparent,
|
||||
rgba(255,255,255,0.08),
|
||||
transparent
|
||||
);
|
||||
animation: skeleton-shimmer 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
[data-theme="modern"] .skeleton::after {
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
transparent,
|
||||
rgba(255,255,255,0.5),
|
||||
transparent
|
||||
);
|
||||
}
|
||||
|
||||
@keyframes skeleton-shimmer {
|
||||
100% { left: 100%; }
|
||||
}
|
||||
|
||||
.skeleton-card {
|
||||
padding: var(--space-4);
|
||||
background: var(--color-bg-elevated);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
[data-theme="industrial"] .skeleton-card {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.skeleton-img {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
|
||||
.skeleton-line {
|
||||
height: 14px;
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
|
||||
.skeleton-line-short { width: 60%; }
|
||||
.skeleton-line-medium { width: 80%; }
|
||||
.skeleton-line-full { width: 100%; }
|
||||
|
||||
.skeleton-circle {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: var(--radius-full);
|
||||
}
|
||||
|
||||
/* Table skeleton */
|
||||
.skeleton-table {
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.skeleton-table-row {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-3) 0;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.skeleton-table-cell {
|
||||
height: 14px;
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="theme-switcher">
|
||||
<button class="active" onclick="setTheme('industrial')">🔧 Industrial</button>
|
||||
<button onclick="setTheme('modern')">⚡ Moderno</button>
|
||||
</div>
|
||||
|
||||
<h1>Progress & Loading</h1>
|
||||
<p class="subtitle">Barras de progreso, spinners y skeleton loaders del sistema POS</p>
|
||||
|
||||
<!-- Progress Bars -->
|
||||
<section>
|
||||
<h2>Progress Bars</h2>
|
||||
<div class="label">Indicadores de progreso con semántica</div>
|
||||
|
||||
<div class="component-col">
|
||||
<div class="progress-wrapper">
|
||||
<div class="progress-header">
|
||||
<span class="progress-label">Sincronización de catálogo</span>
|
||||
<span class="progress-value">73%</span>
|
||||
</div>
|
||||
<div class="progress-bar">
|
||||
<div class="progress-fill progress-fill-primary" style="width: 73%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="progress-wrapper">
|
||||
<div class="progress-header">
|
||||
<span class="progress-label">Stock saludable</span>
|
||||
<span class="progress-value">92%</span>
|
||||
</div>
|
||||
<div class="progress-bar">
|
||||
<div class="progress-fill progress-fill-success" style="width: 92%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="progress-wrapper">
|
||||
<div class="progress-header">
|
||||
<span class="progress-label">Capacidad de bodega</span>
|
||||
<span class="progress-value">68%</span>
|
||||
</div>
|
||||
<div class="progress-bar">
|
||||
<div class="progress-fill progress-fill-warning" style="width: 68%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="progress-wrapper">
|
||||
<div class="progress-header">
|
||||
<span class="progress-label">Productos agotados</span>
|
||||
<span class="progress-value">15%</span>
|
||||
</div>
|
||||
<div class="progress-bar">
|
||||
<div class="progress-fill progress-fill-error" style="width: 15%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="label">Barra animada (en proceso)</div>
|
||||
<div class="component-col">
|
||||
<div class="progress-wrapper">
|
||||
<div class="progress-header">
|
||||
<span class="progress-label">Importando productos...</span>
|
||||
<span class="progress-value">45%</span>
|
||||
</div>
|
||||
<div class="progress-bar progress-bar-lg">
|
||||
<div class="progress-fill progress-fill-primary progress-fill-striped" style="width: 45%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="label">Tamaños</div>
|
||||
<div class="component-col">
|
||||
<div class="progress-bar progress-bar-sm">
|
||||
<div class="progress-fill progress-fill-primary" style="width: 60%;"></div>
|
||||
</div>
|
||||
<div class="progress-bar">
|
||||
<div class="progress-fill progress-fill-primary" style="width: 60%;"></div>
|
||||
</div>
|
||||
<div class="progress-bar progress-bar-lg">
|
||||
<div class="progress-fill progress-fill-primary" style="width: 60%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Spinners -->
|
||||
<section>
|
||||
<h2>Loading Spinners</h2>
|
||||
<div class="label">Indicadores de carga</div>
|
||||
|
||||
<div class="spinner-row">
|
||||
<div>
|
||||
<div class="spinner spinner-sm"></div>
|
||||
<div style="font-size: var(--text-caption); color: var(--color-text-muted); margin-top: var(--space-2); text-align: center;">SM</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="spinner"></div>
|
||||
<div style="font-size: var(--text-caption); color: var(--color-text-muted); margin-top: var(--space-2); text-align: center;">MD</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="spinner spinner-lg"></div>
|
||||
<div style="font-size: var(--text-caption); color: var(--color-text-muted); margin-top: var(--space-2); text-align: center;">LG</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="dot-loader">
|
||||
<span></span><span></span><span></span>
|
||||
</div>
|
||||
<div style="font-size: var(--text-caption); color: var(--color-text-muted); margin-top: var(--space-2); text-align: center;">Dots</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="pulse-loader"></div>
|
||||
<div style="font-size: var(--text-caption); color: var(--color-text-muted); margin-top: var(--space-2); text-align: center;">Pulse</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Skeleton Loaders -->
|
||||
<section>
|
||||
<h2>Skeleton Loaders</h2>
|
||||
<div class="label">Placeholders de carga para tarjetas de producto</div>
|
||||
|
||||
<div style="display: flex; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-6);">
|
||||
<div class="skeleton-card">
|
||||
<div class="skeleton skeleton-img"></div>
|
||||
<div class="skeleton skeleton-line skeleton-line-full"></div>
|
||||
<div class="skeleton skeleton-line skeleton-line-medium"></div>
|
||||
<div class="skeleton skeleton-line skeleton-line-short"></div>
|
||||
</div>
|
||||
|
||||
<div class="skeleton-card">
|
||||
<div class="skeleton skeleton-img"></div>
|
||||
<div class="skeleton skeleton-line skeleton-line-full"></div>
|
||||
<div class="skeleton skeleton-line skeleton-line-medium"></div>
|
||||
<div class="skeleton skeleton-line skeleton-line-short"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="label">Skeleton de tabla</div>
|
||||
<div class="skeleton-table">
|
||||
<div class="skeleton-table-row">
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 0.3;"></div>
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 1;"></div>
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 0.5;"></div>
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 0.4;"></div>
|
||||
</div>
|
||||
<div class="skeleton-table-row">
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 0.3;"></div>
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 1;"></div>
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 0.5;"></div>
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 0.4;"></div>
|
||||
</div>
|
||||
<div class="skeleton-table-row">
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 0.3;"></div>
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 1;"></div>
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 0.5;"></div>
|
||||
<div class="skeleton skeleton-table-cell" style="flex: 0.4;"></div>
|
||||
</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>
|
||||
Reference in New Issue
Block a user