root = Card([header, statsRow, weeklySection, logSection], "card", "column", "l")
header = CardHeader("Today's Summary", "Friday, May 16")
statsRow = Card([stepsCard, caloriesCard], "clear", "row", "m")
stepsCard = Card([stepsHeading, stepsProgress, stepsSub], "sunk", "column", "xs")
stepsHeading = Heading("Steps", "h3")
stepsProgress = Progress(84, "8,432 of 10,000 steps")
stepsSub = TextContent("Daily goal: 10,000 steps", "small")
caloriesCard = Card([caloriesHeading, caloriesValue, caloriesSub], "sunk", "column", "xs")
caloriesHeading = Heading("Calories burned", "h3")
caloriesValue = TextContent("642 kcal", "large-heavy")
caloriesSub = TextContent("Active energy today", "small")
weeklySection = Card([weeklyHeading, weeklyChart], "sunk", "column", "m")
weeklyHeading = Heading("Workouts this week", "h3")
weeklyChart = BarChart(["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], [minutesSeries], "grouped", "Day", "Minutes")
minutesSeries = Series("Minutes", [35, 0, 45, 30, 0, 60, 50])
logSection = Card([logHeading, logForm], "sunk", "column", "m")
logHeading = Heading("Log a workout", "h3")
logForm = Form("log-workout", logButtons, [typeField, durationField, intensityField])
typeField = FormControl("Workout type", typeSelect)
typeSelect = Select("type", [typeRun, typeCycle, typeStrength, typeYoga], "Select a workout")
typeRun = SelectItem("Running", "Running")
typeCycle = SelectItem("Cycling", "Cycling")
typeStrength = SelectItem("Strength", "Strength")
typeYoga = SelectItem("Yoga", "Yoga")
durationField = FormControl("Duration (minutes)", durationInput, "15–120 minutes")
durationInput = Input("duration", "e.g. 30", "number")
intensityField = FormControl("Intensity", intensityRadio)
intensityRadio = RadioGroup("intensity", [intensityEasy, intensityModerate, intensityHard], "moderate")
intensityEasy = RadioItem("Easy", "Comfortable pace", "easy")
intensityModerate = RadioItem("Moderate", "Breathing harder", "moderate")
intensityHard = RadioItem("Hard", "Pushing to the limit", "hard")
logButtons = Buttons([logSubmit, logCancel])
logSubmit = Button("Log workout", null, "primary")
logCancel = Button("Cancel", null, "tertiary")