root = Card([header, renewalWarning, overviewCard, activityCard, contactsCard, followupsCard, noteCard, logCallDialog], "card", "column", "l")
header = CardHeader("Acme Corp", "Owner: Sarah Chen")
renewalWarning = Callout("warning", "Renewal coming up", "Contract renews Oct 28 — 12 days away. Start the renewal process.")
overviewCard = Card([overviewTitle, overviewTable], "sunk")
overviewTitle = Heading("Deal overview", "h3")
overviewTable = Table([overviewMetricCol, overviewValueCol])
overviewMetricCol = Col("Metric", ["Total deal value", "Current stage"])
overviewValueCol = Col("Value", ["$128,400", "Negotiation"])
activityCard = Card([activityTitle, activityList], "sunk")
activityTitle = Heading("Recent activity", "h3")
activityList = ListBlock([meetingItem, pricingItem, discoveryItem], "number")
meetingItem = ListItem("Meeting with procurement", "Today, 10:30 AM")
pricingItem = ListItem("Sent revised pricing", "Yesterday, 4:15 PM")
discoveryItem = ListItem("Initial discovery call", "Sep 12, 2:00 PM")
contactsCard = Card([contactsTitle, contactsTable], "sunk")
contactsTitle = Heading("Contacts", "h3")
contactsTable = Table([contactNameCol, contactRoleCol])
contactNameCol = Col("Name", ["Jane Doe", "John Smith", "Emily Davis"])
contactRoleCol = Col("Role", ["Procurement Manager", "IT Director", "CFO"])
followupsCard = Card([followupsTitle, followupsTable], "sunk")
followupsTitle = Heading("Open follow-ups", "h3")
followupsTable = Table([followupSubjectCol, followupDueCol])
followupSubjectCol = Col("Follow-up", ["Quote follow-up", "Security review", "Contract redlines"])
followupDueCol = Col("Due", ["Oct 18", "Oct 22", "Oct 25"])
noteCard = Card([noteTitle, noteForm], "sunk")
noteTitle = Heading("Jot a note", "h3")
noteForm = Form("note-form", noteButtons, [noteField])
noteField = FormControl("Note", noteInput)
noteInput = TextArea("note", "Type a note...", 3)
noteButtons = Buttons([saveNoteBtn])
saveNoteBtn = Button("Save note", null, "primary")
logCallDialog = DialogBlock("Log call", "Log a call", "Record details about your latest call", [callForm], "secondary")
callForm = Form("call-form", callButtons, [callSubjectField, callDateField, callNotesField])
callSubjectField = FormControl("Subject", callSubjectInput)
callSubjectInput = Input("call_subject", "e.g. Pricing discussion")
callDateField = FormControl("Date", callDatePicker)
callDatePicker = DatePicker("call_date", "single")
callNotesField = FormControl("Notes", callNotesArea)
callNotesArea = TextArea("call_notes", "What was discussed?", 4)
callButtons = Buttons([saveCallBtn, cancelCallBtn])
saveCallBtn = Button("Save call", null, "primary")
cancelCallBtn = Button("Cancel", null, "tertiary")