import type { CSSProperties } from "react"; import { tokens } from "./tokens"; import { adRows, dealRows, marketAds, marketDeals } from "./fixtures"; import type { AdRow, DealRow } from "./types"; // Overlay 05 — РЫНОК · АНАЛОГИ И СДЕЛКИ. // Faithful markup port from "МЕРА Оценка.dc.html" (lines 492-537). // Card A: объявления в продаже (3 KPI + filter chips + adRows table). // Card B: фактические сделки (3 KPI + dealRows table). // Static markup: data from fixtures, no fetching, no interactive state. // One-off tints not present in the v2 palette (kept literal, faithful to design). const KPI_BG = "rgba(238,244,250,.5)"; const BADGE_BG = "#eaf1f8"; const AVITO_DOT = "#e8743b"; const AD_GRID = "2.4fr 1fr 1fr 1.2fr .7fr 1fr"; const DEAL_GRID = "2.6fr 1.2fr 1fr 1.2fr 1fr"; const card: CSSProperties = { background: tokens.surface.w55, border: `1px solid ${tokens.line2}`, borderRadius: 8, overflow: "hidden", }; const cardHeader: CSSProperties = { display: "flex", alignItems: "flex-start", justifyContent: "space-between", padding: "14px 18px", borderBottom: `1px solid ${tokens.lineSoft}`, }; const eyebrow: CSSProperties = { fontSize: "8.5px", letterSpacing: "2px", color: tokens.muted2, marginBottom: 5, }; const cardTitle: CSSProperties = { fontSize: "12px", fontWeight: 600, color: tokens.ink2, }; const headerRight: CSSProperties = { textAlign: "right", fontSize: "9.5px", color: tokens.muted2, lineHeight: 1.6, }; const kpiRow: CSSProperties = { display: "grid", gridTemplateColumns: "repeat(3,1fr)", borderBottom: `1px solid ${tokens.lineSoft}`, background: KPI_BG, }; const kpiLabel: CSSProperties = { fontSize: "9px", letterSpacing: "1.5px", color: tokens.muted2, }; const tableHead: CSSProperties = { gap: "10px", padding: "9px 18px", fontSize: "9px", letterSpacing: "1px", color: tokens.muted2, borderBottom: `1px solid ${tokens.lineSoft2}`, }; const tableRow: CSSProperties = { gap: "10px", padding: "11px 18px", fontSize: "11px", borderBottom: `1px solid ${tokens.lineSoft3}`, alignItems: "center", }; const metaSpan: CSSProperties = { color: tokens.muted2, fontFamily: tokens.font.mono, fontSize: "9.5px", }; const badge: CSSProperties = { fontSize: "9px", background: BADGE_BG, border: `1px solid ${tokens.line2}`, borderRadius: 3, padding: "2px 8px", color: tokens.muted, }; const chip: CSSProperties = { fontSize: "10px", color: tokens.muted, border: `1px solid ${tokens.line2}`, borderRadius: 20, padding: "3px 10px", }; const monoMuted: CSSProperties = { fontFamily: tokens.font.mono, color: tokens.muted, }; const monoInk: CSSProperties = { fontFamily: tokens.font.mono, color: tokens.ink2, }; const monoMuted2: CSSProperties = { fontFamily: tokens.font.mono, color: tokens.muted2, }; function KpiCell({ label, value, unit, valueColor = tokens.ink2, unitColor = tokens.muted, last = false, }: { label: string; value: string; unit: string; valueColor?: string; unitColor?: string; last?: boolean; }) { return (