diff --git a/src/renderer/components/ui.tsx b/src/renderer/components/ui.tsx deleted file mode 100644 index 642d30dc..00000000 --- a/src/renderer/components/ui.tsx +++ /dev/null @@ -1,5 +0,0 @@ -// Barrel re-export — all consumers of "../components/ui" continue to work unchanged. -export { Badge, SectionButton, Panel, Field, Input, TextArea, Select, ActionButton } from "./ui/primitives"; -export { StatusPill, InlineNotice, ConfirmDialog, EmptyState } from "./ui/feedback"; -export { Modal, ListFrame, ListRow } from "./ui/layout"; -export { useFocusTrap, useReducedMotion, ErrorBoundary } from "./ui/hooks"; diff --git a/src/renderer/components/ui/index.ts b/src/renderer/components/ui/index.ts index 866fc9d0..b419a648 100644 --- a/src/renderer/components/ui/index.ts +++ b/src/renderer/components/ui/index.ts @@ -1,4 +1,4 @@ -export { Badge, SectionButton, Panel, Field, Input, TextArea, Select, ActionButton } from "./primitives"; +export { Badge, SectionButton, Panel, Field, Input, TextArea, Select, ActionButton, Spinner, Eyebrow, Card } from "./primitives"; export { StatusPill, InlineNotice, ConfirmDialog, EmptyState } from "./feedback"; export { Modal, ListFrame, ListRow } from "./layout"; export { useFocusTrap, useReducedMotion, ErrorBoundary } from "./hooks"; diff --git a/src/renderer/components/ui/primitives.tsx b/src/renderer/components/ui/primitives.tsx index b763f3bb..715c8a80 100644 --- a/src/renderer/components/ui/primitives.tsx +++ b/src/renderer/components/ui/primitives.tsx @@ -1,4 +1,76 @@ -import { type ElementType } from "react"; +import { type ElementType, type ReactNode as ReactNodeType } from "react"; + +/* ------------------------------------------------------------------ */ +/* Spinner */ +/* ------------------------------------------------------------------ */ + +export function Spinner({ size = 16, className = "" }: { size?: number; className?: string }) { + return ( + + ); +} + +/* ------------------------------------------------------------------ */ +/* Eyebrow */ +/* ------------------------------------------------------------------ */ + +export function Eyebrow({ + children, + tone = "muted", + className = "", +}: { + children: ReactNodeType; + tone?: "muted" | "primary" | "warning" | "destructive" | "success"; + className?: string; +}) { + const toneClass = + tone === "primary" + ? "text-primary" + : tone === "warning" + ? "text-warning" + : tone === "destructive" + ? "text-destructive" + : tone === "success" + ? "text-success" + : "text-muted-foreground"; + return ( +