diff --git a/src/components/DocumentTagCloud.tsx b/src/components/DocumentTagCloud.tsx index b3ce99a1e..49bac53dd 100644 --- a/src/components/DocumentTagCloud.tsx +++ b/src/components/DocumentTagCloud.tsx @@ -53,6 +53,15 @@ function confidenceTitle(tag: SmartDocumentTag) { return `${tag.group}: ${tag.source} tag, ${Math.round(tag.confidence * 100)}% confidence`; } +/** + * Renders a document tag with group-specific styling and optional search interaction. + * + * @param tag - The document tag to display. + * @param compact - Whether to use compact sizing. + * @param selected - Whether to indicate the tag as selected. + * @param onTagClick - Optional callback invoked when the tag is clicked. + * @returns The rendered document tag chip. + */ function DocumentTagChip({ tag, compact, diff --git a/src/components/applications-launcher-page.tsx b/src/components/applications-launcher-page.tsx index 3af9807e4..446c2a73b 100644 --- a/src/components/applications-launcher-page.tsx +++ b/src/components/applications-launcher-page.tsx @@ -321,6 +321,12 @@ function QuickActions({ onSelect, mobile }: { onSelect: (id: string) => void; mo ); } +/** + * Renders responsive tabs for selecting a tool category. + * + * @param activeFilter - The currently selected tool category. + * @param onFilterChange - Called with the selected category when a tab is activated. + */ function FilterTabs({ activeFilter, onFilterChange, diff --git a/src/components/clinical-dashboard/favourites-command-library-page.tsx b/src/components/clinical-dashboard/favourites-command-library-page.tsx index 0cfb03fbe..054bd4e82 100644 --- a/src/components/clinical-dashboard/favourites-command-library-page.tsx +++ b/src/components/clinical-dashboard/favourites-command-library-page.tsx @@ -362,6 +362,11 @@ function ContinueStrip({ item, onSelect }: { item: FavouriteItem; onSelect: (id: ); } +/** + * Renders a menu of actions for a favourite item. + * + * @param item - The favourite item associated with the available actions + */ function RowActionsMenu({ item }: { item: FavouriteItem }) { const [open, setOpen] = useState(false); const buttonRef = useRef(null); diff --git a/src/components/clinical-dashboard/favourites-library-nav.tsx b/src/components/clinical-dashboard/favourites-library-nav.tsx index c6ec59429..8d2e0f732 100644 --- a/src/components/clinical-dashboard/favourites-library-nav.tsx +++ b/src/components/clinical-dashboard/favourites-library-nav.tsx @@ -224,6 +224,12 @@ function SidebarRow({ entry }: { entry: SidebarEntry }) { ); } +/** + * Renders the favourites library navigation sidebar in expanded or compact mode. + * + * @param collapsed - Whether to display the compact sidebar layout. + * @param onCollapsedChange - Called when the user requests a different sidebar layout. + */ export function FavouritesSidebar({ collapsed, onCollapsedChange, diff --git a/src/components/differentials/differential-detail-page.tsx b/src/components/differentials/differential-detail-page.tsx index f22bb6210..d6526c33a 100644 --- a/src/components/differentials/differential-detail-page.tsx +++ b/src/components/differentials/differential-detail-page.tsx @@ -126,6 +126,14 @@ const sectionItemIconClass: Partial> test: "text-[color:var(--info)]", }; +/** + * Renders section items according to the section tone. + * + * @param section - The section whose tone determines the item layout and styling + * @param items - The items to display + * @param overlapLinks - Maps overlap item labels to diagnosis slugs for linked items + * @returns The rendered section item list + */ function SectionItems({ section, items, @@ -702,6 +710,14 @@ function FooterStatus({ ); } +/** + * Renders desktop actions for comparing, copying, and saving a diagnosis. + * + * @param record - The diagnosis record whose content is copied. + * @param saved - Whether the diagnosis is currently saved. + * @param onToggleSaved - Called when the saved state is toggled. + * @param onCompare - Called when comparison is requested. + */ function TopActions({ record, saved, @@ -833,6 +849,12 @@ const detailTabs: Array<{ id: DifferentialDetailTabId; label: string }> = [ { id: "source", label: "Source" }, ]; +/** + * Renders keyboard-navigable tabs for the diagnosis detail sections. + * + * @param active - The currently selected tab. + * @param onChange - Called when the selected tab changes. + */ function Tabs({ active, onChange, diff --git a/src/components/services/service-detail-page.tsx b/src/components/services/service-detail-page.tsx index 1ef3fadbe..98fe8c746 100644 --- a/src/components/services/service-detail-page.tsx +++ b/src/components/services/service-detail-page.tsx @@ -264,6 +264,12 @@ function SummaryCard({ card }: { card: ServiceSummaryCard }) { ); } +/** + * Displays referral information rows with their values and copy actions. + * + * @param rows - The referral information rows to display + * @param onCopy - Callback invoked with a row value and feedback label when copying is requested + */ function ReferralTable({ rows, onCopy,