Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions docs/design-system/COMPONENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,14 @@ _Remaining from the original eight in this document:_ `DocumentFrame` is built l
(`src/components/ui/document-frame.tsx`, shell-only in `DocumentViewer`) but is not yet among
the 55 design-sync registered visual exports — registration and full controls remain follow-up.

`AppliedFilters` (`src/components/ui/applied-filters.tsx`) and `CopyButton`
(`src/components/ui/copy-button.tsx`) are built, proof-migrated (CatalogueToolbar chip row
and answer-status copy control), and covered by DOM tests. They are **not** design-sync
registered — do not count them toward the 55 visual exports, and do not treat them as
specified-not-built. Registration remains follow-up (the Chip/Button add path is a 55-row
cascade).

`OverlayRoot`, `SegmentedControl`, and the PR 6–8 components are built and represented by the
local publication contract. The generated snapshot records their current product-import counts;
registration still proves only a source/API/preview/test reference and does not prove remote
design-project publication or browser acceptance.

_P1 reusable (specified in outline only):_ `Menu`/`Popover` · `KeyValue` ·
`FilterSheet` · `ResponsiveActionGroup` · `ScrollableStrip`/
`ScrollAffordance` · `SourceLink` · `Banner` · `CopyField` ·
`AppliedFilters`/`FilterSheet` · `ResponsiveActionGroup` · `ScrollableStrip`/
`ScrollAffordance` · `SourceLink` · `Banner` · `CopyButton`/`CopyField` ·
state family (`ErrorState`, `OfflineState`, `PermissionDeniedState`, `NotFoundState`,
`UnavailableState`).

Expand Down Expand Up @@ -972,7 +965,7 @@ tests to run.

Registered public components: 55
Components with a valid design-sync preview: 55
Components with product imports: 36
Components with product imports: 39

This generated snapshot is a local source-derived inventory. It does not assert remote design-project publication.

Expand All @@ -984,7 +977,7 @@ This generated snapshot is a local source-derived inventory. It does not assert
| `AsyncButton` | controls | yes | yes | inherited-global-root | yes | no | 4 |
| `Breadcrumb` | layout | yes | yes | inherited-global-root | yes | no | 1 |
| `Button` | controls | yes | yes | inherited-global-root | yes | no | 21 |
| `Checkbox` | controls | yes | yes | no | yes | no | 0 |
| `Checkbox` | controls | yes | yes | inherited-global-root | yes | no | 1 |
| `Chip` | controls | yes | yes | inherited-global-root | yes | no | 6 |
| `ChoiceChip` | controls | yes | yes | inherited-global-root | yes | no | 4 |
| `Citation` | source | yes | yes | no | yes | no | 0 |
Expand All @@ -999,8 +992,8 @@ This generated snapshot is a local source-derived inventory. It does not assert
| `ErrorState` | feedback | yes | yes | no | yes | no | 0 |
| `ErrorSummary` | feedback | yes | yes | no | yes | no | 0 |
| `ExternalTextLink` | controls | yes | yes | no | yes | no | 0 |
| `FieldError` | feedback | yes | yes | no | yes | no | 0 |
| `FieldHint` | feedback | yes | yes | no | yes | no | 0 |
| `FieldError` | feedback | yes | yes | inherited-global-root | yes | no | 1 |
| `FieldHint` | feedback | yes | yes | inherited-global-root | yes | no | 1 |
| `FormField` | controls | yes | yes | inherited-global-root | yes | no | 2 |
| `IconButton` | controls | yes | yes | inherited-global-root | yes | no | 2 |
| `InlineNotice` | feedback | yes | yes | inherited-global-root | yes | no | 7 |
Expand Down
22 changes: 11 additions & 11 deletions docs/design-system/adoption-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@
"source": "src/components/ui/choice.tsx",
"sourceExported": true,
"entryExported": true,
"directImportFiles": [],
"productImportFiles": [],
"directImportFiles": ["src/components/clinical-dashboard/document-admin.tsx"],
"productImportFiles": ["src/components/clinical-dashboard/document-admin.tsx"],
"designSync": {
"listedInSourceMap": true,
"listedInDtsProps": true,
Expand All @@ -381,8 +381,8 @@
},
"built": true,
"locallyRegistered": true,
"v2ShellMounted": false,
"v2MountMode": "none",
"v2ShellMounted": true,
"v2MountMode": "inherited-global-root",
"proofDeclared": true,
"baselineCommitted": false
},
Expand Down Expand Up @@ -920,7 +920,7 @@
"sourceExported": true,
"entryExported": true,
"directImportFiles": ["src/components/ui/choice.tsx"],
"productImportFiles": [],
"productImportFiles": ["src/components/ui/choice.tsx"],
"designSync": {
"listedInSourceMap": true,
"listedInDtsProps": true,
Expand All @@ -936,8 +936,8 @@
},
"built": true,
"locallyRegistered": true,
"v2ShellMounted": false,
"v2MountMode": "none",
"v2ShellMounted": true,
"v2MountMode": "inherited-global-root",
"proofDeclared": true,
"baselineCommitted": false
},
Expand All @@ -948,7 +948,7 @@
"sourceExported": true,
"entryExported": true,
"directImportFiles": ["src/components/ui/choice.tsx"],
"productImportFiles": [],
"productImportFiles": ["src/components/ui/choice.tsx"],
"designSync": {
"listedInSourceMap": true,
"listedInDtsProps": true,
Expand All @@ -964,8 +964,8 @@
},
"built": true,
"locallyRegistered": true,
"v2ShellMounted": false,
"v2MountMode": "none",
"v2ShellMounted": true,
"v2MountMode": "inherited-global-root",
"proofDeclared": true,
"baselineCommitted": false
},
Expand Down Expand Up @@ -3904,7 +3904,7 @@
"summary": {
"registeredComponentCount": 55,
"previewCount": 55,
"productImportedComponentCount": 36,
"productImportedComponentCount": 39,
"rootCount": 76,
"productionRouteCount": 68,
"nextUiEntryCount": 128
Expand Down
6 changes: 3 additions & 3 deletions src/components/calculators/calculator-ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ export function ResetButton({ onReset, disabled }: { onReset: () => void; disabl
onClick={onReset}
disabled={disabled}
className={cn(
"inline-flex min-h-10 items-center gap-2 rounded-lg border border-[color:var(--border)] bg-[color:var(--surface)] px-3 text-sm-minus font-bold text-[color:var(--text-muted)] transition hover:border-[color:var(--border-strong)] hover:text-[color:var(--text)] disabled:pointer-events-none disabled:opacity-40",
"inline-flex min-h-tap items-center gap-2 rounded-lg border border-[color:var(--border)] bg-[color:var(--surface)] px-3 text-sm-minus font-bold text-[color:var(--text-muted)] transition hover:border-[color:var(--border-strong)] hover:text-[color:var(--text)] disabled:pointer-events-none disabled:opacity-40",
focusRing,
)}
>
Expand Down Expand Up @@ -512,7 +512,7 @@ export function CopyResultButton({
onClick={copy}
disabled={!state.started}
className={cn(
"inline-flex min-h-10 items-center gap-1.5 rounded-lg border border-[color:var(--border)] bg-[color:var(--surface)] px-2.5 text-2xs font-bold text-[color:var(--text-muted)] transition hover:border-[color:var(--border-strong)] hover:text-[color:var(--text)] disabled:pointer-events-none disabled:opacity-40",
"inline-flex min-h-tap items-center gap-1.5 rounded-lg border border-[color:var(--border)] bg-[color:var(--surface)] px-2.5 text-2xs font-bold text-[color:var(--text-muted)] transition hover:border-[color:var(--border-strong)] hover:text-[color:var(--text)] disabled:pointer-events-none disabled:opacity-40",
focusRing,
className,
)}
Expand Down Expand Up @@ -642,7 +642,7 @@ export function CalculatorItems({
type="button"
onClick={() => onAnswersChange(seedCheckboxDefaults(calc, answers))}
className={cn(
"mt-1 inline-flex min-h-10 items-center justify-center gap-2 rounded-lg border border-dashed border-[color:var(--border-strong)] bg-[color:var(--surface-subtle)] px-3 text-sm-minus font-bold text-[color:var(--text-muted)] transition hover:border-[color:var(--clinical-accent-border)] hover:text-[color:var(--text)]",
"mt-1 inline-flex min-h-tap items-center justify-center gap-2 rounded-lg border border-dashed border-[color:var(--border-strong)] bg-[color:var(--surface-subtle)] px-3 text-sm-minus font-bold text-[color:var(--text-muted)] transition hover:border-[color:var(--clinical-accent-border)] hover:text-[color:var(--text)]",
focusRing,
)}
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/calculators/clinical-console.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function CalculatorsClinicalConsoleMockup() {
aria-pressed={active}
onClick={() => setActiveId(entry.id)}
className={cn(
"inline-flex min-h-10 shrink-0 items-center gap-2 rounded-md border px-3 text-sm-minus font-bold",
"inline-flex min-h-tap shrink-0 items-center gap-2 rounded-md border px-3 text-sm-minus font-bold",
active
? "border-[color:var(--clinical-accent-border)] bg-[color:var(--clinical-accent-soft)] text-[color:var(--clinical-accent)]"
: "border-[color:var(--border)] bg-[color:var(--surface)] text-[color:var(--text-muted)]",
Expand Down Expand Up @@ -231,7 +231,7 @@ export function CalculatorsClinicalConsoleMockup() {
onClick={() => setAnswers({})}
disabled={!derived.started}
className={cn(
"inline-flex min-h-9 items-center rounded-md border border-[color:var(--border)] bg-[color:var(--surface)] px-2.5 text-2xs font-bold text-[color:var(--text-muted)] hover:text-[color:var(--text)] disabled:pointer-events-none disabled:opacity-40",
"inline-flex min-h-tap items-center rounded-md border border-[color:var(--border)] bg-[color:var(--surface)] px-2.5 text-2xs font-bold text-[color:var(--text-muted)] hover:text-[color:var(--text)] disabled:pointer-events-none disabled:opacity-40",
focusRing,
)}
>
Expand Down
14 changes: 7 additions & 7 deletions src/components/clinical-dashboard/DocumentManagerPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export function IndexingMonitor({
type="button"
onClick={() => onRetry(job.id)}
disabled={busy}
className={cn(floatingControl, "min-h-9 px-3 text-xs")}
className={cn(floatingControl, "px-3 text-xs")}
>
{busy ? (
<Loader2 aria-hidden="true" className="h-4 w-4 animate-spin" />
Expand All @@ -215,7 +215,7 @@ export function IndexingMonitor({
type="button"
onClick={() => onReindex(job.document_id)}
disabled={busy || job.status === "processing"}
className={cn(floatingControl, "min-h-9 px-3 text-xs")}
className={cn(floatingControl, "px-3 text-xs")}
>
{busy ? (
<Loader2 aria-hidden="true" className="h-4 w-4 animate-spin" />
Expand All @@ -228,7 +228,7 @@ export function IndexingMonitor({
type="button"
onClick={() => onEnrich(job.document_id)}
disabled={busy || job.status === "processing"}
className={cn(floatingControl, "min-h-9 px-3 text-xs")}
className={cn(floatingControl, "px-3 text-xs")}
>
{busy ? (
<Loader2 aria-hidden="true" className="h-4 w-4 animate-spin" />
Expand Down Expand Up @@ -352,7 +352,7 @@ export function IngestionQualityConsole({
) : null}
</div>
<div className="flex flex-wrap items-center gap-2">
<Link href={`/documents/${item.documentId}`} className={cn(floatingControl, "min-h-9 px-3 text-xs")}>
<Link href={`/documents/${item.documentId}`} className={cn(floatingControl, "px-3 text-xs")}>
<ExternalLink aria-hidden="true" className="h-4 w-4" />
Open
</Link>
Expand All @@ -361,7 +361,7 @@ export function IngestionQualityConsole({
type="button"
onClick={() => item.jobId && onRetry(item.jobId)}
disabled={busy}
className={cn(floatingControl, "min-h-9 px-3 text-xs")}
className={cn(floatingControl, "px-3 text-xs")}
>
{busy ? (
<Loader2 aria-hidden="true" className="h-4 w-4 animate-spin" />
Expand All @@ -375,7 +375,7 @@ export function IngestionQualityConsole({
type="button"
onClick={() => onReindex(item.documentId)}
disabled={busy}
className={cn(floatingControl, "min-h-9 px-3 text-xs")}
className={cn(floatingControl, "px-3 text-xs")}
>
{busy ? (
<Loader2 aria-hidden="true" className="h-4 w-4 animate-spin" />
Expand All @@ -388,7 +388,7 @@ export function IngestionQualityConsole({
type="button"
onClick={() => onEnrich(item.documentId)}
disabled={busy}
className={cn(floatingControl, "min-h-9 px-3 text-xs")}
className={cn(floatingControl, "px-3 text-xs")}
>
{busy ? (
<Loader2 aria-hidden="true" className="h-4 w-4 animate-spin" />
Expand Down
37 changes: 15 additions & 22 deletions src/components/clinical-dashboard/document-admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
documentOrganizationProfile,
} from "@/components/DocumentOrganizationBadges";
import { DocumentTagCloud } from "@/components/DocumentTagCloud";
import { Checkbox } from "@/components/ui/choice";
import { SafeBoldText } from "@/components/SafeBoldText";
import { StatusBadge } from "@/components/clinical-dashboard/badges";
import type {
Expand Down Expand Up @@ -182,7 +183,7 @@ function DocumentLabelReviewPanel({

return (
<details className={cn(sourceCard, "group p-3")}>
<summary className="flex min-h-[42px] cursor-pointer list-none items-center justify-between gap-3">
<summary className="flex min-h-tap cursor-pointer list-none items-center justify-between gap-3">
<span className="flex min-w-0 items-center gap-2">
<span className={cn(iconTilePremium, "h-8 w-8")}>
<ClipboardCheck aria-hidden="true" className="h-4 w-4" />
Expand Down Expand Up @@ -272,7 +273,7 @@ function DocumentLabelReviewPanel({
`restore:${label.id}`,
)
}
className={cn(floatingControl, "min-h-8 px-2 text-2xs")}
className={cn(floatingControl, "px-2 text-2xs")}
>
Restore
</button>
Expand All @@ -289,7 +290,7 @@ function DocumentLabelReviewPanel({
`approve:${label.id}`,
)
}
className={cn(floatingControl, "min-h-8 px-2 text-2xs")}
className={cn(floatingControl, "px-2 text-2xs")}
>
Approve
</button>
Expand All @@ -304,7 +305,7 @@ function DocumentLabelReviewPanel({
`hide:${label.id}`,
)
}
className={cn(floatingControl, "min-h-8 px-2 text-2xs text-[color:var(--danger)]")}
className={cn(floatingControl, "px-2 text-2xs text-[color:var(--danger)]")}
>
Hide
</button>
Expand Down Expand Up @@ -387,7 +388,7 @@ function DocumentTagQualityPanel({ documents }: { documents: ClinicalDocument[]

return (
<details className={cn(panelSubtle, "group p-3")}>
<summary className="flex cursor-pointer list-none items-center justify-between gap-3">
<summary className="flex min-h-tap cursor-pointer list-none items-center justify-between gap-3">
<span className="flex min-w-0 items-center gap-2">
<span className={cn(iconTilePremium, "h-8 w-8")}>
<Tag aria-hidden="true" className="h-4 w-4" />
Expand Down Expand Up @@ -482,7 +483,7 @@ function DocumentIndexRepairPanel({ documents }: { documents: ClinicalDocument[]

return (
<details className={cn(sourceCard, "p-3")}>
<summary className="flex min-h-[42px] cursor-pointer list-none items-center justify-between gap-3">
<summary className="flex min-h-tap cursor-pointer list-none items-center justify-between gap-3">
<span className="flex min-w-0 items-center gap-2">
<span className={cn(iconTilePremium, "h-8 w-8")}>
<ShieldAlert aria-hidden="true" className="h-4 w-4" />
Expand Down Expand Up @@ -848,21 +849,13 @@ export function DocumentDrawer({

{/* Admin Queue Toggle */}
{isAdminMode ? (
<div className="flex items-center gap-2 py-1">
<input
type="checkbox"
id="needs-review-filter"
checked={showNeedsReviewOnly}
onChange={(e) => setShowNeedsReviewOnly(e.target.checked)}
className="rounded border-[color:var(--border)] text-[color:var(--primary)] focus:ring-[color:var(--primary)] h-4 w-4"
/>
<label
htmlFor="needs-review-filter"
className="text-xs font-semibold text-[color:var(--text-muted)] cursor-pointer select-none"
>
Show &quot;Needs review&quot; queue only
</label>
</div>
// DS-P1-15: Choice Checkbox owns the controlBase focus idiom (no native focus:ring).
<Checkbox
id="needs-review-filter"
checked={showNeedsReviewOnly}
onChange={(event) => setShowNeedsReviewOnly(event.target.checked)}
label={'Show "Needs review" queue only'}
/>
) : null}
{pagination && pagination.total > documents.length ? (
<p className={cn("text-xs", textMuted)}>
Expand Down Expand Up @@ -935,7 +928,7 @@ export function DocumentDrawer({
</button>
</div>
<details className="rounded-lg border border-[color:var(--border)] bg-[color:var(--surface)] p-3">
<summary className="cursor-pointer text-sm font-semibold text-[color:var(--text)]">
<summary className="flex min-h-tap cursor-pointer items-center text-sm font-semibold text-[color:var(--text)]">
Bulk metadata editor
</summary>
<div className="mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-4">
Expand Down
Loading
Loading