From dee4769ad2d31ef3cbe1f84f0322f2a84551d504 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 9 Mar 2026 22:44:06 -0500 Subject: [PATCH] feat(pedigree): retheme PedigreeTree to match app dark/warm design system --- client/src/components/PedigreeTree.css | 202 ++++++++++++++----------- 1 file changed, 110 insertions(+), 92 deletions(-) diff --git a/client/src/components/PedigreeTree.css b/client/src/components/PedigreeTree.css index 072a51c..43b69f5 100644 --- a/client/src/components/PedigreeTree.css +++ b/client/src/components/PedigreeTree.css @@ -1,11 +1,17 @@ +/* ─── Pedigree Tree Wrapper ──────────────────────────────────────── */ .pedigree-tree-wrapper { position: relative; width: 100%; height: calc(100vh - 200px); - background: #f9fafb; - border-radius: 8px; + background: radial-gradient( + ellipse at 20% 50%, + rgba(194, 134, 42, 0.06) 0%, + var(--bg-primary) 60% + ); + border-radius: var(--radius); overflow: hidden; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + border: 1px solid var(--border); + box-shadow: var(--shadow-lg); } .tree-container { @@ -13,172 +19,184 @@ height: 100%; } +/* ─── SVG Link Paths ─────────────────────────────────────────────── */ +.pedigree-tree-wrapper svg .rd3t-link { + stroke: var(--border-light) !important; + stroke-width: 1.5px !important; + stroke-opacity: 0.6; +} + +/* ─── Controls ───────────────────────────────────────────────────── */ .pedigree-controls { position: absolute; - top: 20px; - right: 20px; + top: 16px; + right: 16px; z-index: 10; display: flex; - gap: 1rem; + gap: 0.75rem; align-items: center; } .control-group { display: flex; - gap: 0.5rem; - background: white; - padding: 0.5rem; - border-radius: 8px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + gap: 0.25rem; + background: var(--bg-elevated); + padding: 0.375rem; + border-radius: var(--radius-sm); + border: 1px solid var(--border); + box-shadow: var(--shadow); + backdrop-filter: blur(8px); } .control-btn { - background: white; - border: 1px solid #e5e7eb; - border-radius: 6px; - padding: 0.5rem; + background: transparent; + border: 1px solid transparent; + border-radius: var(--radius-sm); + padding: 0.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; - transition: all 0.2s; + color: var(--text-secondary); + transition: var(--transition); } .control-btn:hover { - background: #f3f4f6; - border-color: #d1d5db; + background: var(--bg-tertiary); + border-color: var(--border); + color: var(--primary-light); } .control-btn:active { - transform: scale(0.95); + transform: scale(0.93); } +/* ─── COI Display ────────────────────────────────────────────────── */ .coi-display { - background: white; - padding: 0.75rem 1rem; - border-radius: 8px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + background: var(--bg-elevated); + padding: 0.5rem 0.875rem; + border-radius: var(--radius-sm); + border: 1px solid var(--border); + box-shadow: var(--shadow); display: flex; align-items: center; gap: 0.5rem; + backdrop-filter: blur(8px); } .coi-label { font-weight: 600; - color: #6b7280; - font-size: 0.875rem; + color: var(--text-muted); + font-size: 0.75rem; + text-transform: uppercase; + letter-spacing: 0.05em; } .coi-value { font-weight: 700; - font-size: 1.25rem; + font-size: 1.1rem; + letter-spacing: -0.02em; } -.coi-value.low { - color: #10b981; -} - -.coi-value.medium { - color: #f59e0b; -} - -.coi-value.high { - color: #ef4444; -} +.coi-value.low { color: var(--success); } +.coi-value.medium { color: var(--warning); } +.coi-value.high { color: var(--danger); } +/* ─── Legend ─────────────────────────────────────────────────────── */ .pedigree-legend { position: absolute; - bottom: 20px; - left: 20px; + bottom: 16px; + left: 16px; z-index: 10; - background: white; - padding: 1rem; - border-radius: 8px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + background: var(--bg-elevated); + padding: 0.625rem 1rem; + border-radius: var(--radius-sm); + border: 1px solid var(--border); + box-shadow: var(--shadow); display: flex; - gap: 1.5rem; + gap: 1.25rem; + backdrop-filter: blur(8px); } .legend-item { display: flex; align-items: center; - gap: 0.5rem; - font-size: 0.875rem; - color: #6b7280; + gap: 0.4rem; + font-size: 0.8rem; + color: var(--text-secondary); + font-weight: 500; } .legend-color { - width: 20px; - height: 20px; + width: 14px; + height: 14px; border-radius: 50%; - border: 2px solid white; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + border: 2px solid rgba(255,255,255,0.15); + box-shadow: 0 0 6px rgba(0,0,0,0.4); } -.legend-color.male { - background: #3b82f6; +.legend-color.male { background: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.4); } +.legend-color.female { background: #ec4899; box-shadow: 0 0 8px rgba(236,72,153,0.4); } + +/* ─── Zoom Indicator ─────────────────────────────────────────────── */ +.zoom-indicator { + position: absolute; + bottom: 16px; + right: 16px; + z-index: 10; + background: var(--bg-elevated); + border: 1px solid var(--border); + border-radius: var(--radius-sm); + padding: 0.3rem 0.6rem; + font-size: 0.7rem; + color: var(--text-muted); + font-variant-numeric: tabular-nums; + backdrop-filter: blur(8px); } -.legend-color.female { - background: #ec4899; -} - -/* Mobile responsive */ +/* ─── Mobile ─────────────────────────────────────────────────────── */ @media (max-width: 768px) { .pedigree-tree-wrapper { height: calc(100vh - 150px); } - + .pedigree-controls { top: 10px; right: 10px; flex-direction: column; - gap: 0.5rem; + gap: 0.4rem; } - + .coi-display { - padding: 0.5rem 0.75rem; + padding: 0.375rem 0.625rem; } - - .coi-label { - font-size: 0.75rem; - } - - .coi-value { - font-size: 1rem; - } - + + .coi-label { font-size: 0.7rem; } + .coi-value { font-size: 0.95rem; } + .pedigree-legend { bottom: 10px; left: 10px; - padding: 0.75rem; - gap: 1rem; - } - - .legend-item { - font-size: 0.75rem; - } - - .legend-color { - width: 16px; - height: 16px; + padding: 0.5rem 0.75rem; + gap: 0.875rem; } + + .legend-item { font-size: 0.75rem; } + .legend-color { width: 12px; height: 12px; } } -/* Print styles */ +/* ─── Print ──────────────────────────────────────────────────────── */ @media print { .pedigree-controls, - .pedigree-legend { - display: none; - } - + .pedigree-legend, + .zoom-indicator { display: none; } + .pedigree-tree-wrapper { height: 100vh; box-shadow: none; background: white; + border: none; } - - .tree-container { - page-break-inside: avoid; - } -} \ No newline at end of file + + .tree-container { page-break-inside: avoid; } +}