Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3faedfc
chore(docs): moved the "Highlighted Text" documentation page to the c…
bucknatt Oct 9, 2025
1864830
chore(docs): removed example for `List`, added example for `Legend` i…
bucknatt Oct 9, 2025
fdc0b57
chore(docs): added draft example for `Headings with Subheadings` in O…
bucknatt Oct 9, 2025
4d61569
chore(docs): added Todos for next steps
bucknatt Oct 14, 2025
6a8ee88
empty commit
bucknatt Oct 14, 2025
b0815e7
empty commit
bucknatt Oct 14, 2025
42c20a1
chore(docs): save all intermediate changes-push
bucknatt Oct 15, 2025
d18d1d8
Merge remote-tracking branch 'origin/5220-move-typography-pages-to-co…
bucknatt Oct 15, 2025
c3039d9
chore(docs): re-order Overview docs for Typography after added exampl…
bucknatt Oct 15, 2025
954b189
chore(docs): moved mdx, stories.ts, snapshot.stories.ts and styles fr…
bucknatt Oct 15, 2025
dbc1686
chore(docs): removed all `list` exemples in Typography Overview page
bucknatt Oct 15, 2025
b2d7da2
chore(docs): added new `Link` example as canvas, removed old `Link` e…
bucknatt Oct 15, 2025
1bcfd5f
chore(docs): added new `Link` example as canvas, removed old `Link` e…
bucknatt Oct 15, 2025
d927d97
chore(docs): added new `Paragraph` example as canvas, removed old `Pa…
bucknatt Oct 15, 2025
7fabcde
chore(docs): added new `Inlines` examples as canvas, removed old `Inl…
bucknatt Oct 15, 2025
3b99d4a
chore(docs): removed text in `Headings` example
bucknatt Oct 15, 2025
de639b5
chore(docs): reverted removal of text in `Headings` example
bucknatt Oct 15, 2025
8121296
chore(docs): snapshot intials
Oct 16, 2025
992a5b7
chore(docs): export const snapshots for `typography` and individual s…
Oct 22, 2025
6bb4ebd
chore(docs): 'light' and 'dark' mode for `links` in typography snapshots
Oct 22, 2025
f4f2d50
chore(docs): 'light' and 'dark' mode for `legend`, `paragraphs`, `inl…
Oct 22, 2025
ebd8f6e
chore(docs): 'light' and 'dark' mode for `heading`, updated heading v…
Oct 22, 2025
47f09f1
chore(docs): added todo to `links`
Oct 22, 2025
3437622
chore(docs): updated `links` for typography snapshots
bucknatt Oct 23, 2025
abdaaa9
chore(docs): updated 'light' and 'dark' mode for all individual snaps…
bucknatt Oct 23, 2025
fe0d373
chore(docs): removed all pages under 'Foundations/Typography' but the…
bucknatt Oct 23, 2025
be3899b
chore(docs): renamed the 'Typography/Overview' page to simply be 'Typ…
bucknatt Oct 23, 2025
88891c6
chore(docs): added changeset
bucknatt Oct 23, 2025
29e8921
chore(docs): removed individual snapshots in `typography.snapshot.sto…
bucknatt Oct 23, 2025
21b7adb
chore(docs): removed heading without subheading in `typography.blocks…
bucknatt Oct 23, 2025
faedf5c
chore(docs): removed unsued imports
bucknatt Oct 23, 2025
7596b12
chore(docs): removed unsued test for 'headings'
bucknatt Oct 23, 2025
ffb2dd5
fix(docs): updated changeset, added text in the stories section for `…
bucknatt Nov 18, 2025
d62824c
fix(docs): added text in the stories section for `lead` in `paragraph`
bucknatt Nov 18, 2025
bbc67df
fix(docs): removed unused function export for `Paragraphs` and `Links`
bucknatt Nov 18, 2025
e2b6e83
fix(docs): removed `div`-tag for all stories on typography page
bucknatt Nov 18, 2025
eae339e
fix(docs): added link to figma
bucknatt Nov 18, 2025
3e8f28c
fix(docs): added StylesPackageImport for `Headings`, `lead` in `Parag…
bucknatt Nov 18, 2025
0e16d15
fix(docs): removed div with classes in snapshot stories
bucknatt Nov 18, 2025
c539559
fix(docs): removed als div with classes in snapshot stories
bucknatt Nov 18, 2025
cbfe760
fix(docs): removed input field from `Legend`
bucknatt Nov 18, 2025
ae0a60b
fix(docs): simplified heading variants
Nov 19, 2025
f874ebc
fix(docs): converted switch-case in renderHeading-method to return si…
Nov 19, 2025
568f96e
fix(docs): removed bombArgs
Nov 19, 2025
8f1bd15
chore(docs): added 2e2 cy test for snapshot stories of `Typography`
Nov 19, 2025
4ae6b2a
chore(docs): reused code for typography snapshot stories from typogra…
Nov 19, 2025
e684a36
chore(docs): added more tests for Inline Elements in `typography.cy.ts`
Nov 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sad-pumas-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-documentation': minor
---

Moved the base typography elements into one single `Foundations > Typography` page and the "Text Highlighted" and "List" elements into the `Components` folder to align with Figma.
13 changes: 0 additions & 13 deletions packages/documentation/cypress/e2e/components/headings.cy.ts

This file was deleted.

27 changes: 27 additions & 0 deletions packages/documentation/cypress/e2e/components/typography.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
describe('Typography', () => {
describe('Accessibility', () => {
beforeEach(() => {
cy.visit('/iframe.html?id=snapshots--typography');
cy.get('h1', { timeout: 30000 }).should('be.visible');
cy.get('a', { timeout: 30000 }).should('be.visible');
cy.get('p', { timeout: 30000 }).should('be.visible');
cy.get('legend', { timeout: 30000 }).should('be.visible');
// Test Inline Elements
cy.get('small', { timeout: 30000 }).should('be.visible');
cy.get('strong', { timeout: 30000 }).should('be.visible');
cy.get('em', { timeout: 30000 }).should('be.visible');
cy.get('sub', { timeout: 30000 }).should('be.visible');
cy.get('sup', { timeout: 30000 }).should('be.visible');
cy.get('mark', { timeout: 30000 }).should('be.visible');
cy.get('abbr', { timeout: 30000 }).should('be.visible');
cy.get('code', { timeout: 30000 }).should('be.visible');
cy.get('kbd', { timeout: 30000 }).should('be.visible');
cy.get('del', { timeout: 30000 }).should('be.visible');
cy.injectAxe();
});

it('Has no detectable a11y violations on load for all variants', () => {
cy.checkA11y('#root-inner');
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@use '../../../../node_modules/@swisspost/design-system-styles/core' as post;

.my-component {
ul {
@include post.list-bullet();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@use '../../../../node_modules/@swisspost/design-system-styles/core' as post;

.my-component {
ul {
@include post.list-inline();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@use '../../../../node_modules/@swisspost/design-system-styles/core' as post;

.my-component {
ul {
@include post.list-number();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import SampleListNumber from './list-number.sample.scss?raw';

<Meta of={ListStories} />

# Lists
# List

<p className="lead">Use lists to group a collection of related items.</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { MetaExtended } from '@root/types';

const meta: MetaExtended = {
id: 'e76192bb-b2eb-487a-b9c1-ef938bccdfc4',
title: 'Foundations/Typography/Lists',
title: 'Components/List',
tags: ['package:Styles'],
parameters: {
badges: [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { Meta, Canvas } from '@storybook/addon-docs/blocks';
import * as HighlightedTextStories from './highlighted-text.stories';
import * as TextHighlightedStories from './text-highlighted.stories';
import StylesPackageImport from '@/shared/styles-package-import.mdx';

<Meta of={HighlightedTextStories} />
<Meta of={TextHighlightedStories} />

<div className="docs-title">
# Highlighted Text
# Text Highlighted

<link-design of={JSON.stringify(HighlightedTextStories)}></link-design>
<link-design of={JSON.stringify(TextHighlightedStories)}></link-design>
</div>

<div className="lead">
The Highlighted Text can be used when a certain paragraph needs a higher attention than the other
The Text Highlighted can be used when a certain paragraph needs a higher attention than the other
paragraphs.
</div>

<Canvas of={HighlightedTextStories.Default} sourceState="shown" />
<Canvas of={TextHighlightedStories.Default} sourceState="shown" />
<StylesPackageImport components={['text-highlighted']} />
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { MetaExtended } from '@root/types';

const meta: MetaExtended = {
id: '88318ccf-be8d-4bdf-b8dc-06b0b78e5e3d',
title: 'Foundations/Typography/Highlighted Text',
title: 'Components/Text Highlighted',
tags: ['package:Styles'],
parameters: {
badges: [],
Expand All @@ -22,7 +22,9 @@ type Story = StoryObj;
export const Default: Story = {
render: () => html`
<p class="text-highlighted">
Use this component when you need to emphasize important information or make a section more noticeable to readers. The highlighted style helps the content break away from the normal text flow.
Use this component when you need to emphasize important information or make a section more
noticeable to readers. The highlighted style helps the content break away from the normal text
flow.
</p>
`,
};

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading