import { CheckIcon, InfoIcon, SirenIcon, WarningIcon } from "@chopin/icons"; import { IconLabel, MiniBars, ProgressBar, Sparkline } from "@chopin/visuals"; import { AuditPlate } from "./frame"; import { IconCatalogue } from "./icons"; const COLOURS = [ ["Page", "--color-page"], ["Ground", "--color-ground"], ["Inset", "--color-inset"], ["Selected", "--color-selected"], ["Primary text", "--color-text-primary"], ["Secondary text", "--color-text-secondary"], ["Tertiary text", "--color-text-tertiary"], ["Quaternary text", "--color-text-quaternary"], ["Default icon", "--color-icon"], ["Brand", "--color-brand"], ["Brand hover", "--color-brand-hover"], ["Brand wash", "--color-brand-wash"], ["Success", "--color-success"], ["Success wash", "--color-success-wash"], ["Warning", "--color-warning"], ["Warning wash", "--color-warning-wash"], ["Destructive", "--color-destructive"], ["Destructive wash", "--color-destructive-wash"], ] as const; const TYPE = [ ["Chrome and labels", "13px / 20px line-height", "--text-sm", "--text-sm--line-height"], ["Document prose", "15px / 22px line-height", "--text-base", "--text-base--line-height"], ["Subheading", "17px / 27px line-height", "--text-lg", "--text-lg--line-height"], ["Section heading", "24px / 30px line-height", "--text-xl", "--text-xl--line-height"], ["Document title", "32px / 38px line-height", "--text-2xl", "--text-2xl--line-height"], ] as const; const SPACING = [2, 4, 6, 8, 12, 16, 24, 32] as const; const RADII = [ ["Small", "--radius-sm"], ["Medium", "--radius-md"], ["Large", "--radius-lg"], ["Extra large", "--radius-xl"], ] as const; const SHADOWS = [ ["Subtle resting", "--shadow-resting"], ["Strong resting", "--shadow-resting-strong"], ["Raised", "--shadow-raised"], ["Overlay", "--shadow-overlay"], ] as const; const ICON_LABELS = [ ["neutral", InfoIcon, "Neutral"], ["success", CheckIcon, "Success"], ["warning", WarningIcon, "Warning"], ["danger", SirenIcon, "Danger"], ] as const; const SPARKLINES = [ ["neutral", "Neutral activity", [8, 6, 7, 4]], ["success", "Successful activity", [3, 5, 4, 8]], ["warning", "Steady warning", [5, 5, 5]], ["danger", "Danger sample", [4]], ] as const; const MINI_BARS = [ ["neutral", "neutral volume", [8, 4, 6, 3, 7, 5]], ["success", "success volume", [1, 3, 2, 4, 6, 5]], ["warning", "warning volume", [6, 5, 4, 5, 3, 4]], ["danger", "danger volume", [1, 2, 4, 3, 5, 7]], ] as const; const PROGRESS_BARS = [ ["Not started", 0], ["In progress", 62.5], ["Complete", 100], ] as const; export function Foundations() { return ( <>
{COLOURS.map(([label, token]) => (
{label} {token}
))}
{TYPE.map(([label, measurement, size, lineHeight]) => (
{label} {measurement}
Several people and a Planner share one document.
))}
{SPACING.map(value => (
{value}px
))}
{RADII.map(([label, token]) => (
{label}
))}
{SHADOWS.map(([label, token]) => (
{label}
))}
{ICON_LABELS.map(([tone, icon, label]) => ( ))}
{SPARKLINES.map(([tone, label, values]) => (
{label}
))}
{MINI_BARS.map(([tone, label, values]) => (
{label}
))}
{PROGRESS_BARS.map(([label, value]) => (
{label}
))}
); }