root = Card([header, locationCard, dateCard, timeline, reportSection])
header = CardHeader("Delivery Tracking", "Order #2847-6621")
locationCard = Card([locationTitle, locationCallout, shipmentTable], "sunk")
locationTitle = Heading("Package location", "h2")
locationCallout = Callout("info", "In transit", "Arrived at the Charlotte regional sorting facility")
shipmentTable = Table([carrierCol, trackingCol, originCol, destCol])
carrierCol = Col("Carrier", ["ExpressPost"])
trackingCol = Col("Tracking #", ["EP9283774412"])
originCol = Col("Origin", ["Austin, TX"])
destCol = Col("Destination", ["Portland, OR"])
dateCard = Card([dateHeading, dateCallout, dateProgress], "sunk")
dateHeading = Heading("Estimated delivery", "h2")
dateCallout = TextCallout("success", "Friday, March 14", "Arriving by 8:00 PM")
dateProgress = Progress(72, "72% of the journey complete")
timeline = Card([timelineHeading, steps], "sunk")
timelineHeading = Heading("Shipment progress", "h2")
steps = Steps([step1, step2, step3, step4])
step1 = StepsItem("Order placed", "March 8, 9:14 AM")
step2 = StepsItem("Shipped from Austin, TX", "March 10, 4:32 PM")
step3 = StepsItem("In transit", "Arrived at Charlotte facility — March 12, 7:05 AM")
step4 = StepsItem("Out for delivery", "Expected March 14")
reportSection = Card([reportHeading, reportDialog, helpNote], "sunk")
reportHeading = Heading("Something wrong?", "h2")
reportDialog = DialogBlock("Report a problem", "Report a delivery problem", "Tell us what went wrong and we'll investigate.", [reportForm], "secondary")
reportForm = Form("report-problem", reportButtons, [issueType, issueDetails])
issueType = FormControl("Issue type", issueSelect)
issueSelect = Select("issue_type", [issueLate, issueDamaged, issueLost, issueOther], "Select an issue")
issueLate = SelectItem("late", "Delivery is late")
issueDamaged = SelectItem("damaged", "Package arrived damaged")
issueLost = SelectItem("lost", "Package is lost")
issueOther = SelectItem("other", "Something else")
issueDetails = FormControl("Details", issueTextarea, "Add any details that help us investigate")
issueTextarea = TextArea("details", "Describe what happened...", 4)
reportButtons = Buttons([submitReport, cancelReport])
submitReport = Button("Submit report", null, "primary")
cancelReport = Button("Cancel", null, "tertiary")
helpNote = TextContent("Need urgent help? Call support at **1-800-555-0199**.", "small")