refactor(webui): colocate composer palette and automation calendar styles

This commit is contained in:
chengyongru authored and chengyongru committed 2026-11-20 23:35:38 +08:00
1 parent 09384cab26
commit 6057ce59e5
6 files changed
+82 -74

No files matched your search

@@ -8,6 +8,7 @@ import { formControlFocusClassName } from "@/components/ui/form-control";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import type { SessionAutomationJob } from "@/lib/types";
import { cn } from "@/lib/utils";
import "./automation-calendar.css";
type CalendarEntry = {
id: string;
@@ -0,0 +1,29 @@
.automation-calendar-grid { display: none; }
.automation-calendar-agenda { display: block; }
@container automations (min-width: 44rem) {
.automation-calendar-grid { display: block; }
.automation-calendar-agenda { display: none; }
.automation-calendar-weekdays {
display: grid;
grid-template-columns: repeat(7, minmax(0, 1fr));
}
.automation-calendar-weekdays > div {
padding: 8px 10px;
color: hsl(var(--muted-foreground));
font-size: 10px;
line-height: 16px;
text-align: end;
}
.automation-calendar-month {
display: grid;
grid-template-columns: repeat(7, minmax(0, 1fr));
}
.automation-calendar-day {
min-block-size: 112px;
min-inline-size: 0;
border-inline-end: 1px solid hsl(var(--border) / 0.55);
border-block-end: 1px solid hsl(var(--border) / 0.55);
}
.automation-calendar-day:nth-child(7n) { border-inline-end: 0; }
.automation-calendar-day:nth-last-child(-n + 7) { border-block-end: 0; }
}
@@ -21,6 +21,7 @@ import { logoFallbackUrls } from "@/lib/provider-brand";
import { sessionHandleColor } from "@/lib/session-handle";
import type { SessionMention } from "@/lib/types";
import { cn } from "@/lib/utils";
import "./composer-palette.css";
const PALETTE_CHROME_PX = 12;
@@ -0,0 +1,49 @@
@keyframes composer-palette-enter {
from {
opacity: 0;
transform: translateY(var(--palette-enter-y, 4px)) scale(0.985);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes composer-palette-preview-in {
from {
opacity: 0.55;
transform: translateY(2px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.composer-palette-surface {
--palette-enter-y: 4px;
transform-origin: bottom center;
animation: composer-palette-enter 130ms cubic-bezier(0.16, 1, 0.3, 1);
}
.composer-palette-surface[data-placement="below"] {
--palette-enter-y: -4px;
transform-origin: top center;
}
.composer-palette-surface[data-placement="beside"] {
--palette-enter-y: 0px;
transform-origin: left center;
}
.composer-palette-preview-body {
animation: composer-palette-preview-in 110ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
.composer-palette-surface, .composer-palette-preview-body { animation: none; }
}
@media (forced-colors: active) {
.composer-palette-surface { outline: 1px solid CanvasText; }
}