import type { Meta, StoryObj } from '@storybook/react'; import { Typography } from './Typography'; const meta: Meta = { title: 'Atoms/Typography', component: Typography, tags: ['autodocs'], parameters: { layout: 'padded', design: { type: 'figma', url: 'https://www.figma.com/design/3t6fpT5inh7zzjxQdW8U5p/Design-System---Template?node-id=23-30', }, }, argTypes: { variant: { control: 'select', options: [ 'displayHero', 'display1', 'display2', 'display3', 'displaySm', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'bodyLg', 'body1', 'body2', 'bodyXs', 'labelLg', 'label', 'labelSm', 'caption', 'captionSm', 'overline', 'overlineSm', ], description: 'Typography variant — 21 variants across 6 categories', table: { defaultValue: { summary: 'body1' } }, }, color: { control: 'select', options: ['textPrimary', 'textSecondary', 'textDisabled', 'primary', 'secondary', 'error'], }, maxLines: { control: 'number' }, gutterBottom: { control: 'boolean' }, }, }; export default meta; type Story = StoryObj; const SAMPLE = 'Discover, Explore, and Plan Funerals in Minutes, Not Hours'; // ─── Default ──────────────────────────────────────────────────────────────── export const Default: Story = { args: { children: 'Funeral Arranger helps families find transparent, affordable funeral services across Australia.', }, }; // ─── Display (Noto Serif SC, Regular) ─────────────────────────────────────── /** 5 display levels — Noto Serif SC Regular. For hero/marketing text. All scale down on mobile. */ export const Display: Story = { name: 'Display (Serif)', render: () => (
displayHero — 80px {SAMPLE}
display1 — 64px {SAMPLE}
display2 — 52px {SAMPLE}
display3 — 40px {SAMPLE}
displaySm — 32px {SAMPLE}
), }; // ─── Headings (Montserrat, Bold) ──────────────────────────────────────────── /** 6 heading levels — Montserrat Bold. For content structure. All scale down on mobile. */ export const Headings: Story = { name: 'Headings (Sans-serif)', render: () => (
h1 — 36px {SAMPLE}
h2 — 30px {SAMPLE}
h3 — 24px {SAMPLE}
h4 — 20px {SAMPLE}
h5 — 18px {SAMPLE}
h6 — 16px {SAMPLE}
), }; // ─── Body (Montserrat, Medium) ────────────────────────────────────────────── /** 4 body sizes — Montserrat Medium (500). For content text. */ export const Body: Story = { name: 'Body Text', render: () => (
bodyLg — 18px Planning a funeral is one of the most difficult tasks a family faces. Funeral Arranger is here to help you navigate this process with care and transparency.
body1 (default) — 16px Compare funeral directors in your area, view transparent pricing, and make informed decisions at your own pace. Every family deserves clarity during this time.
body2 (small) — 14px Prices shown are indicative and may vary based on your specific requirements. Contact the funeral director directly for a detailed quote.
bodyXs — 12px Terms and conditions apply. Funeral Arranger is a comparison service and does not directly provide funeral services. ABN 12 345 678 901.
), }; // ─── Label, Caption, Overline ─────────────────────────────────────────────── /** UI text variants — labels (medium 500), captions (regular 400), overlines (semibold 600 uppercase) */ export const UIText: Story = { name: 'UI Text (Label / Caption / Overline)', render: () => (
labelLg — 16px medium Form label or section label
label — 14px medium Default form label
labelSm — 12px medium Compact label or tag text
caption — 12px regular Fine print, timestamps, metadata
captionSm — 11px regular Compact metadata, footnotes
overline — 12px semibold uppercase Section overline
overlineSm — 11px semibold uppercase Compact overline
), }; // ─── Colours ──────────────────────────────────────────────────────────────── export const Colours: Story = { name: 'Colours', render: () => (
Text Primary — main body text (neutral.800) Text Secondary — helper text (neutral.600) Text Disabled — inactive (neutral.400) Primary — brand emphasis (brand.600) Secondary — neutral emphasis (neutral.600) Error — validation errors (red.600) Warning — cautionary (amber.600) Success — confirmations (green.600) Info — helpful tips (blue.600)
), }; // ─── Font Families ────────────────────────────────────────────────────────── /** The two font families: serif for display, sans-serif for everything else */ export const FontFamilies: Story = { name: 'Font Families', render: () => (
Display font — Noto Serif SC (Regular 400) Warm, trustworthy, and professional Used exclusively for display variants (hero through sm). Regular weight — serif carries inherent visual weight at large sizes.
Body font — Montserrat Clean, modern, and highly readable Used for all headings (h1–h6), body text, labels, captions, and UI elements. Headings use Bold (700), body uses Medium (500), captions use Regular (400).
), }; // ─── Max Lines ────────────────────────────────────────────────────────────── export const MaxLines: Story = { name: 'Max Lines (Truncation)', render: () => (
maxLines=1 H. Parsons Funeral Directors — trusted by Australian families for over 30 years, providing compassionate and transparent funeral services.
maxLines=2 H. Parsons Funeral Directors — trusted by Australian families for over 30 years, providing compassionate and transparent funeral services across metropolitan and regional areas.
), }; // ─── Realistic Content ────────────────────────────────────────────────────── export const RealisticContent: Story = { name: 'Realistic Content', render: () => (
Funeral planning Compare funeral services in your area Transparent pricing and service comparison to help you make informed decisions during a difficult time. How it works Enter your suburb or postcode to find funeral directors near you. Each listing includes a full price breakdown, service inclusions, and reviews from families who have used their services. Step 1: Browse packages Compare packages side by side. Each package clearly shows what is and isn't included, so there are no surprises. Prices are indicative and current as of March 2026. Contact the funeral director for a binding quote.
), }; // ─── Complete Scale ───────────────────────────────────────────────────────── /** All 21 variants in a single view — matches the Figma "Fonts - Desktop" layout */ export const CompleteScale: Story = { name: 'Complete Scale (All 21 Variants)', render: () => { const variants = [ { variant: 'displayHero', label: 'display/hero — 80px' }, { variant: 'display1', label: 'display/1 — 64px' }, { variant: 'display2', label: 'display/2 — 52px' }, { variant: 'display3', label: 'display/3 — 40px' }, { variant: 'displaySm', label: 'display/sm — 32px' }, { variant: 'h1', label: 'heading/1 — 36px' }, { variant: 'h2', label: 'heading/2 — 30px' }, { variant: 'h3', label: 'heading/3 — 24px' }, { variant: 'h4', label: 'heading/4 — 20px' }, { variant: 'h5', label: 'heading/5 — 18px' }, { variant: 'h6', label: 'heading/6 — 16px' }, { variant: 'bodyLg', label: 'body/lg — 18px' }, { variant: 'body1', label: 'body/md — 16px' }, { variant: 'body2', label: 'body/sm — 14px' }, { variant: 'bodyXs', label: 'body/xs — 12px' }, { variant: 'labelLg', label: 'label/lg — 16px' }, { variant: 'label', label: 'label/md — 14px' }, { variant: 'labelSm', label: 'label/sm — 12px' }, { variant: 'caption', label: 'caption/md — 12px' }, { variant: 'captionSm', label: 'caption/sm — 11px' }, { variant: 'overline', label: 'overline/md — 12px' }, { variant: 'overlineSm', label: 'overline/sm — 11px' }, ] as const; return (
{variants.map(({ variant, label }) => (
{label} {SAMPLE}
))}
); }, };