- 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)
593 lines
24 KiB
HTML
593 lines
24 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 — Modals</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);
|
|
}
|
|
.label-text {
|
|
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-3);
|
|
}
|
|
|
|
.trigger-row {
|
|
display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-6);
|
|
}
|
|
|
|
/* ====== Buttons ====== */
|
|
.btn {
|
|
display: inline-flex; align-items: center; justify-content: center;
|
|
gap: var(--space-2);
|
|
padding: var(--space-3) var(--space-6);
|
|
font-family: var(--font-body); font-size: var(--text-body);
|
|
font-weight: var(--font-weight-semibold); line-height: 1;
|
|
border: 2px solid transparent; border-radius: var(--radius-md);
|
|
cursor: pointer; transition: var(--transition-fast);
|
|
white-space: nowrap;
|
|
}
|
|
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
|
|
.btn:active { transform: scale(0.97); }
|
|
.btn-primary {
|
|
background: var(--btn-primary-bg); color: var(--btn-primary-text);
|
|
}
|
|
.btn-primary:hover { background: var(--btn-primary-bg-hover); }
|
|
.btn-secondary {
|
|
background: var(--btn-secondary-bg); color: var(--btn-secondary-text);
|
|
border-color: var(--btn-secondary-border);
|
|
}
|
|
.btn-secondary:hover { background: var(--btn-secondary-bg-hover); }
|
|
.btn-danger {
|
|
background: var(--btn-danger-bg); color: var(--btn-danger-text);
|
|
}
|
|
.btn-danger:hover { background: var(--color-error-dark); }
|
|
.btn-ghost {
|
|
background: var(--btn-ghost-bg); color: var(--btn-ghost-text);
|
|
border-color: var(--btn-ghost-border);
|
|
}
|
|
.btn-ghost:hover { background: var(--color-surface-2); }
|
|
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-body-sm); }
|
|
.btn-block { width: 100%; }
|
|
|
|
[data-theme="industrial"] .btn-primary,
|
|
[data-theme="industrial"] .btn-danger {
|
|
clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
|
|
border-radius: 0;
|
|
}
|
|
|
|
/* ====== Input ====== */
|
|
.input {
|
|
width: 100%; padding: var(--space-3) var(--space-4);
|
|
font-family: var(--font-body); font-size: var(--text-body);
|
|
color: var(--color-text-primary); background: var(--color-bg-base);
|
|
border: 1px solid var(--color-border); border-radius: var(--radius-md);
|
|
transition: var(--transition-fast); outline: none;
|
|
}
|
|
.input::placeholder { color: var(--color-text-muted); }
|
|
.input:focus { border-color: var(--color-border-focus); box-shadow: var(--shadow-focus); }
|
|
.input-mono { font-family: var(--font-mono); }
|
|
.select {
|
|
width: 100%; padding: var(--space-3) var(--space-4);
|
|
font-family: var(--font-body); font-size: var(--text-body);
|
|
color: var(--color-text-primary); background: var(--color-bg-base);
|
|
border: 1px solid var(--color-border); border-radius: var(--radius-md);
|
|
outline: none; appearance: none; cursor: pointer;
|
|
}
|
|
.form-group { display: flex; flex-direction: column; gap: var(--space-1); }
|
|
.form-group label {
|
|
font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold);
|
|
color: var(--color-text-secondary);
|
|
}
|
|
textarea.input { resize: vertical; min-height: 80px; }
|
|
|
|
/* ====== Modal Overlay ====== */
|
|
.modal-overlay {
|
|
display: none;
|
|
position: fixed; inset: 0;
|
|
background: var(--overlay-backdrop);
|
|
z-index: var(--z-modal);
|
|
align-items: center; justify-content: center;
|
|
padding: var(--space-6);
|
|
animation: fadeIn 0.2s ease;
|
|
}
|
|
.modal-overlay.active { display: flex; }
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
@keyframes slideUp {
|
|
from { opacity: 0; transform: translateY(20px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* ====== Modal ====== */
|
|
.modal {
|
|
background: var(--color-bg-overlay);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-xl);
|
|
width: 100%; max-width: 520px;
|
|
max-height: 90vh; overflow-y: auto;
|
|
animation: slideUp 0.25s ease;
|
|
}
|
|
[data-theme="industrial"] .modal {
|
|
border-radius: 0;
|
|
clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
padding: var(--space-5) var(--space-6);
|
|
border-bottom: 1px solid var(--color-border);
|
|
}
|
|
.modal-header h2 {
|
|
font-family: var(--font-heading);
|
|
font-size: var(--text-h4);
|
|
font-weight: var(--heading-weight-secondary);
|
|
margin: 0; padding: 0; border: none;
|
|
}
|
|
.modal-close {
|
|
display: flex; align-items: center; justify-content: center;
|
|
width: 32px; height: 32px;
|
|
background: none; border: 1px solid var(--color-border);
|
|
color: var(--color-text-muted); border-radius: var(--radius-md);
|
|
cursor: pointer; font-size: 16px; transition: var(--transition-fast);
|
|
}
|
|
.modal-close:hover {
|
|
color: var(--color-text-primary); border-color: var(--color-border-strong);
|
|
background: var(--color-surface-2);
|
|
}
|
|
|
|
.modal-body {
|
|
padding: var(--space-6);
|
|
}
|
|
|
|
.modal-footer {
|
|
display: flex; align-items: center; justify-content: flex-end;
|
|
gap: var(--space-3);
|
|
padding: var(--space-4) var(--space-6);
|
|
border-top: 1px solid var(--color-border);
|
|
}
|
|
|
|
/* Modal sizes */
|
|
.modal-sm { max-width: 380px; }
|
|
.modal-lg { max-width: 720px; }
|
|
|
|
/* ====== Inline Modal Preview ====== */
|
|
.modal-preview {
|
|
background: var(--color-surface-1);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-lg);
|
|
padding: var(--space-6);
|
|
margin-bottom: var(--space-6);
|
|
}
|
|
.modal-preview .modal {
|
|
position: relative;
|
|
max-width: 100%;
|
|
animation: none;
|
|
}
|
|
|
|
/* ====== Confirmation Dialog Icon ====== */
|
|
.confirm-icon {
|
|
width: 64px; height: 64px;
|
|
border-radius: var(--radius-full);
|
|
display: flex; align-items: center; justify-content: center;
|
|
font-size: 32px; margin: 0 auto var(--space-4);
|
|
}
|
|
.confirm-icon-danger {
|
|
background: var(--color-error-light); color: var(--color-error);
|
|
}
|
|
.confirm-icon-warning {
|
|
background: var(--color-warning-light); color: var(--color-warning);
|
|
}
|
|
.confirm-icon-success {
|
|
background: var(--color-success-light); color: var(--color-success);
|
|
}
|
|
|
|
[data-theme="industrial"] .confirm-icon-danger { background: rgba(239,68,68,0.15); }
|
|
[data-theme="industrial"] .confirm-icon-warning { background: rgba(234,179,8,0.15); }
|
|
[data-theme="industrial"] .confirm-icon-success { background: rgba(34,197,94,0.15); }
|
|
|
|
.confirm-title {
|
|
font-family: var(--font-heading);
|
|
font-size: var(--text-h4);
|
|
font-weight: var(--heading-weight-secondary);
|
|
text-align: center; margin-bottom: var(--space-2);
|
|
}
|
|
.confirm-text {
|
|
font-size: var(--text-body);
|
|
color: var(--color-text-secondary);
|
|
text-align: center; margin-bottom: var(--space-6);
|
|
line-height: var(--leading-body);
|
|
}
|
|
.confirm-actions {
|
|
display: flex; gap: var(--space-3); justify-content: center;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="theme-switcher">
|
|
<button class="active" onclick="setTheme('industrial')">Industrial Robusto</button>
|
|
<button onclick="setTheme('modern')">Tecnico Moderno</button>
|
|
</div>
|
|
|
|
<h1>Modals & Dialogs</h1>
|
|
<p class="subtitle">Modales, dialogs de confirmacion y formularios overlay para el sistema POS.</p>
|
|
|
|
<!-- Trigger Buttons -->
|
|
<section>
|
|
<h2>Abrir Modales (Demo Interactivo)</h2>
|
|
<p class="label-text">Haz clic para ver los modales en accion con overlay real</p>
|
|
<div class="trigger-row">
|
|
<button class="btn btn-primary" onclick="openModal('modal-product')">Agregar Producto</button>
|
|
<button class="btn btn-secondary" onclick="openModal('modal-client')">Nuevo Cliente</button>
|
|
<button class="btn btn-danger" onclick="openModal('modal-delete')">Eliminar Producto</button>
|
|
<button class="btn btn-ghost" onclick="openModal('modal-confirm-sale')">Confirmar Venta</button>
|
|
<button class="btn btn-ghost" onclick="openModal('modal-success')">Venta Exitosa</button>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Inline Previews -->
|
|
<section>
|
|
<h2>Modal: Agregar Producto</h2>
|
|
<p class="label-text">Formulario de producto con campos tipicos del inventario POS</p>
|
|
<div class="modal-preview">
|
|
<div class="modal" style="margin: 0 auto;">
|
|
<div class="modal-header">
|
|
<h2>Agregar Producto</h2>
|
|
<button class="modal-close">✕</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4);">
|
|
<div class="form-group" style="grid-column: span 2;">
|
|
<label>Nombre del producto</label>
|
|
<input class="input" type="text" placeholder="Ej: Balatas Ceramicas Brembo">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>SKU</label>
|
|
<input class="input input-mono" type="text" placeholder="BRM-BLT-001">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Numero OEM</label>
|
|
<input class="input input-mono" type="text" placeholder="P68064N">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Categoria</label>
|
|
<select class="select">
|
|
<option>Selecciona...</option>
|
|
<option>Frenos</option>
|
|
<option>Motor</option>
|
|
<option>Suspension</option>
|
|
<option>Encendido</option>
|
|
<option>Filtracion</option>
|
|
<option>Electrico</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Marca</label>
|
|
<select class="select">
|
|
<option>Selecciona...</option>
|
|
<option>Brembo</option>
|
|
<option>Bosch</option>
|
|
<option>Monroe</option>
|
|
<option>NGK</option>
|
|
<option>Gates</option>
|
|
<option>Mobil</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Precio de compra</label>
|
|
<input class="input input-mono" type="text" placeholder="$0.00">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Precio de venta</label>
|
|
<input class="input input-mono" type="text" placeholder="$0.00">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Stock inicial</label>
|
|
<input class="input input-mono" type="number" value="0" min="0">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Stock minimo (alerta)</label>
|
|
<input class="input input-mono" type="number" value="5" min="0">
|
|
</div>
|
|
<div class="form-group" style="grid-column: span 2;">
|
|
<label>Compatibilidad vehicular</label>
|
|
<textarea class="input" placeholder="Ej: Nissan Sentra 2019-2024, Nissan Versa 2020-2024"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-ghost btn-sm">Cancelar</button>
|
|
<button class="btn btn-primary btn-sm">Guardar Producto</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Modal: Nuevo Cliente</h2>
|
|
<p class="label-text">Formulario rapido para registrar un cliente nuevo</p>
|
|
<div class="modal-preview">
|
|
<div class="modal" style="margin: 0 auto;">
|
|
<div class="modal-header">
|
|
<h2>Nuevo Cliente</h2>
|
|
<button class="modal-close">✕</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4);">
|
|
<div class="form-group" style="grid-column: span 2;">
|
|
<label>Nombre / Razon Social</label>
|
|
<input class="input" type="text" placeholder="Nombre completo o razon social">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>RFC</label>
|
|
<input class="input input-mono" type="text" placeholder="XAXX010101000">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Tipo de cliente</label>
|
|
<select class="select">
|
|
<option>Publico General</option>
|
|
<option>Taller Mecanico</option>
|
|
<option>Refaccionaria</option>
|
|
<option>Mayoreo</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Telefono</label>
|
|
<input class="input" type="tel" placeholder="(000) 000-0000">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Email</label>
|
|
<input class="input" type="email" placeholder="correo@ejemplo.com">
|
|
</div>
|
|
<div class="form-group" style="grid-column: span 2;">
|
|
<label>Direccion</label>
|
|
<input class="input" type="text" placeholder="Calle, numero, colonia, CP">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-ghost btn-sm">Cancelar</button>
|
|
<button class="btn btn-primary btn-sm">Registrar Cliente</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Dialog: Confirmacion de Eliminacion</h2>
|
|
<p class="label-text">Confirmacion destructiva — requiere accion explicita del usuario</p>
|
|
<div class="modal-preview">
|
|
<div class="modal modal-sm" style="margin: 0 auto;">
|
|
<div class="modal-body" style="padding: var(--space-8) var(--space-6);">
|
|
<div class="confirm-icon confirm-icon-danger">⚠</div>
|
|
<div class="confirm-title">Eliminar Producto</div>
|
|
<div class="confirm-text">
|
|
Estas a punto de eliminar <strong>Balatas Ceramicas Brembo</strong> (BRM-BLT-P68064N) del inventario. Esta accion no se puede deshacer.
|
|
</div>
|
|
<div class="confirm-actions">
|
|
<button class="btn btn-ghost">Cancelar</button>
|
|
<button class="btn btn-danger">Eliminar</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Dialog: Confirmar Venta</h2>
|
|
<p class="label-text">Confirmacion antes de procesar el cobro</p>
|
|
<div class="modal-preview">
|
|
<div class="modal modal-sm" style="margin: 0 auto;">
|
|
<div class="modal-body" style="padding: var(--space-8) var(--space-6);">
|
|
<div class="confirm-icon confirm-icon-warning">💰</div>
|
|
<div class="confirm-title">Confirmar Cobro</div>
|
|
<div class="confirm-text">
|
|
Total a cobrar: <strong style="color: var(--color-text-accent); font-family: var(--font-mono); font-size: var(--text-h4);">$3,680.00</strong><br>
|
|
<span style="font-size: var(--text-body-sm);">4 productos · Taller El Rapido · Credito</span>
|
|
</div>
|
|
<div class="confirm-actions">
|
|
<button class="btn btn-ghost">Regresar</button>
|
|
<button class="btn btn-primary">Cobrar</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Dialog: Venta Exitosa</h2>
|
|
<p class="label-text">Feedback positivo despues de completar una venta</p>
|
|
<div class="modal-preview">
|
|
<div class="modal modal-sm" style="margin: 0 auto;">
|
|
<div class="modal-body" style="padding: var(--space-8) var(--space-6);">
|
|
<div class="confirm-icon confirm-icon-success">✓</div>
|
|
<div class="confirm-title">Venta Completada</div>
|
|
<div class="confirm-text">
|
|
Folio: <strong style="font-family: var(--font-mono);">V-2026-0847</strong><br>
|
|
Ticket enviado por WhatsApp al cliente.
|
|
</div>
|
|
<div class="confirm-actions">
|
|
<button class="btn btn-ghost">Imprimir Ticket</button>
|
|
<button class="btn btn-primary">Nueva Venta</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Real Overlays (triggered by buttons) -->
|
|
<div class="modal-overlay" id="modal-product" onclick="closeModal(event, 'modal-product')">
|
|
<div class="modal" onclick="event.stopPropagation()">
|
|
<div class="modal-header">
|
|
<h2>Agregar Producto</h2>
|
|
<button class="modal-close" onclick="closeModalById('modal-product')">✕</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4);">
|
|
<div class="form-group" style="grid-column: span 2;">
|
|
<label>Nombre del producto</label>
|
|
<input class="input" type="text" placeholder="Ej: Balatas Ceramicas Brembo">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>SKU</label>
|
|
<input class="input input-mono" type="text" placeholder="BRM-BLT-001">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Precio de venta</label>
|
|
<input class="input input-mono" type="text" placeholder="$0.00">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-ghost btn-sm" onclick="closeModalById('modal-product')">Cancelar</button>
|
|
<button class="btn btn-primary btn-sm">Guardar</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-overlay" id="modal-client" onclick="closeModal(event, 'modal-client')">
|
|
<div class="modal" onclick="event.stopPropagation()">
|
|
<div class="modal-header">
|
|
<h2>Nuevo Cliente</h2>
|
|
<button class="modal-close" onclick="closeModalById('modal-client')">✕</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4);">
|
|
<div class="form-group" style="grid-column: span 2;">
|
|
<label>Nombre / Razon Social</label>
|
|
<input class="input" type="text" placeholder="Nombre completo">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>RFC</label>
|
|
<input class="input input-mono" type="text" placeholder="XAXX010101000">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Telefono</label>
|
|
<input class="input" type="tel" placeholder="(000) 000-0000">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-ghost btn-sm" onclick="closeModalById('modal-client')">Cancelar</button>
|
|
<button class="btn btn-primary btn-sm">Registrar</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-overlay" id="modal-delete" onclick="closeModal(event, 'modal-delete')">
|
|
<div class="modal modal-sm" onclick="event.stopPropagation()">
|
|
<div class="modal-body" style="padding: var(--space-8) var(--space-6);">
|
|
<div class="confirm-icon confirm-icon-danger">⚠</div>
|
|
<div class="confirm-title">Eliminar Producto</div>
|
|
<div class="confirm-text">Esta accion no se puede deshacer. El producto sera eliminado permanentemente.</div>
|
|
<div class="confirm-actions">
|
|
<button class="btn btn-ghost" onclick="closeModalById('modal-delete')">Cancelar</button>
|
|
<button class="btn btn-danger" onclick="closeModalById('modal-delete')">Eliminar</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-overlay" id="modal-confirm-sale" onclick="closeModal(event, 'modal-confirm-sale')">
|
|
<div class="modal modal-sm" onclick="event.stopPropagation()">
|
|
<div class="modal-body" style="padding: var(--space-8) var(--space-6);">
|
|
<div class="confirm-icon confirm-icon-warning">💰</div>
|
|
<div class="confirm-title">Confirmar Cobro</div>
|
|
<div class="confirm-text">Total: <strong style="color: var(--color-text-accent); font-family: var(--font-mono); font-size: var(--text-h4);">$3,680.00</strong></div>
|
|
<div class="confirm-actions">
|
|
<button class="btn btn-ghost" onclick="closeModalById('modal-confirm-sale')">Regresar</button>
|
|
<button class="btn btn-primary" onclick="closeModalById('modal-confirm-sale')">Cobrar</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-overlay" id="modal-success" onclick="closeModal(event, 'modal-success')">
|
|
<div class="modal modal-sm" onclick="event.stopPropagation()">
|
|
<div class="modal-body" style="padding: var(--space-8) var(--space-6);">
|
|
<div class="confirm-icon confirm-icon-success">✓</div>
|
|
<div class="confirm-title">Venta Completada</div>
|
|
<div class="confirm-text">Folio: <strong style="font-family: var(--font-mono);">V-2026-0847</strong></div>
|
|
<div class="confirm-actions">
|
|
<button class="btn btn-ghost" onclick="closeModalById('modal-success')">Imprimir</button>
|
|
<button class="btn btn-primary" onclick="closeModalById('modal-success')">Nueva Venta</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function setTheme(theme) {
|
|
document.documentElement.setAttribute('data-theme', theme);
|
|
document.querySelectorAll('.theme-switcher button').forEach(btn => {
|
|
btn.classList.toggle('active', btn.textContent.toLowerCase().includes(theme === 'industrial' ? 'industrial' : 'tecnico'));
|
|
});
|
|
}
|
|
|
|
function openModal(id) {
|
|
document.getElementById(id).classList.add('active');
|
|
document.body.style.overflow = 'hidden';
|
|
}
|
|
|
|
function closeModal(event, id) {
|
|
if (event.target === event.currentTarget) closeModalById(id);
|
|
}
|
|
|
|
function closeModalById(id) {
|
|
document.getElementById(id).classList.remove('active');
|
|
document.body.style.overflow = '';
|
|
}
|
|
|
|
document.addEventListener('keydown', (e) => {
|
|
if (e.key === 'Escape') {
|
|
document.querySelectorAll('.modal-overlay.active').forEach(overlay => {
|
|
overlay.classList.remove('active');
|
|
});
|
|
document.body.style.overflow = '';
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|