root = Card([header, statusSection, etaSection, timeline, problemArea])
header = CardHeader("Delivery Tracking", "Order #10482 · FedEx Ground")
statusSection = Card([statusCallout, statusDetail], "sunk")
statusCallout = Callout("info", "Where your package is right now", "Your package arrived at the FedEx sorting facility in Memphis, TN at 9:42 AM and is moving on schedule.")
statusDetail = TextContent("Tracking ID: 7829 3010 4432", "small")
etaSection = Card([etaHeading, etaDate, etaMeta, etaTag], "sunk")
etaHeading = Heading("Estimated delivery", "h3")
etaDate = TextContent("**Friday, March 14**", "large-heavy")
etaMeta = TextContent("Between 9:00 AM and 1:00 PM", "small")
etaTag = Tag("On time", null, null, "success")
timeline = Steps([shipStep, transitStep, outStep, deliverStep])
shipStep = StepsItem("Shipped", "Picked up by FedEx on March 11")
transitStep = StepsItem("In transit", "Currently at the Memphis, TN sorting facility")
outStep = StepsItem("Out for delivery", "Expected on March 14")
deliverStep = StepsItem("Delivered", "Signature required")
problemArea = Card([problemHeading, problemText, reportBtn], "sunk", "column", "m")
problemHeading = Heading("Something wrong with your delivery?", "h3")
problemText = TextContent("If your package is late, damaged, or missing, tell us what happened and we'll look into it.")
reportBtn = DialogBlock("Report a problem", "Report a delivery problem", "We typically respond within 1 business day.", [problemForm], "outline")
problemForm = Form("report-problem", formBtns, [issueField, detailsField, contactField])
issueField = FormControl("What's the issue?", issueSelect)
issueSelect = Select("issue_type", [optLate, optDamaged, optMissing, optOther], "Select an issue")
optLate = SelectItem("late", "Package is late")
optDamaged = SelectItem("damaged", "Package is damaged")
optMissing = SelectItem("missing", "Package is missing")
optOther = SelectItem("other", "Something else")
detailsField = FormControl("Details", detailsArea, "Anything that helps us investigate")
detailsArea = TextArea("details", "Describe what happened...", 4)
contactField = FormControl("Contact email", contactInput, "We'll email you updates on this report")
contactInput = Input("email", "you@example.com", "email")
formBtns = Buttons([submitBtn, cancelBtn])
submitBtn = Button("Submit report", null, "primary")
cancelBtn = Button("Cancel", null, "tertiary")