feat: shared modal system + migrate tasks module
- Add public/components/modal.js with focus-trap, escape-handler, overlay-click, focus-restore, scroll-lock, aria-modal (Spec §5.1/§5.2) - Migrate tasks.js from custom modal to shared openModal/closeModal API - Remove .modal-backdrop/.modal/.modal__* styles from tasks.css - Add .modal-panel--sm/--lg sizing variants to layout.css Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -599,6 +599,8 @@
|
||||
border-radius: var(--radius-lg);
|
||||
animation: modal-scale-in 0.2s var(--ease-out) forwards;
|
||||
}
|
||||
.modal-panel--sm { max-width: 400px; }
|
||||
.modal-panel--lg { max-width: 680px; }
|
||||
}
|
||||
|
||||
.modal-panel__header {
|
||||
|
||||
@@ -472,89 +472,6 @@
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------
|
||||
* Task-Modal (Erstellen / Bearbeiten)
|
||||
* -------------------------------------------------------- */
|
||||
.modal-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background-color: var(--color-overlay);
|
||||
z-index: var(--z-modal);
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
animation: backdrop-in 0.2s ease;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.modal-backdrop {
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes backdrop-in {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.modal {
|
||||
background-color: var(--color-surface);
|
||||
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
|
||||
width: 100%;
|
||||
max-height: 92dvh;
|
||||
overflow-y: auto;
|
||||
padding: var(--space-6);
|
||||
padding-bottom: calc(var(--space-6) + var(--safe-area-inset-bottom));
|
||||
animation: modal-in 0.25s ease;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.modal {
|
||||
border-radius: var(--radius-lg);
|
||||
max-width: 540px;
|
||||
max-height: 85dvh;
|
||||
padding-bottom: var(--space-6);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes modal-in {
|
||||
from { transform: translateY(24px); opacity: 0; }
|
||||
to { transform: translateY(0); opacity: 1; }
|
||||
}
|
||||
|
||||
.modal__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
|
||||
.modal__title {
|
||||
font-size: var(--text-xl);
|
||||
font-weight: var(--font-weight-bold);
|
||||
}
|
||||
|
||||
.modal__close {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: var(--radius-full);
|
||||
background-color: var(--color-surface-2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
min-height: unset;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.modal__actions {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
margin-top: var(--space-6);
|
||||
}
|
||||
|
||||
.modal__actions .btn { flex: 1; }
|
||||
|
||||
/* --------------------------------------------------------
|
||||
* Overdue-Badge (Navigation)
|
||||
* -------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user