diff --git a/app/globals.css b/app/globals.css index 823b486..53f3b85 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,6 +1,7 @@ @import "tailwindcss"; :root { + --app-bg: #f6f1e8; --bg-canvas: #f6f1e8; --bg-canvas-strong: #efe5d7; --bg-elevated: rgba(255, 250, 243, 0.86); @@ -23,6 +24,9 @@ --border-strong: rgba(82, 71, 57, 0.24); --shadow-shell: 0 28px 80px rgba(47, 38, 28, 0.12); --shadow-card: 0 18px 40px rgba(62, 46, 27, 0.08); + --page-gap: 16px; + --panel-radius: 14px; + --control-height: 38px; --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; diff --git a/src/components/layout/dashboard-shell.tsx b/src/components/layout/dashboard-shell.tsx index 590c7fa..228e2ff 100644 --- a/src/components/layout/dashboard-shell.tsx +++ b/src/components/layout/dashboard-shell.tsx @@ -9,38 +9,38 @@ type DashboardShellProps = { export function DashboardShell({ children }: DashboardShellProps) { return ( -
-
+
+
-
{children}
+
{children}
diff --git a/src/components/ui/page-header.tsx b/src/components/ui/page-header.tsx index bd6ecf0..36ec098 100644 --- a/src/components/ui/page-header.tsx +++ b/src/components/ui/page-header.tsx @@ -16,24 +16,24 @@ export function PageHeader({ title, }: PageHeaderProps) { return ( -
-
-

+

+
+

{eyebrow}

-
-

+
+

{title}

{description ? ( -
+
{description}
) : null}
{actions || meta ? ( -
+
{meta ? (
{meta} diff --git a/tests/ui/dashboard-shell.test.tsx b/tests/ui/dashboard-shell.test.tsx index 444cb87..fa6ef44 100644 --- a/tests/ui/dashboard-shell.test.tsx +++ b/tests/ui/dashboard-shell.test.tsx @@ -68,6 +68,15 @@ test("locks the rail to the viewport and makes the content pane independently sc expect(main).toHaveClass("md:h-full", "md:overflow-y-auto"); }); +test("uses a narrow desktop rail and removes the max-width shell cap", () => { + const { container } = render(dashboard body); + const shellFrame = container.firstElementChild; + const rail = screen.getByRole("complementary", { name: "Dashboard rail" }); + + expect(shellFrame).not.toHaveClass("max-w-7xl"); + expect(rail.className).toContain("md:w-[228px]"); +}); + test("redirects the root page to orders", () => { HomePage();