diff --git a/apps/web/app/_components/relationship-list.tsx b/apps/web/app/_components/relationship-list.tsx index 818f4f8..0246cdd 100644 --- a/apps/web/app/_components/relationship-list.tsx +++ b/apps/web/app/_components/relationship-list.tsx @@ -1,9 +1,9 @@ import Link from "next/link"; import type { RelatedNode } from "@govgraph/domain"; -import { Badge, Card } from "@govgraph/ui"; +import { Badge, EmptyState, NodeCard, NodeTypeBadge } from "@govgraph/ui"; -import { describeRelationship, humanizeNodeType } from "../_lib/presenters"; +import { describeRelationship } from "../_lib/presenters"; type RelationshipListProps = { relatedNodes: RelatedNode[]; @@ -12,37 +12,34 @@ type RelationshipListProps = { export function RelationshipList({ relatedNodes }: RelationshipListProps) { if (relatedNodes.length === 0) { return ( - -

- No connected records are available for this node yet. -

-
+ ); } return ( -
+
{relatedNodes.map((entry) => ( - -
- {describeRelationship(entry)} - {humanizeNodeType(entry.node.nodeType)} -
- - {entry.node.canonicalName} - - {entry.node.description ? ( -

- {entry.node.description} -

- ) : null} -
+ badges={ + <> + {describeRelationship(entry)} + + + } + description={entry.node.description} + title={ + + {entry.node.canonicalName} + + } + /> ))}
); diff --git a/apps/web/app/_components/search-form.tsx b/apps/web/app/_components/search-form.tsx index 5b4826b..af357a3 100644 --- a/apps/web/app/_components/search-form.tsx +++ b/apps/web/app/_components/search-form.tsx @@ -4,12 +4,14 @@ type SearchFormProps = { defaultValue?: string; action?: string; placeholder?: string; + size?: "md" | "lg"; }; export function SearchForm({ defaultValue = "", action = "/", placeholder = "Search ministers, portfolios, and departments", + size = "lg", }: SearchFormProps) { return (
@@ -20,7 +22,7 @@ export function SearchForm({ aria-label="Search the government map" className="min-w-0 flex-1" /> -
diff --git a/apps/web/app/design/page.tsx b/apps/web/app/design/page.tsx new file mode 100644 index 0000000..3fe46dd --- /dev/null +++ b/apps/web/app/design/page.tsx @@ -0,0 +1,279 @@ +import Link from "next/link"; + +import { nodeTypes } from "@govgraph/domain"; +import { + Badge, + Button, + Card, + DataTable, + EmptyState, + KeyValue, + MetricBar, + NodeCard, + NodeTypeBadge, + PageShell, + SectionHeader, + Skeleton, + SourceCard, + StatCard, + Textarea, + TimelineEntry, + Tooltip, + Input, +} from "@govgraph/ui"; + +const budgetRows = [ + { agency: "Treasury and Finance", budget: 8300000000, workforce: 1450 }, + { agency: "Transport and Planning", budget: 16700000000, workforce: 3940 }, + { agency: "Education", budget: 23200000000, workforce: 2180 }, +] as const; + +const budgetColumns = [ + { key: "agency", header: "Agency", sortable: true }, + { + key: "budget", + header: "Budget", + sortable: true, + align: "right" as const, + format: "currency" as const, + }, + { + key: "workforce", + header: "Workforce", + sortable: true, + align: "right" as const, + format: "number" as const, + }, +] as const; + +export default function DesignPage() { + return ( +
+ +
+
+ GovGraph Design System + Live preview route +
+
+

+ Register aesthetic +

+

+ Typed tokens, shared components, and a calmer way to build the + atlas. +

+

+ This page previews the shared system that now drives the live + pages. It is where new patterns should be checked before they land + in the atlas proper. +

+
+
+ +
+ + + +
+ +
+
+ + +
+ + + +
+
+ Neutral + Accent + Success + Warning +
+
+ +