This commit is contained in:
Tizian.Breuch
2025-09-08 12:11:30 +02:00
parent 99dee65a79
commit dd4e2b7d9d
7 changed files with 672 additions and 25 deletions

View File

@@ -831,3 +831,448 @@ body.dark-theme .pill-info {
width: 100%;
}
}
/* =================================================================================
* 10. ERWEITERTE UI-KOMPONENTEN-BIBLIOTHEK (TEIL 2)
* ================================================================================= */
/* -------------------------------------------------- */
/* 10.1 DIALOG / MODAL
/* -------------------------------------------------- */
.dialog-backdrop {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: grid;
place-items: center;
z-index: 1000;
opacity: 1; /* Für Animationen anpassen */
transition: opacity var(--transition-speed);
}
.dialog-container {
width: 100%;
max-width: 500px; /* Standardbreite für Dialoge */
display: flex;
flex-direction: column;
box-shadow: var(--box-shadow-md);
/* Animation: von leicht unten nach oben sliden */
transform: translateY(0);
transition: transform var(--transition-speed);
}
.dialog-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--color-border);
}
.dialog-title {
font-size: 1.25rem;
font-weight: 600;
margin-bottom: 0;
}
.dialog-content {
padding: 1.5rem;
line-height: 1.7;
}
.dialog-actions {
display: flex;
justify-content: flex-end;
gap: 0.75rem;
padding: 1rem 1.5rem;
border-top: 1px solid var(--color-border);
background-color: var(--color-body-bg);
}
/* -------------------------------------------------- */
/* 10.2 SNACKBAR / TOAST
/* -------------------------------------------------- */
@keyframes snackbar-in {
from { transform: translate(-50%, 100px); opacity: 0; }
to { transform: translate(-50%, 0); opacity: 1; }
}
.snackbar {
position: fixed;
bottom: 2rem;
left: 50%;
transform: translateX(-50%);
min-width: 300px;
max-width: 500px;
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
padding: 0.75rem 1.25rem;
border-radius: var(--border-radius-md);
background-color: #2c3e50; /* Typischerweise dunkel */
color: #fff;
box-shadow: var(--box-shadow-md);
z-index: 1050;
animation: snackbar-in 0.3s ease-out;
}
body.dark-theme .snackbar {
background-color: var(--color-surface);
color: var(--color-text);
border: 1px solid var(--color-border);
}
.snackbar-action {
color: var(--color-primary);
font-weight: 600;
}
body.dark-theme .snackbar-action {
color: #60a5fa; /* Helleres Blau für Dark Mode */
}
/* -------------------------------------------------- */
/* 10.3 MENU / DROPDOWN
/* -------------------------------------------------- */
.menu-container {
position: relative;
display: inline-block;
}
.menu-panel {
position: absolute;
top: calc(100% + 8px); /* Etwas Abstand zum Auslöser */
right: 0;
min-width: 200px;
padding: 0.5rem 0;
z-index: 900;
border: 1px solid var(--color-border);
box-shadow: var(--box-shadow-md);
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
transition: opacity var(--transition-speed), transform var(--transition-speed);
}
/* Zustand, wenn das Menü offen ist (z.B. durch eine JS-Klasse) */
.menu-container.open .menu-panel {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.menu-item {
display: block;
padding: 0.6rem 1.25rem;
color: var(--color-text);
text-decoration: none;
font-size: 0.95rem;
transition: background-color 0.2s ease-out;
}
.menu-item:hover {
background-color: var(--color-body-bg);
}
.menu-item-danger {
color: var(--color-danger);
}
/* -------------------------------------------------- */
/* 10.4 SKELETON LOADER
/* -------------------------------------------------- */
@keyframes skeleton-shimmer {
0% { background-position: -200px 0; }
100% { background-position: calc(200px + 100%) 0; }
}
.skeleton-item {
background-color: var(--color-border);
background-image: linear-gradient(
90deg,
var(--color-border) 0px,
var(--color-body-bg) 40px,
var(--color-border) 80px
);
background-size: 200px 100%;
background-repeat: no-repeat;
animation: skeleton-shimmer 1.5s infinite;
}
.skeleton-card {
display: flex;
align-items: center;
gap: 1rem;
}
.skeleton-avatar {
width: 50px;
height: 50px;
border-radius: 50%;
}
.skeleton-content {
flex-grow: 1;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.skeleton-line {
width: 100%;
height: 1rem;
border-radius: var(--border-radius-sm);
}
/* -------------------------------------------------- */
/* 10.5 STEPPER
/* -------------------------------------------------- */
.stepper {
display: flex;
align-items: center;
width: 100%;
}
.step {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
color: var(--color-text-light);
font-weight: 500;
font-size: 0.9rem;
}
.step-icon {
width: 32px;
height: 32px;
border-radius: 50%;
border: 2px solid var(--color-border);
display: grid;
place-items: center;
font-weight: bold;
transition: all var(--transition-speed);
}
.step.step-active {
color: var(--color-primary);
}
.step.step-active .step-icon {
border-color: var(--color-primary);
color: var(--color-primary);
}
.step.step-complete {
color: var(--color-text);
}
.step.step-complete .step-icon {
background-color: var(--color-primary);
border-color: var(--color-primary);
color: #fff;
}
.step-connector {
flex-grow: 1;
height: 2px;
background-color: var(--color-border);
margin: 0 1rem;
transform: translateY(-12px); /* Auf Höhe der Icons ausrichten */
}
/* -------------------------------------------------- */
/* 10.6 PAGINATOR
/* -------------------------------------------------- */
.paginator {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 1.5rem;
padding: 1rem;
border-top: 1px solid var(--color-border);
}
.paginator-info {
font-size: 0.9rem;
color: var(--color-text-light);
font-weight: 500;
}
.paginator-controls {
display: flex;
gap: 0.5rem;
}
/* -------------------------------------------------- */
/* 10.7 TREE
/* -------------------------------------------------- */
.tree {
list-style: none;
padding-left: 1rem;
}
.tree-node {
position: relative;
}
.tree-node-label {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.4rem 0.5rem;
border-radius: var(--border-radius-sm);
cursor: pointer;
}
.tree-node-label:hover {
background-color: var(--color-body-bg);
}
.tree-node details > summary::-webkit-details-marker {
display: none; /* Icon entfernen */
}
.tree-node details > summary {
list-style: none;
}
.tree-node details > summary::before { /* Chevron-Icon */
content: '▶';
display: inline-block;
font-size: 0.7rem;
margin-right: 0.5rem;
transition: transform 0.2s ease-out;
}
.tree-node details[open] > summary::before {
transform: rotate(90deg);
}
.tree-node-children {
list-style: none;
padding-left: 1.75rem;
position: relative;
}
/* Verbindungs-Linie */
.tree-node-children::before {
content: '';
position: absolute;
left: 8px;
top: 0;
bottom: 0;
width: 1px;
background-color: var(--color-border);
}
/* =================================================================================
* 11. VERBESSERTES DIALOG-STYLING & HELFER-KLASSEN
* ================================================================================= */
/* Verhindert das Scrollen des Body, wenn ein Overlay aktiv ist */
body.no-scroll {
overflow: hidden;
}
/* Neuer Button-Typ für gefährliche Aktionen */
.btn-icon-danger:hover {
background-color: #fee2e2; /* Rötlicher Hover-Effekt */
color: var(--color-danger);
}
body.dark-theme .btn-icon-danger:hover {
background-color: #991b1b;
}
/* Verbessertes Dialog-Styling */
.dialog-backdrop {
/* ... bestehende Regeln (position: fixed, z-index etc.) bleiben gleich ... */
backdrop-filter: blur(4px); /* Moderner Blur-Effekt */
}
.dialog-container {
/* ... bestehende Regeln (max-width, display: flex etc.) bleiben gleich ... */
border-radius: var(--border-radius-md);
border: 1px solid var(--color-border);
}
/* Icon-Styling innerhalb des Dialogs */
.dialog-content {
text-align: center; /* Zentriert den Inhalt für einen besseren Look */
}
.dialog-icon-container {
width: 64px;
height: 64px;
margin: 0 auto 1rem auto;
border-radius: 50%;
display: grid;
place-items: center;
background-color: #fee2e2; /* Roter Hintergrund für das Icon */
color: var(--color-danger);
}
body.dark-theme .dialog-icon-container {
background-color: #7f1d1d;
}
.dialog-content p {
font-size: 1rem;
color: var(--color-text-light);
}
.dialog-content strong {
color: var(--color-text);
font-weight: 600;
}
/* =================================================================================
* 12. VERBESSERTES SNACKBAR-STYLING
* ================================================================================= */
.snackbar {
position: fixed;
bottom: 2rem;
left: 50%;
transform: translateX(-50%); /* Startposition für Animation */
min-width: 320px;
max-width: 500px;
display: flex;
align-items: center;
gap: 1rem;
padding: 0.75rem; /* Etwas weniger Padding, da der Button eigenes hat */
border-radius: var(--border-radius-md);
background-color: var(--color-surface);
color: var(--color-text);
border: 1px solid var(--color-border);
box-shadow: var(--box-shadow-md);
z-index: 1050;
}
/* Der @keyframes-Block wird nicht mehr benötigt, da wir Angular Animations nutzen */
.snackbar-icon-container {
flex-shrink: 0; /* Verhindert, dass das Icon schrumpft */
width: 32px;
height: 32px;
border-radius: 50%;
display: grid;
place-items: center;
background-color: #dcfce7; /* Success-Farbe */
color: #166534;
}
body.dark-theme .snackbar-icon-container {
background-color: #166534;
color: #dcfce7;
}
.snackbar-message {
flex-grow: 1; /* Nimmt den verfügbaren Platz ein */
font-weight: 500;
}
.snackbar-close-btn {
flex-shrink: 0;
width: 32px;
height: 32px;
font-size: 1.5rem; /* Größeres "x" */
color: var(--color-text-light);
}
.snackbar-close-btn:hover {
background-color: var(--color-body-bg);
}