db523ab871
Initialize shadcn/ui (radix-nova, Tailwind v4) in client/ and rebuild the M1 interface on the design language: - Token layer recolored in index.css: light "calm command center" content surface, rationed indigo brand, the deep-indigo sidebar, the load-bearing seat-state triad (--color-seat-human slate / -open amber / -ai indigo) + teal "approved" / amber "held", Hanken Grotesk (variable) as the production font. - App shell: deep-indigo sidebar (Board / Cartable / Org-chart-soon nav + sign out) on a light content area; StatusDot uses the seat-state tokens. - LoginPage: Card-based sign-in / first-owner bootstrap, toast (sonner) errors. - BoardPage: shadcn Card columns (backlog→in progress→in review→done), Badge task types, Select to move, Avatar/Assign-to-me, and the cartable panel — wired to the M1 API. - Path alias @ -> src (tsconfig paths + vite); dropped baseUrl (deprecated in TS 6). Components added via the shadcn CLI: button, card, badge, input, label, select, separator, avatar, skeleton, sonner. Client `npm run build` is green (tsc + vite). Still pending a live click-through. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import { useTheme } from "next-themes"
|
|
import { Toaster as Sonner, type ToasterProps } from "sonner"
|
|
import { CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, Loader2Icon } from "lucide-react"
|
|
|
|
const Toaster = ({ ...props }: ToasterProps) => {
|
|
const { theme = "system" } = useTheme()
|
|
|
|
return (
|
|
<Sonner
|
|
theme={theme as ToasterProps["theme"]}
|
|
className="toaster group"
|
|
icons={{
|
|
success: (
|
|
<CircleCheckIcon className="size-4" />
|
|
),
|
|
info: (
|
|
<InfoIcon className="size-4" />
|
|
),
|
|
warning: (
|
|
<TriangleAlertIcon className="size-4" />
|
|
),
|
|
error: (
|
|
<OctagonXIcon className="size-4" />
|
|
),
|
|
loading: (
|
|
<Loader2Icon className="size-4 animate-spin" />
|
|
),
|
|
}}
|
|
style={
|
|
{
|
|
"--normal-bg": "var(--popover)",
|
|
"--normal-text": "var(--popover-foreground)",
|
|
"--normal-border": "var(--border)",
|
|
"--border-radius": "var(--radius)",
|
|
} as React.CSSProperties
|
|
}
|
|
toastOptions={{
|
|
classNames: {
|
|
toast: "cn-toast",
|
|
},
|
|
}}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export { Toaster }
|