Comp AI CRM is an open source, CRM designed for AI agents. Agentic-first CRM.
TypeScript
feat(ui): comp design system — flat white, one brand green
grim4d06798968fb
diff --git a/apps/app/app/(app)/dashboard-summary.tsx b/apps/app/app/(app)/dashboard-summary.tsxindex 8a853164..24fd2856 100644--- a/apps/app/app/(app)/dashboard-summary.tsx+++ b/apps/app/app/(app)/dashboard-summary.tsx@@ -142,7 +142,7 @@ export function DashboardSummary() {The largest open deals, and how long each has sat in its stage</CardDescription><CardAction>- <Button asChild variant="ghost" size="sm">+ <Button asChild variant="contrast" size="sm"><Link href="/deals">Open deals</Link></Button></CardAction>@@ -263,7 +263,7 @@ export function DashboardSummary() {: "Every note, task and stage change across the workspace"}</CardDescription><CardAction>- <Button asChild variant="ghost" size="sm">+ <Button asChild variant="contrast" size="sm"><Link href="/companies">All companies</Link></Button></CardAction>diff --git a/apps/app/app/(app)/settings/google-connection.tsx b/apps/app/app/(app)/settings/google-connection.tsxindex 68d2310b..e82fb52d 100644--- a/apps/app/app/(app)/settings/google-connection.tsx+++ b/apps/app/app/(app)/settings/google-connection.tsx@@ -1,11 +1,21 @@"use client";+import Launch from "@carbon/icons-react/es/Launch";+import Warning from "@carbon/icons-react/es/Warning";+import {+ Alert,+ AlertAction,+ AlertDescription,+ AlertTitle,+} from "@crm/ui/components/alert";import { Button } from "@crm/ui/components/button";+import { Icon } from "@crm/ui/components/icon";import { Label } from "@crm/ui/components/label";import { StatusIndicator } from "@crm/ui/components/status-indicator";import { Switch } from "@crm/ui/components/switch";import { relativeTimeFromIso } from "@crm/ui/lib/format";-import { useMutation, useQuery } from "@tanstack/react-query";+import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";+import { useState } from "react";import { toast } from "sonner";import { isSyncing, SYNC_POLL_MS } from "@/components/crm/sync-status";import { useCrmCache } from "@/lib/trpc/cache";@@ -28,9 +38,38 @@ const SOURCES = {},} as const;+function explain(error: string) {+ return {+ summary: error.split(/(?<=\.)\s/)[0] ?? error,+ url: error.match(/https?:\/\/[^\s)]+/)?.[0],+ };+}++/**+ * What is currently wrong, as one comparable string.+ *+ * Keyed by source *and* message so that a check which fixes Gmail and leaves+ * Calendar broken is a different state, not the same one — otherwise half a+ * repair would be reported as no progress at all.+ */+function failureSignature(+ sources: readonly {+ source: string;+ status: string | null;+ lastError: string | null;+ }[],+): string {+ return sources+ .filter((source) => source.status === "NEEDS_RECONNECT" || source.lastError)+ .map((source) => `${source.source}:${source.lastError ?? "reconnect"}`)+ .sort()+ .join("|");+}+export function GoogleConnection() {const trpc = useTRPC();const cache = useCrmCache();+ const queryClient = useQueryClient();const status = useQuery({...trpc.google.status.queryOptions(),@@ -69,9 +108,29 @@ export function GoogleConnection() {}),);+ /*+ * A check that lands on the same failure changes nothing on screen, so the+ * button looks broken rather than the connection. Incrementing this replays+ * the alert's attention animation — the page answering "still here" instead+ * of appearing not to have run.+ */+ const [insistence, setInsistence] = useState(0);+const syncNow = useMutation(trpc.google.syncNow.mutationOptions({- onSuccess: () => cache.google(),+ onSuccess: async () => {+ const before = failureSignature(status.data?.sources ?? []);+ await cache.google();++ // Read the refetched value rather than `status.data`, which is the+ // render's snapshot and is still the pre-check one inside here.+ const after = failureSignature(+ queryClient.getQueryData(trpc.google.status.queryKey())?.sources ??+ [],+ );++ if (after && after === before) setInsistence((count) => count + 1);+ },onError: (error) => toast.error(error.message),}),);@@ -82,7 +141,7 @@ export function GoogleConnection() {// Both scopes come from one grant at sign-in, so "Gmail connected but// Calendar not" is not a state that exists. One section, not one per source.- const broken = sources.find(+ const failing = sources.filter((source) => source.status === "NEEDS_RECONNECT" || source.lastError,);const lastSyncedAt = sources@@ -91,7 +150,7 @@ export function GoogleConnection() {.sort().at(-1);- const healthy = !broken && hasRefreshToken;+ const healthy = failing.length === 0 && hasRefreshToken;return (// No card: the page shell already owns the gutter, so a padded container@@ -110,7 +169,7 @@ export function GoogleConnection() {</div><Button- variant="outline"+ variant="contrast"size="sm"disabled={syncNow.isPending}onClick={() => syncNow.mutate()}@@ -125,15 +184,57 @@ export function GoogleConnection() {nothing is ever sent on your behalf.</p>- <p className="text-muted-foreground text-xs">- {!hasRefreshToken- ? "Sign out and back in to finish setting up — Google did not return a refresh token."- : broken?.lastError- ? broken.lastError- : lastSyncedAt- ? `Last checked ${relativeTimeFromIso(lastSyncedAt)}`- : "Waiting for the first check"}- </p>+ {!hasRefreshToken ? (+ <Alert variant="destructive" attention={insistence}>+ <Icon icon={Warning} />+ <AlertTitle>Google did not return a refresh token</AlertTitle>+ <AlertDescription>Sign out and back in.</AlertDescription>+ </Alert>+ ) : failing.length > 0 ? (+ failing.map((source) => {+ const { summary, url } = explain(+ source.lastError ?? "Google needs reconnecting.",+ );++ return (+ <Alert+ key={source.source}+ variant="destructive"+ attention={insistence}+ >+ <Icon icon={Warning} />+ <AlertTitle>+ {SOURCES[source.source].label} sync failed+ </AlertTitle>+ <AlertDescription>{summary}</AlertDescription>++ {url ? (+ <AlertAction>+ {/*+ * The inverted chip, not the primary fill. Green+ * means "the action you want" everywhere else, and+ * inside a failure panel it reads as reassurance.+ * On the alert's grey this is the loudest thing in+ * the box, which is what the one way out should be.+ */}+ <Button variant="contrast" size="xs" asChild>+ <a href={url} target="_blank" rel="noreferrer">+ Resolve+ <Icon icon={Launch} data-icon="inline-end" />+ </a>+ </Button>+ </AlertAction>+ ) : null}+ </Alert>+ );+ })+ ) : (+ <p className="text-muted-foreground text-xs">+ {lastSyncedAt+ ? `Last checked ${relativeTimeFromIso(lastSyncedAt)}`+ : "Waiting for the first check"}+ </p>+ )}</section><section className="flex flex-col gap-5 border-t py-5">diff --git a/apps/app/components/app-header.tsx b/apps/app/components/app-header.tsxindex 787bf6ea..4008a591 100644--- a/apps/app/components/app-header.tsx+++ b/apps/app/components/app-header.tsx@@ -60,7 +60,11 @@ export function AppHeader({ user }: { user: User }) {<Linkhref="/"aria-label="Homepage"- className="hidden size-8 items-center justify-center text-primary md:flex"+ // The mark wears the page's ink, not the brand green. `text-primary`+ // used to be near-black and became the accent when the palette+ // changed, which put a second green on screen competing with the+ // one button that is meant to be the only one.+ className="hidden size-8 items-center justify-center text-foreground md:flex"><Logo className="size-5" /></Link>diff --git a/apps/app/components/app-icon-rail.tsx b/apps/app/components/app-icon-rail.tsxindex c49c52a6..659ae1df 100644--- a/apps/app/components/app-icon-rail.tsx+++ b/apps/app/components/app-icon-rail.tsx@@ -62,7 +62,7 @@ function RailLink({ item, active }: { item: RailItem; active: boolean }) {className={cn("text-muted-foreground",active &&- "bg-primary/10 text-primary hover:bg-primary/10 hover:text-primary",+ "bg-muted text-foreground hover:bg-muted hover:text-foreground",)}><Link@@ -96,7 +96,7 @@ function MobileRailLink({className={cn("justify-start gap-3 text-muted-foreground",active &&- "bg-primary/10 text-primary hover:bg-primary/10 hover:text-primary",+ "bg-muted text-foreground hover:bg-muted hover:text-foreground",)}><Linkdiff --git a/apps/app/components/detail-sheet.tsx b/apps/app/components/detail-sheet.tsxindex 88b9bcb0..7471365d 100644--- a/apps/app/components/detail-sheet.tsx+++ b/apps/app/components/detail-sheet.tsx@@ -209,7 +209,11 @@ export function DetailSheetHeader({* of furniture, not information.*/export function DetailSheetStats({ children }: { children: ReactNode }) {- return <dl className="flex shrink-0 divide-x border-b">{children}</dl>;+ // A filled shelf rather than a bare band: the stats sit above the tabs and+ // below the identity, and the fill is what separates the three.+ return (+ <dl className="flex shrink-0 divide-x border-b bg-muted/40">{children}</dl>+ );}export function DetailSheetStat({@@ -220,9 +224,13 @@ export function DetailSheetStat({children: ReactNode;}) {return (- <div className={cn("flex min-w-0 flex-1 flex-col gap-0.5 py-2", GUTTER)}>+ <div className={cn("flex min-w-0 flex-1 flex-col gap-1 py-2.5", GUTTER)}><dt className="truncate text-muted-foreground text-xs/5">{label}</dt>- <dd className="min-w-0 truncate text-xs/5">{children}</dd>+ {/* The value outranks its label — it is the thing you opened the sheet+ * to read, and at the same size the two competed. */}+ <dd className="min-w-0 truncate font-medium text-foreground text-sm/5">+ {children}+ </dd></div>);}diff --git a/docs/design.md b/docs/design.mdindex 7d19846e..43f71d0c 100644--- a/docs/design.md+++ b/docs/design.md@@ -4,5 +4,28 @@- Always use shared shadcn components from /packages/ui.- Do not override component styles with className.- Do not introduce custom border radii, spacing, colours, shadows, or other visual deviations.-- No rounded corners.-- If a component needs a new variant or style, implement it in /packages/ui so the entire application stays consistent.\ No newline at end of file+- Corners are rounded, from the scale only: `rounded-sm` (4px) for the smallest+ controls, `rounded-md` (5px) for buttons, inputs and segments, `rounded-lg`+ (8px) for surfaces that contain controls — popovers, dialogs, menus, table+ shells. Never a literal radius at the call site.+- `rounded-none` is still correct in one case: an element that must join its+ neighbour edge to edge. The input inside an input group, the middle cells of+ a selected date range, and the drawer handle are the existing examples.+- If a component needs a new variant or style, implement it in /packages/ui so the entire application stays consistent.++## Colour++Flat white, neutral greys, and one brand green (`#006B4F`). The greys are+untinted on purpose: there is no scene to tint them toward, and a tinted grey+without a reason reads as indecision.++**Only two things are filled**: `primary` for the action you want, `destructive`+for the one you cannot undo. Everything else — secondary, outline, ghost — is a+white chip in light and a dark chip in dark. That is what keeps a rep's eye+landing on *go* or *stop* and skimming past the rest.++`--primary` and `--destructive` hold the **same value in both themes**. A brand+colour that changes per theme is not one colour, it is two, and both then need+maintaining. The single exception is `--ring`, which lightens in dark: a fill+carries the brand, but a ring only has to be seen, and `#006B4F` is too close to+the dark background to register.\ No newline at end of filediff --git a/packages/ui/src/components/accordion.tsx b/packages/ui/src/components/accordion.tsxindex db57a81d..d99f4871 100644--- a/packages/ui/src/components/accordion.tsx+++ b/packages/ui/src/components/accordion.tsx@@ -33,7 +33,7 @@ function AccordionItem({}const accordionTriggerVariants = cva(- "group/accordion-trigger relative flex items-start rounded-none border border-transparent text-left outline-none transition-all focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",+ "group/accordion-trigger relative flex items-start rounded-md border border-transparent text-left outline-none transition-all focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",{variants: {// `subtle` is the one that belongs inside a record sheet: a line ofdiff --git a/packages/ui/src/components/alert.tsx b/packages/ui/src/components/alert.tsxindex d6d01689..983f1fe8 100644--- a/packages/ui/src/components/alert.tsx+++ b/packages/ui/src/components/alert.tsx@@ -3,13 +3,20 @@ import { cva, type VariantProps } from "class-variance-authority";import type * as React from "react";const alertVariants = cva(- "group/alert relative grid w-full gap-0.5 rounded-none border px-2.5 py-2 text-left text-xs has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",+ "group/alert relative grid w-full gap-0.5 rounded-md border px-2.5 py-2 text-left text-xs has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants: {variant: {default: "bg-card text-card-foreground",+ /*+ * Neutral, not red. A failure panel is already announced by its+ * heading and its position on the page; painting the whole surface+ * red makes a recoverable problem — an API that needs enabling —+ * read like data loss. The grey keeps the alert legible and lets the+ * one action inside it be the loudest thing in the box.+ */destructive:- "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",+ "bg-muted text-foreground *:[svg]:text-current *:data-[slot=alert-description]:text-foreground/80",},},defaultVariants: {@@ -21,13 +28,31 @@ const alertVariants = cva(function Alert({className,variant,+ attention = 0,...props-}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {+}: React.ComponentProps<"div"> &+ VariantProps<typeof alertVariants> & {+ /**+ * Bump this to make the alert re-assert itself.+ *+ * A counter rather than a boolean, and it is the `key`: an animation only+ * replays when the node is new, so a flag flipping back to `true` a second+ * time would do nothing at all. Every increment remounts the alert and the+ * animation runs again — which is the whole point, since the case this+ * exists for is the *same* problem reported twice.+ */+ attention?: number;+ }) {return (<div+ key={attention}data-slot="alert"role="alert"- className={cn(alertVariants({ variant }), className)}+ className={cn(+ alertVariants({ variant }),+ attention > 0 && "alert-attention",+ className,+ )}{...props}/>);diff --git a/packages/ui/src/components/attachment.tsx b/packages/ui/src/components/attachment.tsxindex d3b8d043..b3bb6fdd 100644--- a/packages/ui/src/components/attachment.tsx+++ b/packages/ui/src/components/attachment.tsx@@ -6,14 +6,14 @@ import { cn } from "@crm/ui/lib/utils"import { Button } from "@crm/ui/components/button"const attachmentVariants = cva(- "group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-none border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed",+ "group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-md border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed",{variants: {size: {default:"gap-2 text-xs has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2",sm: "gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5",- xs: "gap-1.5 rounded-none text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1",+ xs: "gap-1.5 rounded-sm text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1",},orientation: {horizontal: "min-w-40 items-center",diff --git a/packages/ui/src/components/bubble.tsx b/packages/ui/src/components/bubble.tsxindex df5a2d53..ea7e7a35 100644--- a/packages/ui/src/components/bubble.tsx+++ b/packages/ui/src/components/bubble.tsx@@ -74,7 +74,7 @@ function BubbleContent({<Compdata-slot="bubble-content"className={cn(- "w-fit max-w-full min-w-0 overflow-hidden rounded-none border border-transparent px-3 py-2 text-xs leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",+ "w-fit max-w-full min-w-0 overflow-hidden rounded-md border border-transparent px-3 py-2 text-xs leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-2 [button,a]:focus-visible:ring-ring/50",className)}{...props}@@ -83,7 +83,7 @@ function BubbleContent({}const bubbleReactionsVariants = cva(- "absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-none bg-muted px-1.5 py-0.5 text-xs ring-3 ring-card has-[button]:p-0",+ "absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-sm bg-muted px-1.5 py-0.5 text-xs ring-3 ring-card has-[button]:p-0",{variants: {side: {diff --git a/packages/ui/src/components/button.tsx b/packages/ui/src/components/button.tsxindex d85ce179..2fb164e1 100644--- a/packages/ui/src/components/button.tsx+++ b/packages/ui/src/components/button.tsx@@ -4,30 +4,50 @@ import { Slot } from "radix-ui";import type * as React from "react";const buttonVariants = cva(- "group/button inline-flex shrink-0 cursor-pointer items-center justify-center rounded-none border border-transparent bg-clip-padding text-xs font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ "group/button inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants: {variant: {- default: "bg-primary text-primary-foreground hover:bg-primary/80",+ /*+ * Hover and press darken the fill rather than fading it. `/80`+ * let the page show through, so a primary button sat on a grey+ * row and a white one hovered to two different colours.+ */+ default:+ "bg-primary text-primary-foreground shadow-2xs hover:bg-[color-mix(in_oklch,var(--primary),black_12%)] active:bg-[color-mix(in_oklch,var(--primary),black_22%)] active:shadow-none",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",+ /*+ * A solid fill, not a tint. Fills are reserved for the two ends+ * of the spectrum — the action you want and the one you cannot+ * undo — so destructive has to be unmistakable at a glance.+ */destructive:- "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",+ "bg-destructive text-destructive-foreground shadow-2xs hover:bg-[color-mix(in_oklch,var(--destructive),black_12%)] active:bg-[color-mix(in_oklch,var(--destructive),black_22%)] active:shadow-none focus-visible:ring-destructive/50",+ /*+ * The inverted chip: the page's own text colour as a fill, and the+ * page's background as the label. It is the highest-contrast button+ * available in either theme without spending green or red — white on+ * dark, near-black on light — so it carries the one action inside a+ * neutral panel that has no colour of its own to lean on.+ */+ contrast:+ "bg-foreground text-background shadow-2xs hover:bg-foreground/90 active:bg-foreground/80 active:shadow-none",link: "text-primary underline-offset-4 hover:underline",},size: {default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",- xs: "h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",- sm: "h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",+ xs: "h-6 gap-1 rounded-sm px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",+ sm: "h-7 gap-1 px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon: "size-8",- "icon-xs": "size-6 rounded-none [&_svg:not([class*='size-'])]:size-3",- "icon-sm": "size-7 rounded-none",+ "icon-xs": "size-6 rounded-sm [&_svg:not([class*='size-'])]:size-3",+ "icon-sm": "size-7","icon-lg": "size-9",},},diff --git a/packages/ui/src/components/card-table.tsx b/packages/ui/src/components/card-table.tsxindex 3ab3b4b7..50199c8a 100644--- a/packages/ui/src/components/card-table.tsx+++ b/packages/ui/src/components/card-table.tsx@@ -17,7 +17,9 @@ export function CardTable({}) {return (<SimpleTable- className="min-w-[48rem] table-fixed [&_td:first-child]:pl-0 [&_th:first-child]:pl-0"+ // Gutters rather than flush: the table now draws its own border, and+ // text sitting hard against it reads as a clipping bug.+ className="min-w-[48rem] table-fixed [&_td:first-child]:pl-4 [&_td:last-child]:pr-4 [&_th:first-child]:pl-4 [&_th:last-child]:pr-4"columns={columns}>{children}diff --git a/packages/ui/src/components/card.tsx b/packages/ui/src/components/card.tsxindex 5a0bc848..d07e73cf 100644--- a/packages/ui/src/components/card.tsx+++ b/packages/ui/src/components/card.tsx@@ -64,7 +64,10 @@ function CardContent({ className, ...props }: React.ComponentProps<"div">) {return (<divdata-slot="card-content"- className={cn("flex flex-col gap-4 border p-4 md:p-6", className)}+ className={cn(+ "flex flex-col gap-4 rounded-lg border bg-card p-4 md:p-6",+ className,+ )}{...props}/>);@@ -84,7 +87,7 @@ function CardPanel({ className, ...props }: React.ComponentProps<"div">) {<divdata-slot="card-panel"className={cn(- "flex h-80 min-h-0 flex-col overflow-hidden border",+ "flex h-80 min-h-0 flex-col overflow-hidden rounded-lg border bg-card",className,)}{...props}diff --git a/packages/ui/src/components/chart.tsx b/packages/ui/src/components/chart.tsxindex 8324cb81..1e82c344 100644--- a/packages/ui/src/components/chart.tsx+++ b/packages/ui/src/components/chart.tsx@@ -196,7 +196,7 @@ function ChartTooltipContent({return (<divclassName={cn(- "grid min-w-32 items-start gap-1.5 rounded-none border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",+ "grid min-w-32 items-start gap-1.5 rounded-md border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",className,)}>diff --git a/packages/ui/src/components/checkbox.tsx b/packages/ui/src/components/checkbox.tsxindex b3496cc5..466fd9cc 100644--- a/packages/ui/src/components/checkbox.tsx+++ b/packages/ui/src/components/checkbox.tsx@@ -13,7 +13,7 @@ function Checkbox({<CheckboxPrimitive.Rootdata-slot="checkbox"className={cn(- "peer relative flex size-4 shrink-0 items-center justify-center rounded-none border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",+ "peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",className,)}{...props}diff --git a/packages/ui/src/components/command.tsx b/packages/ui/src/components/command.tsxindex ec2ce8b7..9add404e 100644--- a/packages/ui/src/components/command.tsx+++ b/packages/ui/src/components/command.tsx@@ -25,7 +25,7 @@ function Command({<CommandPrimitivedata-slot="command"className={cn(- "flex size-full flex-col overflow-hidden rounded-none bg-popover text-popover-foreground",+ "flex size-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground",className,)}{...props}@@ -54,7 +54,7 @@ function CommandDialog({</DialogHeader><DialogContentclassName={cn(- "top-1/3 translate-y-0 overflow-hidden rounded-none p-0",+ "top-1/3 translate-y-0 overflow-hidden rounded-lg p-0",className,)}showCloseButton={showCloseButton}@@ -155,7 +155,7 @@ function CommandItem({<CommandPrimitive.Itemdata-slot="command-item"className={cn(- "group/command-item relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none in-data-[slot=dialog-content]:rounded-none! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",+ "group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-2 text-xs outline-hidden select-none in-data-[slot=dialog-content]:rounded-none! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",className,)}{...props}diff --git a/packages/ui/src/components/data-table.tsx b/packages/ui/src/components/data-table.tsxindex 3c2931b9..2699233e 100644--- a/packages/ui/src/components/data-table.tsx+++ b/packages/ui/src/components/data-table.tsx@@ -452,12 +452,20 @@ export function DataTable<TRow, TSub = unknown>({// truncates (cells are overflow-hidden) instead of blowing the table// out horizontally.className={cn(- "table-fixed [&_td:first-child]:pl-0 [&_th:first-child]:pl-0",+ "table-fixed [&_td:first-child]:pl-4 [&_th:first-child]:pl-4 [&_td:last-child]:pr-4 [&_th:last-child]:pr-4",tableClassName,)}- containerClassName="min-h-0 flex-1 overflow-auto"+ // The shell: one rounded, bordered surface the rows live inside,+ // rather than rows floating on the page. `overflow-hidden` is what+ // makes the first and last row clip to the radius.+ containerClassName="min-h-0 flex-1 overflow-auto rounded-lg border bg-card">- <TableHeader className="sticky top-0 z-10 bg-background [&_th]:bg-background">+ {/*+ * The header is a shelf above the rows, not another row. It gets the+ * muted fill and an inset rule rather than a border, so it stays put+ * when the body scrolls under it.+ */}+ <TableHeader className="sticky top-0 z-10 bg-muted [&_th]:bg-muted [&_tr]:border-0 [&_tr]:shadow-[inset_0_-1px_0_var(--border)]"><TableRow>{anyExpandable && (<TableHead className="h-11 w-10 px-3">diff --git a/packages/ui/src/components/dialog.tsx b/packages/ui/src/components/dialog.tsxindex 1ac8856a..ca57a62e 100644--- a/packages/ui/src/components/dialog.tsx+++ b/packages/ui/src/components/dialog.tsx@@ -38,7 +38,7 @@ function DialogOverlay({<DialogPrimitive.Overlaydata-slot="dialog-overlay"className={cn(- "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",+ "fixed inset-0 isolate z-50 bg-overlay duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",className,)}{...props}@@ -60,7 +60,7 @@ function DialogContent({<DialogPrimitive.Contentdata-slot="dialog-content"className={cn(- "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-none bg-popover p-4 text-xs/relaxed text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg bg-popover p-4 text-xs/relaxed text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",className,)}{...props}diff --git a/packages/ui/src/components/drawer.tsx b/packages/ui/src/components/drawer.tsxindex f25e9c16..d862db80 100644--- a/packages/ui/src/components/drawer.tsx+++ b/packages/ui/src/components/drawer.tsx@@ -51,7 +51,7 @@ function DrawerOverlay({<DrawerPrimitive.Overlaydata-slot="drawer-overlay"className={cn(- "fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",+ "fixed inset-0 z-50 bg-overlay supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",className,)}{...props}diff --git a/packages/ui/src/components/dropdown-menu.tsx b/packages/ui/src/components/dropdown-menu.tsxindex ddb3bcaf..0721efa9 100644--- a/packages/ui/src/components/dropdown-menu.tsx+++ b/packages/ui/src/components/dropdown-menu.tsx@@ -97,7 +97,7 @@ function DropdownMenuCheckboxItem({data-slot="dropdown-menu-checkbox-item"data-inset={inset}className={cn(- "relative flex cursor-default items-center gap-2 rounded-none py-2 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ "relative flex cursor-default items-center gap-2 rounded-sm py-2 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",className,)}checked={checked}@@ -140,7 +140,7 @@ function DropdownMenuRadioItem({data-slot="dropdown-menu-radio-item"data-inset={inset}className={cn(- "relative flex cursor-default items-center gap-2 rounded-none py-2 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ "relative flex cursor-default items-center gap-2 rounded-sm py-2 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",className,)}{...props}@@ -226,7 +226,7 @@ function DropdownMenuSubTrigger({data-slot="dropdown-menu-sub-trigger"data-inset={inset}className={cn(- "flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ "flex cursor-default items-center gap-2 rounded-sm px-2 py-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",className,)}{...props}@@ -245,7 +245,7 @@ function DropdownMenuSubContent({<DropdownMenuPrimitive.SubContentdata-slot="dropdown-menu-sub-content"className={cn(- "z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-none bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",className,)}{...props}diff --git a/packages/ui/src/components/empty.tsx b/packages/ui/src/components/empty.tsxindex 27e3f19e..9cecb323 100644--- a/packages/ui/src/components/empty.tsx+++ b/packages/ui/src/components/empty.tsx@@ -19,7 +19,7 @@ const emptyVariants = cva(// Sits at its natural height (a comfortable block) rather than stretching to// fill a flex-1 page shell. Opt into full-height centering per-usage with// `flex-1` on the className when needed.- "group/empty flex w-full min-w-0 flex-col items-center justify-center gap-4 rounded-none border-dashed px-6 py-12 text-center text-balance",+ "group/empty flex w-full min-w-0 flex-col items-center justify-center gap-4 rounded-lg border-dashed px-6 py-12 text-center text-balance",{variants: {width: {@@ -68,7 +68,7 @@ const emptyMediaVariants = cva(variants: {variant: {default: "bg-transparent",- icon: "flex size-8 shrink-0 items-center justify-center rounded-none bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",+ icon: "flex size-8 shrink-0 items-center justify-center rounded-md bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",},},defaultVariants: {diff --git a/packages/ui/src/components/field.tsx b/packages/ui/src/components/field.tsxindex 970c6c86..0f867d0b 100644--- a/packages/ui/src/components/field.tsx+++ b/packages/ui/src/components/field.tsx@@ -106,7 +106,7 @@ function FieldLabel({<Labeldata-slot="field-label"className={cn(- "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border *:data-[slot=field]:p-2 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",+ "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-2 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",className,)}diff --git a/packages/ui/src/components/input-group.tsx b/packages/ui/src/components/input-group.tsxindex 74a00e36..95e240ab 100644--- a/packages/ui/src/components/input-group.tsx+++ b/packages/ui/src/components/input-group.tsx@@ -13,7 +13,7 @@ function InputGroup({ className, ...props }: React.ComponentProps<"div">) {data-slot="input-group"role="group"className={cn(- "group/input-group relative flex h-8 w-full min-w-0 items-center rounded-none border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",+ "group/input-group relative flex h-8 w-full min-w-0 items-center rounded-md border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",className,)}{...props}diff --git a/packages/ui/src/components/input.tsx b/packages/ui/src/components/input.tsxindex 834ddff9..a440624e 100644--- a/packages/ui/src/components/input.tsx+++ b/packages/ui/src/components/input.tsx@@ -7,7 +7,12 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {type={type}data-slot="input"className={cn(- "h-8 w-full min-w-0 rounded-none border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",+ /*+ * The focus ring sits outside the border rather than replacing+ * it, so the control does not appear to change size the moment+ * it is focused.+ */+ "h-8 w-full min-w-0 rounded-md border border-input bg-background px-2.5 py-1 text-xs transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs file:font-medium file:text-foreground placeholder:text-muted-foreground hover:border-ring/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-60 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/25 md:text-xs dark:bg-card dark:disabled:bg-muted",className,)}{...props}diff --git a/packages/ui/src/components/message.tsx b/packages/ui/src/components/message.tsxindex df08200b..0ab8a756 100644--- a/packages/ui/src/components/message.tsx+++ b/packages/ui/src/components/message.tsx@@ -35,7 +35,7 @@ function MessageAvatar({ className, ...props }: React.ComponentProps<"div">) {<divdata-slot="message-avatar"className={cn(- "flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-none bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8",+ "flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-md bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8",className)}{...props}diff --git a/packages/ui/src/components/popover.tsx b/packages/ui/src/components/popover.tsxindex 2ecacf2b..e409a14f 100644--- a/packages/ui/src/components/popover.tsx+++ b/packages/ui/src/components/popover.tsx@@ -19,7 +19,7 @@ function PopoverTrigger({}const popoverContentVariants = cva(- "z-50 flex origin-(--radix-popover-content-transform-origin) flex-col rounded-none bg-popover text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "z-50 flex origin-(--radix-popover-content-transform-origin) flex-col rounded-lg bg-popover text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",{variants: {// `fit` is for content that owns its own box — a calendar, a colourdiff --git a/packages/ui/src/components/select.tsx b/packages/ui/src/components/select.tsxindex 7179c99a..ad5cf920 100644--- a/packages/ui/src/components/select.tsx+++ b/packages/ui/src/components/select.tsx@@ -37,14 +37,14 @@ function SelectValue({// opposite of true: it borrows the surrounding row's look until you point at// it, and its chevron only appears on hover or focus.const selectTriggerVariants = cva(- "flex w-fit items-center justify-between gap-1.5 rounded-none text-xs whitespace-nowrap transition-colors outline-none select-none disabled:cursor-not-allowed disabled:opacity-50 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ "flex w-fit items-center justify-between gap-1.5 rounded-md text-xs whitespace-nowrap transition-colors outline-none select-none disabled:cursor-not-allowed disabled:opacity-50 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants: {variant: {default:- "border border-input bg-transparent py-2 pr-2 pl-2.5 focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",+ "border border-input bg-background py-2 pr-2 pl-2.5 hover:border-ring/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/25 dark:bg-card dark:hover:bg-accent",ghost:- "border border-transparent bg-transparent px-2 hover:border-input hover:bg-muted/40 focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 data-[state=open]:border-input data-[state=open]:bg-muted/40 [&_svg]:opacity-0 hover:[&_svg]:opacity-100 focus-visible:[&_svg]:opacity-100 data-[state=open]:[&_svg]:opacity-100",+ "border border-transparent bg-transparent px-2 hover:border-input hover:bg-muted/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 data-[state=open]:border-input data-[state=open]:bg-muted/40 [&_svg]:opacity-0 hover:[&_svg]:opacity-100 focus-visible:[&_svg]:opacity-100 data-[state=open]:[&_svg]:opacity-100",},},defaultVariants: {@@ -91,7 +91,7 @@ function SelectContent({data-slot="select-content"data-align-trigger={position === "item-aligned"}className={cn(- "relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-none bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",position === "popper" &&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",className,@@ -138,7 +138,7 @@ function SelectItem({<SelectPrimitive.Itemdata-slot="select-item"className={cn(- "relative flex w-full cursor-default items-center gap-2 rounded-none py-2 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",+ "relative flex w-full cursor-default items-center gap-2 rounded-sm py-2 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",className,)}{...props}diff --git a/packages/ui/src/components/sheet.tsx b/packages/ui/src/components/sheet.tsxindex 94f7cd88..e448c49f 100644--- a/packages/ui/src/components/sheet.tsx+++ b/packages/ui/src/components/sheet.tsx@@ -64,7 +64,7 @@ function SheetOverlay({<SheetPrimitive.Overlaydata-slot="sheet-overlay"className={cn(- "fixed inset-0 z-50 bg-black/10 text-xs/relaxed duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",+ "fixed inset-0 z-50 bg-overlay text-xs/relaxed duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",className,)}{...props}diff --git a/packages/ui/src/components/simple-table.tsx b/packages/ui/src/components/simple-table.tsxindex 3b143d4c..06777e53 100644--- a/packages/ui/src/components/simple-table.tsx+++ b/packages/ui/src/components/simple-table.tsx@@ -71,12 +71,21 @@ export function SimpleTable({className={cn("w-full", panel && "table-fixed", className)}containerClassName={cn(panel && "min-h-0 flex-1 overflow-x-hidden overflow-y-auto",+ // Standalone tables carry their own shell. The `panel` variant does+ // not: it sits inside `CardPanel`, which already draws the border,+ // and two of them read as a box inside a box.+ !panel && "rounded-lg border bg-card",containerClassName,)}><TableHeaderclassName={cn(panel && ["sticky top-0 z-10", PANEL_SURFACE[surface]],+ // A filled shelf with an inset rule rather than a bottom border,+ // so the line sits inside the shell's rounded corners instead of+ // running out past them.+ !panel &&+ "bg-muted [&_tr]:border-0 [&_tr]:shadow-[inset_0_-1px_0_var(--border)]",headerClassName,)}>@@ -86,7 +95,7 @@ export function SimpleTable({key={index}aria-label={column.header ? undefined : column.srLabel}className={cn(- headerHeight ?? (panel ? "h-9" : "h-11"),+ headerHeight ?? "h-9","px-3 font-normal text-muted-foreground",column.width,ALIGN_CLASS[column.align ?? "left"],diff --git a/packages/ui/src/components/skeleton.tsx b/packages/ui/src/components/skeleton.tsxindex 26fc1a8c..03bdb55d 100644--- a/packages/ui/src/components/skeleton.tsx+++ b/packages/ui/src/components/skeleton.tsx@@ -4,7 +4,7 @@ function Skeleton({ className, ...props }: React.ComponentProps<"div">) {return (<divdata-slot="skeleton"- className={cn("animate-pulse rounded-none bg-muted", className)}+ className={cn("animate-pulse rounded-sm bg-muted", className)}{...props}/>);diff --git a/packages/ui/src/components/switch.tsx b/packages/ui/src/components/switch.tsxindex 8d08c534..54f02035 100644--- a/packages/ui/src/components/switch.tsx+++ b/packages/ui/src/components/switch.tsx@@ -16,8 +16,13 @@ function Switch({<SwitchPrimitive.Rootdata-slot="switch"data-size={size}+ // The track height is deliberately a whole number. `items-center` splits+ // whatever is left over after the thumb between top and bottom, so an+ // 18.4px track left 0.2px a side and the browser rounded it into a thumb+ // that sat visibly high. Track minus its 1px borders now equals the thumb+ // exactly, which is how the `sm` size has always worked.className={cn(- "peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",+ "peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-[size=default]:h-[18px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",className)}{...props}diff --git a/packages/ui/src/components/table.tsx b/packages/ui/src/components/table.tsxindex da828181..614dfd5a 100644--- a/packages/ui/src/components/table.tsx+++ b/packages/ui/src/components/table.tsx@@ -60,7 +60,9 @@ function TableRow({ className, ...props }: React.ComponentProps<"tr">) {<trdata-slot="table-row"className={cn(- "border-b transition-colors has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",+ // The whole row is a click target, so it needs a hover the eye can+ // follow across all six columns — not just under the cursor.+ "border-b transition-colors hover:bg-muted/60 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",className,)}{...props}@@ -73,7 +75,9 @@ function TableHead({ className, ...props }: React.ComponentProps<"th">) {<thdata-slot="table-head"className={cn(- "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",+ // Column labels are signposts, not data: muted and lighter than the+ // values beneath them, so the eye lands on the rows first.+ "h-9 px-2 text-left align-middle font-medium whitespace-nowrap text-muted-foreground [&:has([role=checkbox])]:pr-0",className,)}{...props}@@ -86,7 +90,7 @@ function TableCell({ className, ...props }: React.ComponentProps<"td">) {<tddata-slot="table-cell"className={cn(- "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",+ "px-2 py-2.5 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",className,)}{...props}diff --git a/packages/ui/src/components/tabs.tsx b/packages/ui/src/components/tabs.tsxindex e516fd06..6aad6e27 100644--- a/packages/ui/src/components/tabs.tsx+++ b/packages/ui/src/components/tabs.tsx@@ -24,7 +24,7 @@ function Tabs({}const tabsListVariants = cva(- "group/tabs-list inline-flex w-fit items-center justify-center rounded-none p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",+ "group/tabs-list inline-flex w-fit items-center justify-center rounded-md p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants: {variant: {@@ -62,14 +62,17 @@ function TabsTrigger({<TabsPrimitive.Triggerdata-slot="tabs-trigger"className={cn(- "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-none border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-sm border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",// `flex-none` for line tabs: they are labels with a rule under the// active one, so each is as wide as its word. Letting them share the// row equally stretches four tabs across a whole sheet, and then the// underline and the hover target are a quarter of the panel wide with// the label marooned in the middle of them."group-data-[variant=line]/tabs-list:flex-none group-data-[variant=line]/tabs-list:px-0 group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",- "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",+ // The raised thumb. In dark the track is the recessed thing and the+ // thumb sits above it, so the stacking order inverts rather than the+ // colours simply flipping.+ "data-active:bg-background data-active:text-foreground data-active:shadow-2xs dark:data-active:border-border dark:data-active:bg-accent dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",className,)}diff --git a/packages/ui/src/components/textarea.tsx b/packages/ui/src/components/textarea.tsxindex b606f310..546c3447 100644--- a/packages/ui/src/components/textarea.tsx+++ b/packages/ui/src/components/textarea.tsx@@ -11,7 +11,7 @@ import type * as React from "react";* line is a place to start.*/const textareaVariants = cva(- "flex field-sizing-content w-full rounded-none border border-input bg-transparent px-2.5 py-2 text-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",+ "flex field-sizing-content w-full rounded-md border border-input bg-background px-2.5 py-2 text-xs transition-colors outline-none placeholder:text-muted-foreground hover:border-ring/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-60 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/25 md:text-xs dark:bg-card dark:disabled:bg-muted",{variants: {size: { default: "min-h-16", sm: "min-h-8" },diff --git a/packages/ui/src/components/toggle-group.tsx b/packages/ui/src/components/toggle-group.tsxindex 6324a3ff..a21fac66 100644--- a/packages/ui/src/components/toggle-group.tsx+++ b/packages/ui/src/components/toggle-group.tsx@@ -40,7 +40,7 @@ function ToggleGroup({data-orientation={orientation}style={{ "--gap": spacing } as React.CSSProperties}className={cn(- "group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-none data-[size=sm]:rounded-none data-vertical:flex-col data-vertical:items-stretch",+ "group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-md data-vertical:flex-col data-vertical:items-stretch",className,)}{...props}diff --git a/packages/ui/src/components/toggle.tsx b/packages/ui/src/components/toggle.tsxindex b0d354e7..f4d6fa1c 100644--- a/packages/ui/src/components/toggle.tsx+++ b/packages/ui/src/components/toggle.tsx@@ -16,7 +16,7 @@ import type * as React from "react";* disabled.*/const toggleVariants = cva(- "group/toggle inline-flex items-center justify-center gap-1 rounded-none text-muted-foreground text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted aria-pressed:text-foreground data-[state=on]:bg-muted data-[state=on]:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ "group/toggle inline-flex items-center justify-center gap-1 rounded-md text-muted-foreground text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted aria-pressed:text-foreground data-[state=on]:bg-muted data-[state=on]:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants: {variant: {@@ -26,7 +26,7 @@ const toggleVariants = cva(size: {default:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",- sm: "h-7 min-w-7 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",+ sm: "h-7 min-w-7 rounded-md px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",},},diff --git a/packages/ui/src/components/tooltip.tsx b/packages/ui/src/components/tooltip.tsxindex 787b0341..7d0d2be8 100644--- a/packages/ui/src/components/tooltip.tsx+++ b/packages/ui/src/components/tooltip.tsx@@ -41,7 +41,7 @@ function TooltipContent({data-slot="tooltip-content"sideOffset={sideOffset}className={cn(- "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-none bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-none data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-none data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",className,)}{...props}diff --git a/packages/ui/src/styles/globals.css b/packages/ui/src/styles/globals.cssindex 585e36bf..a6fb8a75 100644--- a/packages/ui/src/styles/globals.css+++ b/packages/ui/src/styles/globals.css@@ -14,21 +14,36 @@@custom-variant dark (&:is(.dark *));:root {- --background: oklch(1 0 0);- --foreground: oklch(0.145 0 0);- --card: oklch(1 0 0);- --card-foreground: oklch(0.145 0 0);- --popover: oklch(1 0 0);- --popover-foreground: oklch(0.145 0 0);- --primary: oklch(0.205 0 0);- --primary-foreground: oklch(0.985 0 0);- --secondary: oklch(0.97 0 0);- --secondary-foreground: oklch(0.205 0 0);- --muted: oklch(0.97 0 0);- --muted-foreground: oklch(0.556 0 0);- --accent: oklch(0.97 0 0);- --accent-foreground: oklch(0.205 0 0);- --destructive: oklch(0.577 0.245 27.325);+ /*+ * Comp's palette: flat white, neutral greys, one brand green.+ *+ * The greys are deliberately untinted. There is no scene to tint them+ * toward — the brand is "flat white and #006B4F" — and a tinted grey+ * without a reason reads as indecision rather than as a choice.+ */+ --background: #ffffff;+ --foreground: #171717;+ --card: #ffffff;+ --card-foreground: #171717;+ --popover: #ffffff;+ --popover-foreground: #171717;+ /*+ * The brand green, spent on the most-pressed control in the product.+ * White on it measures 6.4:1, so a 13px label clears AA comfortably.+ */+ --primary: #006b4f;+ --primary-foreground: #ffffff;+ --secondary: #f4f4f4;+ --secondary-foreground: #171717;+ --muted: #f4f4f4;+ --muted-foreground: #6b6b6b;+ --accent: #f4f4f4;+ --accent-foreground: #171717;+ /*+ * Bricked back from a pure red so it does not read as a holiday pairing+ * next to the green. Still 6.2:1 against white.+ */+ --destructive: #ae2e24;--destructive-foreground: #ffffff;--success: oklch(0.55 0.13 150);--success-foreground: #ffffff;@@ -36,31 +51,61 @@--warning-foreground: #ffffff;--info: oklch(0.55 0.16 255);--info-foreground: #ffffff;- --border: oklch(0.922 0 0);- --input: oklch(0.922 0 0);- --ring: oklch(0.708 0 0);- --chart-1: oklch(0.879 0.169 91.605);- --chart-2: oklch(0.769 0.188 70.08);- --chart-3: oklch(0.666 0.179 58.318);- --chart-4: oklch(0.555 0.163 48.998);- --chart-5: oklch(0.473 0.137 46.201);+ --border: #e2e2e2;+ --input: #e2e2e2;+ /*+ * The scrim behind a modal. A token rather than `bg-black/10` because the+ * two themes need different strengths: 10% black over a near-black page is+ * almost nothing, so a dialog in dark had no separation from the page+ * underneath it.+ */+ --overlay: rgb(0 0 0 / 0.18);+ /*+ * Focus is green. It is drawn as a ring outside the control's own border+ * rather than replacing it — a ring that swaps the border out changes the+ * control's apparent size the moment it is focused.+ */+ --ring: #006b4f;+ /*+ * Categorical, not a ramp. Deal stages appear as segments of the overview+ * donut with a legend beside it, so adjacent stages have to be told apart —+ * a single-hue green ramp measured ΔE 8.3 between neighbours, which is below+ * the 15 floor at which full-colour vision can separate them.+ *+ * Validated: lightness band, chroma floor, CVD separation, normal-vision+ * floor and contrast all pass against the light surface. Assign in order,+ * never cycle — a stage keeps its hue when the others are filtered out.+ *+ * Slot 1 is a brighter step of the brand green; #006b4f itself measures+ * C 0.096, under the 0.10 chroma floor, so it reads grey in a chart.+ */+ --chart-1: #00915f;+ --chart-2: #2563eb;+ --chart-3: #b45309;+ --chart-4: #7c3aed;+ --chart-5: #0891b2;--severity-critical: var(--destructive);--severity-high: oklch(0.646 0.222 41.116);--severity-medium: oklch(0.681 0.162 75.834);--severity-low: var(--muted-foreground);--severity-info: oklch(0.71 0.01 286);--severity-unknown: oklch(0.75 0 0);- --sidebar: oklch(0.985 0 0);- --sidebar-foreground: oklch(0.145 0 0);- --sidebar-primary: oklch(0.205 0 0);- --sidebar-primary-foreground: oklch(0.985 0 0);- --sidebar-accent: oklch(0.97 0 0);- --sidebar-accent-foreground: oklch(0.205 0 0);- --sidebar-border: oklch(0.922 0 0);- --sidebar-ring: oklch(0.708 0 0);+ --sidebar: #fafafa;+ --sidebar-foreground: #171717;+ --sidebar-primary: #006b4f;+ --sidebar-primary-foreground: #ffffff;+ --sidebar-accent: #f4f4f4;+ --sidebar-accent-foreground: #171717;+ --sidebar-border: #e2e2e2;+ --sidebar-ring: #006b4f;--font-sans: var(--font-geist-sans, "Geist", sans-serif);--font-mono: var(--font-geist-mono, "Geist Mono", monospace);- --radius: 0.625rem;+ /*+ * 5px, down from 10px. Enough to read as deliberately rounded next to the+ * square controls this replaced, tight enough that a dense table does not+ * start looking like a consumer app.+ */+ --radius: 5px;--shadow-x: 0px;--shadow-y: 1px;--shadow-blur: 2px;@@ -80,21 +125,30 @@}.dark {- --background: oklch(0.145 0 0);- --foreground: oklch(0.985 0 0);- --card: oklch(0.205 0 0);- --card-foreground: oklch(0.985 0 0);- --popover: oklch(0.205 0 0);- --popover-foreground: oklch(0.985 0 0);- --primary: oklch(0.922 0 0);- --primary-foreground: oklch(0.205 0 0);- --secondary: oklch(0.269 0 0);- --secondary-foreground: oklch(0.985 0 0);- --muted: oklch(0.269 0 0);- --muted-foreground: oklch(0.708 0 0);- --accent: oklch(0.269 0 0);- --accent-foreground: oklch(0.985 0 0);- --destructive: oklch(0.704 0.191 22.216);+ --background: #0f0f0f;+ --foreground: #f5f5f5;+ --card: #171717;+ --card-foreground: #f5f5f5;+ --popover: #171717;+ --popover-foreground: #f5f5f5;+ /*+ * The same green as light, deliberately. A brand colour that changes value+ * per theme is not one colour, it is two — and both then need maintaining.+ * #006b4f still reads clearly green against near-black, and white on it is+ * unchanged at 6.4:1.+ *+ * This replaces a near-white primary, so a primary button in dark now+ * carries the brand rather than being a light slab.+ */+ --primary: #006b4f;+ --primary-foreground: #ffffff;+ --secondary: #1f1f1f;+ --secondary-foreground: #f5f5f5;+ --muted: #1f1f1f;+ --muted-foreground: #a0a0a0;+ --accent: #292929;+ --accent-foreground: #f5f5f5;+ --destructive: #ae2e24;--destructive-foreground: #ffffff;--success: oklch(0.72 0.16 155);--success-foreground: oklch(0.205 0 0);@@ -102,31 +156,47 @@--warning-foreground: oklch(0.205 0 0);--info: oklch(0.7 0.15 250);--info-foreground: oklch(0.205 0 0);- --border: oklch(1 0 0 / 10%);- --input: oklch(1 0 0 / 15%);- --ring: oklch(0.556 0 0);- --chart-1: oklch(0.879 0.169 91.605);- --chart-2: oklch(0.769 0.188 70.08);- --chart-3: oklch(0.666 0.179 58.318);- --chart-4: oklch(0.555 0.163 48.998);- --chart-5: oklch(0.473 0.137 46.201);+ /* Lighter than the background: on near-black there is nothing darker to+ * draw a line with, so a border sits above its surface rather than below. */+ --border: #2a2a2a;+ --input: #3d3d3d;+ /* Much stronger than light: the page it covers is already dark. */+ --overlay: rgb(0 0 0 / 0.55);+ /*+ * The one value that does NOT match its light counterpart. #006b4f is too+ * close to near-black to register as a ring at all. A fill carries the+ * brand; a ring only has to be seen, so this one lightens.+ */+ --ring: #40be96;+ /*+ * Selected against the dark surface, not flipped from light. The dark+ * lightness band is L 0.48–0.67 — narrower *and* darker than light's+ * 0.43–0.77 — so the light steps do not simply carry over.+ */+ --chart-1: #0fa871;+ --chart-2: #4b87f0;+ --chart-3: #c07e22;+ --chart-4: #9b7bf0;+ --chart-5: #1e93b8;--severity-critical: oklch(0.637 0.237 25.331);--severity-high: oklch(0.705 0.213 47.604);--severity-medium: var(--chart-2);--severity-low: var(--muted-foreground);--severity-info: oklch(0.71 0.01 286);--severity-unknown: oklch(0.5 0 0);- --sidebar: oklch(0.205 0 0);- --sidebar-foreground: oklch(0.985 0 0);- --sidebar-primary: oklch(0.922 0 0);- --sidebar-primary-foreground: oklch(0.205 0 0);- --sidebar-accent: oklch(0.269 0 0);- --sidebar-accent-foreground: oklch(0.985 0 0);- --sidebar-border: oklch(1 0 0 / 10%);- --sidebar-ring: oklch(0.556 0 0);+ --sidebar: #171717;+ --sidebar-foreground: #f5f5f5;+ --sidebar-primary: #006b4f;+ --sidebar-primary-foreground: #ffffff;+ --sidebar-accent: #292929;+ --sidebar-accent-foreground: #f5f5f5;+ --sidebar-border: #2a2a2a;+ --sidebar-ring: #40be96;--font-sans: var(--font-geist-sans, "Geist", sans-serif);--font-mono: var(--font-geist-mono, "Geist Mono", monospace);- --radius: 0.75rem;+ /* Matches light. The themes disagreed before — 10px against 12px — which+ * meant a control quietly changed shape when the theme was switched. */+ --radius: 5px;--shadow-x: 0px;--shadow-y: 1px;--shadow-blur: 2px;@@ -169,6 +239,7 @@--color-border: var(--border);--color-input: var(--input);--color-ring: var(--ring);+ --color-overlay: var(--overlay);--color-chart-1: var(--chart-1);--color-chart-2: var(--chart-2);--color-chart-3: var(--chart-3);@@ -191,10 +262,10 @@--font-sans: var(--font-sans);--font-mono: var(--font-mono);- --radius-sm: 6px;- --radius-md: 8px;- --radius-lg: var(--radius);- --radius-xl: 16px;+ --radius-sm: 4px;+ --radius-md: var(--radius);+ --radius-lg: 8px;+ --radius-xl: 12px;--shadow-2xs: var(--shadow-2xs);--shadow-xs: var(--shadow-xs);@@ -887,3 +958,55 @@transition-duration: 0.01ms !important;}}++/*+ * "It is still here."+ *+ * Re-running a check that fails the same way changes nothing on screen, so the+ * button reads as broken rather than the connection. This replays whenever a+ * check lands on an error that is still the same one — a short nudge plus a+ * ring that fades out, which is enough to say the page did respond without+ * announcing a new problem that has not happened.+ *+ * The ring is the part that carries the message; the nudge is the part that+ * carries the urgency, so only the nudge is dropped under reduced motion.+ */+@keyframes alert-attention-nudge {+ 0%,+ 100% {+ transform: translateX(0);+ }+ 15% {+ transform: translateX(-3px);+ }+ 35% {+ transform: translateX(3px);+ }+ 55% {+ transform: translateX(-2px);+ }+ 75% {+ transform: translateX(2px);+ }+}++@keyframes alert-attention-ring {+ from {+ box-shadow: 0 0 0 3px var(--ring);+ }+ to {+ box-shadow: 0 0 0 0 transparent;+ }+}++@utility alert-attention {+ animation:+ alert-attention-nudge 0.5s ease-in-out,+ alert-attention-ring 1.4s ease-out;+}++@media (prefers-reduced-motion: reduce) {+ .alert-attention {+ animation: alert-attention-ring 1.4s ease-out;+ }+}