diff --git a/calliope-web/src/lib/components/ToastHost.svelte b/calliope-web/src/lib/components/ToastHost.svelte index 95407cc2..40debcac 100644 --- a/calliope-web/src/lib/components/ToastHost.svelte +++ b/calliope-web/src/lib/components/ToastHost.svelte @@ -52,15 +52,16 @@ {/if} diff --git a/calliope-web/src/lib/components/ui/Card.svelte b/calliope-web/src/lib/components/ui/Card.svelte index c9fe7016..a95c2521 100644 --- a/calliope-web/src/lib/components/ui/Card.svelte +++ b/calliope-web/src/lib/components/ui/Card.svelte @@ -46,16 +46,18 @@ .card { background: var(--bg-surface); border: 1px solid var(--border); - border-radius: var(--radius-md); + border-radius: var(--r-lg); } .card.hoverable { transition: - border-color 150ms ease, - transform 150ms ease; + border-color var(--d-state) ease, + transform var(--d-state) var(--ease-out); } - .card.hoverable:hover { - border-color: #3f3f46; - transform: translateY(-1px); + @media (hover: hover) and (pointer: fine) { + .card.hoverable:hover { + border-color: var(--line-2); + transform: translateY(-1px); + } } .card-header { display: flex; diff --git a/calliope-web/src/lib/components/ui/ConfirmDialog.svelte b/calliope-web/src/lib/components/ui/ConfirmDialog.svelte index e4b2da96..167435d0 100644 --- a/calliope-web/src/lib/components/ui/ConfirmDialog.svelte +++ b/calliope-web/src/lib/components/ui/ConfirmDialog.svelte @@ -47,7 +47,7 @@ {#snippet footer()} - {/snippet} diff --git a/calliope-web/src/lib/components/ui/Modal.svelte b/calliope-web/src/lib/components/ui/Modal.svelte index aa96a894..b466b2ca 100644 --- a/calliope-web/src/lib/components/ui/Modal.svelte +++ b/calliope-web/src/lib/components/ui/Modal.svelte @@ -144,22 +144,19 @@ align-items: center; justify-content: center; padding: 24px; - background: rgba(5, 5, 8, 0.6); - backdrop-filter: blur(6px); - -webkit-backdrop-filter: blur(6px); - animation: modal-fade 150ms ease-out; + background: var(--overlay); + animation: modal-fade var(--d-state) ease-out; } .modal-panel { width: min(520px, 100%); max-height: calc(100vh - 96px); display: flex; flex-direction: column; - background: var(--bg-surface); - border: 1px solid var(--border); - border-radius: var(--radius-lg); - box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5); + background: var(--float-bg); + border-radius: var(--r-lg); + box-shadow: var(--shadow-float); outline: none; - animation: modal-rise 180ms ease-out; + animation: modal-rise var(--d-pop) var(--ease-out); } .modal-panel.size-lg { width: min(920px, 100%); @@ -177,7 +174,7 @@ .modal-title { margin: 0; font-family: var(--font-display); - font-size: 16px; + font-size: var(--fs-title); font-weight: 600; color: var(--text-primary); } @@ -194,12 +191,14 @@ color: var(--text-muted); cursor: pointer; transition: - background-color 150ms ease, - color 150ms ease; + background-color var(--d-state) ease, + color var(--d-state) ease; } - .modal-close:hover { - background: rgba(255, 255, 255, 0.06); - color: var(--text-primary); + @media (hover: hover) and (pointer: fine) { + .modal-close:hover { + background: var(--bg-4); + color: var(--text-primary); + } } .modal-close:focus-visible { outline: 2px solid var(--accent); diff --git a/calliope-web/src/lib/components/ui/ProgressBar.svelte b/calliope-web/src/lib/components/ui/ProgressBar.svelte index e293356b..48f64a51 100644 --- a/calliope-web/src/lib/components/ui/ProgressBar.svelte +++ b/calliope-web/src/lib/components/ui/ProgressBar.svelte @@ -4,8 +4,8 @@ indeterminate?: boolean; label?: string; size?: 'sm' | 'md'; - /** §5 进度条: running = amber, done = green, failed = red (static). */ - tone?: 'accent' | 'success' | 'error'; + /** 进度条: running = 信号青, done = green, failed = red (static). */ + tone?: 'run' | 'success' | 'error'; /** Track only — no label / percentage row. */ bare?: boolean; } @@ -15,7 +15,7 @@ indeterminate = false, label, size = 'md', - tone = 'accent', + tone = 'run', bare = false, }: Props = $props(); @@ -45,7 +45,7 @@ {#if indeterminate}
{:else} -
+
{/if} @@ -75,8 +75,8 @@ position: relative; width: 100%; overflow: hidden; - background: var(--surface-3); - border-radius: 999px; + background: var(--bg-4); + border-radius: var(--r-pill); } .progress-sm .track { height: 4px; @@ -86,15 +86,18 @@ } .fill { height: 100%; - background: var(--accent); - border-radius: 999px; - transition: width 300ms cubic-bezier(0.16, 1, 0.3, 1); + background: var(--run-grad); + box-shadow: 0 0 8px var(--run-soft); + transform-origin: left; + transition: transform var(--d-progress) linear; } .tone-success .fill { - background: var(--success); + background: var(--ok); + box-shadow: none; } .tone-error .fill { - background: var(--error); + background: var(--err); + box-shadow: none; } .fill.indeterminate { position: absolute; @@ -104,10 +107,11 @@ background: linear-gradient( 90deg, transparent, - var(--accent) 40%, - var(--accent) 60%, + var(--run) 40%, + var(--run) 60%, transparent ); + box-shadow: none; transition: none; animation: progress-slide 1.2s ease-in-out infinite; } diff --git a/calliope-web/src/lib/components/ui/Skeleton.svelte b/calliope-web/src/lib/components/ui/Skeleton.svelte index b5653c13..ce9c676b 100644 --- a/calliope-web/src/lib/components/ui/Skeleton.svelte +++ b/calliope-web/src/lib/components/ui/Skeleton.svelte @@ -19,36 +19,26 @@ > diff --git a/calliope-web/src/lib/components/ui/StatusChip.svelte b/calliope-web/src/lib/components/ui/StatusChip.svelte index dd3c0f6a..2eb45d2c 100644 --- a/calliope-web/src/lib/components/ui/StatusChip.svelte +++ b/calliope-web/src/lib/components/ui/StatusChip.svelte @@ -6,27 +6,27 @@ let { status, label }: Props = $props(); - type Tone = 'success' | 'info' | 'muted' | 'error' | 'warning' | 'accent'; + type Tone = 'ok' | 'run' | 'muted' | 'err' | 'warn'; const toneByStatus: Record = { - ready: 'success', - done: 'success', - completed: 'success', - running: 'info', - generating: 'info', - queued: 'info', + ready: 'ok', + done: 'ok', + completed: 'ok', + running: 'run', + generating: 'run', + in_progress: 'run', + queued: 'muted', pending: 'muted', idle: 'muted', draft: 'muted', - failed: 'error', - error: 'error', - paused: 'warning', - in_progress: 'accent', + failed: 'err', + error: 'err', + paused: 'warn', }; const key = $derived(status.trim().toLowerCase()); const tone: Tone = $derived(toneByStatus[key] ?? 'muted'); - const pulsing = $derived(key === 'running'); + const pulsing = $derived(tone === 'run'); @@ -35,59 +35,48 @@ diff --git a/calliope-web/src/lib/components/ui/Switch.svelte b/calliope-web/src/lib/components/ui/Switch.svelte index 7d6e74c2..d8aaa429 100644 --- a/calliope-web/src/lib/components/ui/Switch.svelte +++ b/calliope-web/src/lib/components/ui/Switch.svelte @@ -9,7 +9,7 @@ let { checked, label, disabled = false, onchange }: Props = $props(); - +