refactor webui dashboard layout
This commit is contained in:
1 parent
5a51c951a2
commit
eea0c48a44
12 files changed
+3266
-869
No files matched your search
@@ -0,0 +1,148 @@
|
||||
/* Toast component split from components.css */
|
||||
|
||||
/* ==================== Toast ==================== */
|
||||
.toastContainer {
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
max-width: min(420px, calc(100vw - 40px));
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.toast {
|
||||
display: grid;
|
||||
grid-template-columns: 22px 1fr auto;
|
||||
align-items: start;
|
||||
gap: 10px;
|
||||
padding: 12px 12px 12px 16px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--surface);
|
||||
color: var(--text);
|
||||
font-size: var(--text-sm);
|
||||
line-height: var(--leading-snug);
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
|
||||
pointer-events: auto;
|
||||
animation: toastIn 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:root[data-theme="dark"] .toast {
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.toast::before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 3px;
|
||||
content: "";
|
||||
background: linear-gradient(180deg, var(--muted-soft), color-mix(in oklab, var(--muted-soft) 40%, transparent));
|
||||
}
|
||||
|
||||
.toast-success {
|
||||
border-color: color-mix(in oklab, var(--success) 30%, var(--border));
|
||||
}
|
||||
.toast-success::before { background: linear-gradient(180deg, var(--success), color-mix(in oklab, var(--success) 30%, transparent)); }
|
||||
.toast-success .toastIcon {
|
||||
color: var(--success);
|
||||
background: color-mix(in oklab, var(--success) 12%, transparent);
|
||||
box-shadow: 0 0 10px -2px color-mix(in oklab, var(--success) 60%, transparent);
|
||||
}
|
||||
|
||||
.toast-error {
|
||||
border-color: color-mix(in oklab, var(--danger) 30%, var(--border));
|
||||
}
|
||||
.toast-error::before { background: linear-gradient(180deg, var(--danger), color-mix(in oklab, var(--danger) 30%, transparent)); }
|
||||
.toast-error .toastIcon {
|
||||
color: var(--danger);
|
||||
background: color-mix(in oklab, var(--danger) 12%, transparent);
|
||||
box-shadow: 0 0 10px -2px color-mix(in oklab, var(--danger) 60%, transparent);
|
||||
}
|
||||
|
||||
.toast-warn {
|
||||
border-color: color-mix(in oklab, var(--warning) 30%, var(--border));
|
||||
}
|
||||
.toast-warn::before { background: linear-gradient(180deg, var(--warning), color-mix(in oklab, var(--warning) 30%, transparent)); }
|
||||
.toast-warn .toastIcon {
|
||||
color: var(--warning);
|
||||
background: color-mix(in oklab, var(--warning) 12%, transparent);
|
||||
box-shadow: 0 0 10px -2px color-mix(in oklab, var(--warning) 60%, transparent);
|
||||
}
|
||||
|
||||
.toast-info::before { background: linear-gradient(180deg, var(--primary), var(--secondary)); }
|
||||
.toast-info .toastIcon {
|
||||
color: var(--primary);
|
||||
background: color-mix(in oklab, var(--primary) 14%, transparent);
|
||||
box-shadow: 0 0 10px -2px color-mix(in oklab, var(--primary) 60%, transparent);
|
||||
}
|
||||
|
||||
.toastIcon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
margin-top: 0;
|
||||
border-radius: 50%;
|
||||
flex: 0 0 22px;
|
||||
}
|
||||
|
||||
.toastIcon svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.toastBody {
|
||||
min-width: 0;
|
||||
color: var(--text);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.toastClose {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
margin: -2px -2px 0 4px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--muted-soft);
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
transition: background var(--motion-fast), color var(--motion-fast);
|
||||
}
|
||||
|
||||
.toastClose:hover {
|
||||
color: var(--primary);
|
||||
background: color-mix(in oklab, var(--primary-soft) 60%, transparent);
|
||||
box-shadow: 0 0 10px -2px color-mix(in oklab, var(--primary) 45%, transparent);
|
||||
}
|
||||
|
||||
.toast.isLeaving {
|
||||
animation: toastOut 220ms ease forwards;
|
||||
}
|
||||
|
||||
@keyframes toastIn {
|
||||
from { opacity: 0; transform: translateY(8px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@keyframes toastOut {
|
||||
to { opacity: 0; transform: translateY(-4px); }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.toast,
|
||||
.toast.isLeaving {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user