Field groups: tighter style + apply to report
Form: dropped the boxed card treatment for FieldGroupCard in favor of a leaf-tinted left rule + small uppercase mini-label. Eats only ~14px of horizontal space (border + pl-3/sm:pl-4) instead of ~32-40px for the previous bg-tinted card with px-4/sm:px-5 on both sides, so the inner 2-col grid keeps more breathing room for the fields themselves. Report: same field-group concept now applies to ReportSection. Grouped FieldHistoryRows render together inside a leaf-tinted left rule with a small label above. Walk preserves the declared field order — a group is emitted at its first member's position; the other members are skipped when the loop later reaches them. Mixes cleanly with the existing MembershipChart inline insertion and the divide-y rhythm of standalone rows.
This commit is contained in:
@@ -348,9 +348,10 @@ function LockedBanner() {
|
||||
|
||||
/**
|
||||
* Visual cluster of related fields inside a section (e.g. "Market Study"
|
||||
* grouping its date + upload fields). Renders as a quiet bordered card
|
||||
* with an optional heading; the fields inside use the same two-column
|
||||
* grid rules as the standalone per-field grid above/below.
|
||||
* grouping its date + upload fields). Lightweight treatment: a leaf-tinted
|
||||
* left rule and an optional uppercase mini-label. No boxed background or
|
||||
* heavy padding — preserves the horizontal space the inner 2-col grid has
|
||||
* to work with, while still signaling "these belong together."
|
||||
*/
|
||||
function FieldGroupCard({
|
||||
label,
|
||||
@@ -372,21 +373,26 @@ function FieldGroupCard({
|
||||
errors: FieldErrors;
|
||||
}) {
|
||||
return (
|
||||
<div className="rounded-md border border-rule-soft bg-paper-2/30 px-4 py-4 sm:px-5 sm:py-5">
|
||||
<div className="border-l-2 border-leaf-300/60 pl-3 sm:pl-4">
|
||||
{label && (
|
||||
<h3 className="font-display text-sm font-medium uppercase tracking-[0.08em] text-ink-soft">
|
||||
<h3 className="font-display text-[11px] font-medium uppercase tracking-[0.1em] text-ink-soft">
|
||||
{label}
|
||||
</h3>
|
||||
)}
|
||||
{intro && (
|
||||
<p className={"max-w-prose text-xs leading-relaxed text-ink-mute " + (label ? "mt-1" : "")}>
|
||||
<p
|
||||
className={
|
||||
"max-w-prose text-xs leading-relaxed text-ink-mute " +
|
||||
(label ? "mt-0.5" : "")
|
||||
}
|
||||
>
|
||||
{intro}
|
||||
</p>
|
||||
)}
|
||||
<div
|
||||
className={
|
||||
"grid grid-cols-1 gap-x-7 gap-y-5 md:grid-cols-2 " +
|
||||
(label || intro ? "mt-3" : "")
|
||||
(label || intro ? "mt-2" : "")
|
||||
}
|
||||
>
|
||||
{fields.map((f) => {
|
||||
|
||||
Reference in New Issue
Block a user