From 1a744202a2ecaf032a517ece927dabc9c7cb7d0b Mon Sep 17 00:00:00 2001 From: Sawyer Cutler Date: Mon, 10 Aug 2026 03:20:36 -0700 Subject: [PATCH 1/7] Extend chrome dialog, badges, and KindCardGrid for shell mock Add KindCardGrid for selectable kind pickers, blur dialog overlay with bordered footer and field labels, and warning/shared/access badge tones. --- package.json | 4 ++ src/index.ts | 1 + src/ui/badge.tsx | 4 ++ src/ui/dialog.tsx | 25 +++++++++++- src/ui/kind-card-grid.tsx | 81 +++++++++++++++++++++++++++++++++++++++ src/ui/status-dot.tsx | 6 ++- 6 files changed, 118 insertions(+), 3 deletions(-) create mode 100644 src/ui/kind-card-grid.tsx diff --git a/package.json b/package.json index 537c0b4..2759b4c 100644 --- a/package.json +++ b/package.json @@ -435,6 +435,10 @@ "types": "./dist/ui/intake-form.d.ts", "default": "./dist/ui/intake-form.js" }, + "./ui/kind-card-grid": { + "types": "./dist/ui/kind-card-grid.d.ts", + "default": "./dist/ui/kind-card-grid.js" + }, "./ui/kind-picker": { "types": "./dist/ui/kind-picker.d.ts", "default": "./dist/ui/kind-picker.js" diff --git a/src/index.ts b/src/index.ts index cb50d5b..fc3e6a6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -94,6 +94,7 @@ export * from "./ui/horizontal-stepper.js"; export * from "./ui/input.js"; export * from "./ui/inspector-shell.js"; export * from "./ui/intake-form.js"; +export * from "./ui/kind-card-grid.js"; export * from "./ui/kind-picker.js"; export * from "./ui/library-page-header.js"; export * from "./ui/library-search-input.js"; diff --git a/src/ui/badge.tsx b/src/ui/badge.tsx index dd5dc33..83c62d5 100644 --- a/src/ui/badge.tsx +++ b/src/ui/badge.tsx @@ -16,7 +16,11 @@ const badgeVariants = cva( accent: "border-primary-emphasis/40 bg-primary/10 text-primary-emphasis", info: "border-accent bg-accent text-accent-foreground", success: "border-success bg-success text-success-foreground", + // Warning reuses accent amber until a dedicated warning pair lands in theme. + warning: "border-primary-emphasis/40 bg-primary/10 text-primary-emphasis", danger: "border-destructive bg-destructive text-destructive-foreground", + shared: "border-accent bg-accent text-accent-foreground", + access: "border-primary-emphasis/40 bg-primary/10 text-primary-emphasis", }, }, defaultVariants: { tone: "neutral" }, diff --git a/src/ui/dialog.tsx b/src/ui/dialog.tsx index eda7ddf..faef8f8 100644 --- a/src/ui/dialog.tsx +++ b/src/ui/dialog.tsx @@ -48,7 +48,7 @@ export function DialogContent({ }: React.ComponentProps & { side?: DialogSide }) { return ( - + ) export function DialogFooter({ className, ...props }: React.ComponentProps<"div">) { return ( -
+
); } @@ -95,3 +102,17 @@ export function DialogTitle({ className, ...props }: React.ComponentProps) { return ; } + +/** Uppercase field label used inside dialog forms. */ +export function DialogFieldLabel({ className, ...props }: React.ComponentProps<"label">) { + return ( +