mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 14:16:12 +00:00
chore(release): v1.28.43 — visual consistency polish
Verified UI-consistency findings from the campaign's design audit, each pixel-faithful except the intended correction: - insights hero band: off-scale py-5/gap-5 → the standard scale; H1 font-semibold → font-bold; sm:text-[28px] → sm:text-3xl. - medication-compliance-chart + recent-achievements-card: hand-rolled muted h-4 icon + text-sm headers → the standard TileHeader primitive so they match sibling tiles. - achievements stat tiles + clinician-view shells: p-5 → p-4 md:p-6. - two text-primary header glyphs (research-mode dialog, enroll-mfa) → text-foreground (never accent on a header glyph); the deliberate badge-boxed icons left untouched. - SheetHeader now reserves the trailing close-X gutter like DialogHeader, closing the latent overlap class for future raw-Sheet consumers. - five raw Dialogs on phone-reachable surfaces → ResponsiveSheet. - new bg-card-scoped healthlog/spacing-scale lint (flags p-5/gap-5 etc. only on card shells; list-marker insets + half-steps excluded) at error, with the five offenders it flagged swept. - dropped the stale CLAUDE.md '18 PascalCase outliers' line (0 remain). Every data-slot preserved. No migration.
This commit is contained in:
1 parent
3a9ed8dd0e
commit
6d83115d16
25 files changed
+717
-544
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
|
||||
import { SheetHeader } from "../sheet";
|
||||
|
||||
/**
|
||||
* The raw `SheetHeader` reserves a trailing gutter for the sheet's absolute
|
||||
* close-X the way `DialogHeader` (pr-9) does — sized to the sheet close
|
||||
* button (`right-4`, min-w-9…11) so a long raw-`<Sheet>` title never slides
|
||||
* under the X. Latent hardening (every current consumer passes its own
|
||||
* header/close), but it forecloses the Documents-class overlap at the
|
||||
* primitive. Consumers that render no close-X drop the reserve via className,
|
||||
* and tailwind-merge keeps the later value.
|
||||
*/
|
||||
describe("<SheetHeader>", () => {
|
||||
it("reserves the trailing close-X gutter (pr-12) by default", () => {
|
||||
const html = renderToStaticMarkup(<SheetHeader>Title</SheetHeader>);
|
||||
expect(html).toContain('data-slot="sheet-header"');
|
||||
expect(html).toContain("pr-12");
|
||||
});
|
||||
|
||||
it("lets a consumer className override the reserve", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<SheetHeader className="p-3">Title</SheetHeader>,
|
||||
);
|
||||
// A later padding utility from the consumer wins under tailwind-merge.
|
||||
expect(html).toContain("p-3");
|
||||
expect(html).not.toMatch(/class="[^"]*\bpr-12\b/);
|
||||
});
|
||||
});
|
||||
@@ -102,7 +102,14 @@ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
<div
|
||||
data-slot="sheet-header"
|
||||
className={cn("flex flex-col gap-1.5 p-4", className)}
|
||||
// Reserve the trailing gutter for the absolute close-X the way
|
||||
// `DialogHeader` (pr-9) does, sized to the sheet's own close button
|
||||
// (`top-3 right-4`, min-w-9…11) so a long raw-`<Sheet>` title never
|
||||
// slides under the X — the Documents close-X overlap class, foreclosed
|
||||
// at the primitive. Consumers that render `showCloseButton={false}`
|
||||
// (or their own close affordance) drop it back with `pr-4` via
|
||||
// `className` — tailwind-merge keeps the later value.
|
||||
className={cn("flex flex-col gap-1.5 p-4 pr-12", className)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user