"use client" /** * WhatsNewAnnouncementCard — compact release hero for the small What's new sheet. * * Media header, eyebrow, title, optional highlight rows (icon + title + body), * and one full-width primary action. Falls back to a single description paragraph * when `highlights` is omitted. */ import * as React from "react" import { cn } from "../../lib/utils" import { Button } from "./button" import { Tip } from "./tip" export interface WhatsNewHighlight { /** Font Awesome icon name without style prefix, e.g. `fa-sparkles`. */ icon: string title: string body: string } export interface WhatsNewAnnouncementCardProps { title: string eyebrow?: string /** Shown as eyebrow when `eyebrow` is absent, e.g. `New in Clinical Education`. */ sourceLabel?: string media?: React.ReactNode brandColor?: string highlights?: WhatsNewHighlight[] description?: string primaryActionLabel?: string onPrimaryAction?: () => void onDismiss?: () => void className?: string /** Override media region aspect, e.g. `aspect-video` for a shorter sheet hero. */ mediaClassName?: string } function brandMediaWash(color: string): string { return `linear-gradient( 145deg, color-mix(in oklch, ${color} 36%, var(--background)) 0%, color-mix(in oklch, ${color} 16%, var(--background)) 55%, var(--background) 100% )` } function WhatsNewAnnouncementDismiss({ title, onClick, }: { title: string onClick: () => void }) { return (