Skip to content

Commit 6368f7d

Browse files
Jeffrey Lauwersclaude
andcommitted
docs: Logo component documenteren (v5.20.0)
Logo toegevoegd aan docs/03-components.md (Branding Components sectie), changelog bijgewerkt, testtellingen bijgewerkt naar 1248 tests / 62 suites. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3f78788 commit 6368f7d

4 files changed

Lines changed: 112 additions & 10 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ Comprehensive documentation is available in the `/docs` folder:
382382

383383
- **Pre-commit hooks** via Husky + lint-staged (ESLint + Prettier)
384384
- **Type checking** across all packages (`pnpm type-check`)
385-
- **1225 tests** covering React components, Web Components, and utilities
385+
- **1248 tests** covering React components, Web Components, and utilities
386386
- **CI/CD** via GitHub Actions (lint, type-check, test, build)
387387

388388
## Tech Stack

docs/03-components.md

Lines changed: 92 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Components
22

3-
**Last Updated:** April 4, 2026
3+
**Last Updated:** April 5, 2026
44

55
Complete component specifications and guidelines for the Design System Starter Kit.
66

@@ -13,8 +13,9 @@ Complete component specifications and guidelines for the Design System Starter K
1313
3. [Content Components](#content-components)
1414
4. [Display & Feedback Components](#display--feedback-components)
1515
5. [Navigation Components](#navigation-components)
16-
6. [Form Components](#form-components)
17-
7. [Web Components Registration](#web-components-registration)
16+
6. [Branding Components](#branding-components)
17+
7. [Form Components](#form-components)
18+
8. [Web Components Registration](#web-components-registration)
1819

1920
---
2021

@@ -1824,6 +1825,90 @@ const [isOpen, setIsOpen] = React.useState(false);
18241825

18251826
---
18261827

1828+
## Branding Components
1829+
1830+
**Status:** Complete (HTML/CSS, React) — 1 component total
1831+
1832+
### Logo
1833+
1834+
**Status:** Complete (HTML/CSS, React)
1835+
1836+
**Location:** `packages/components-{html|react}/src/logo/` / `Logo/`
1837+
1838+
**Tokens:** `tokens/components/logo.json`
1839+
1840+
**Props:** `title`, `aria-hidden`, `className` + alle `React.SVGProps<SVGSVGElement>` attributen
1841+
1842+
**Features:**
1843+
1844+
- Rendert het Starter Kit-logo als inline SVG — CSS-klassen op paden werken hierdoor correct
1845+
- Twee kleurlagen via design tokens: `dsn-logo__primary` (achtergrond + letterpaden) en `dsn-logo__label` (binnenste rechthoek)
1846+
- Tokens refereren naar thema-kleuren → past automatisch mee bij thema- en moduswisseling
1847+
- Standalone gebruik: `role="img"` + `<title id>` + `aria-labelledby` koppeling
1848+
- Decoratief gebruik: `aria-hidden={true}` → geen `<title>`, geen `role`, geen `aria-labelledby`
1849+
- `useId()` (React 18+) garandeert unieke title-ids bij meerdere instanties op één pagina
1850+
- `React.forwardRef<SVGSVGElement>`
1851+
1852+
**CSS-klassen:**
1853+
1854+
| Klasse | Element | Beschrijving |
1855+
| ------------------- | -------- | ------------------------------------------------------------------------------- |
1856+
| `dsn-logo` | `<svg>` | Basisklasse voor het logocomponent |
1857+
| `dsn-logo__primary` | `<path>` | Achtergrondrechthoek + alle letterpaden — `fill: var(--dsn-logo-color-primary)` |
1858+
| `dsn-logo__label` | `<path>` | Binnenste rechthoek — `fill: var(--dsn-logo-color-label)` |
1859+
1860+
**Design Tokens:**
1861+
1862+
| Token | Waarde | Beschrijving |
1863+
| -------------------------- | ----------------------------------------- | --------------------------------------------- |
1864+
| `--dsn-logo-color-primary` | `{dsn.color.accent-1-inverse.bg-default}` | Merkkleur — blauw (Start) / zwart (Wireframe) |
1865+
| `--dsn-logo-color-label` | `{dsn.color.neutral.bg-document}` | Documentachtergrond — doorkijkje-effect |
1866+
1867+
**Usage:**
1868+
1869+
```html
1870+
<!-- HTML/CSS — standalone -->
1871+
<svg
1872+
class="dsn-logo"
1873+
xmlns="http://www.w3.org/2000/svg"
1874+
width="186"
1875+
height="48"
1876+
viewBox="0 0 186 48"
1877+
fill="none"
1878+
role="img"
1879+
aria-labelledby="logo-title"
1880+
>
1881+
<title id="logo-title">Starter Kit</title>
1882+
<path class="dsn-logo__primary" d="M0 0h185.491v48H0z" />
1883+
<path class="dsn-logo__label" d="M8 8h169.491v32H8z" />
1884+
<!-- letterpaden met dsn-logo__primary -->
1885+
</svg>
1886+
1887+
<!-- HTML/CSS — decoratief (in een link) -->
1888+
<a href="/">
1889+
<svg class="dsn-logo" aria-hidden="true" ...><!-- paden --></svg>
1890+
<span class="dsn-visually-hidden">Starter Kit — terug naar homepage</span>
1891+
</a>
1892+
```
1893+
1894+
```tsx
1895+
// React — standalone
1896+
<Logo />
1897+
1898+
// React — decoratief
1899+
<a href="/">
1900+
<Logo aria-hidden={true} />
1901+
<span className="dsn-visually-hidden">Starter Kit — terug naar homepage</span>
1902+
</a>
1903+
1904+
// React — custom title
1905+
<Logo title="Mijn Organisatie" />
1906+
```
1907+
1908+
**Tests:** React (14 tests)
1909+
1910+
---
1911+
18271912
## Form Components
18281913

18291914
**Status:** Complete (HTML/CSS, React) — 25 components total
@@ -2135,15 +2220,15 @@ defineButton('my-custom-button');
21352220

21362221
## Component Statistics
21372222

2138-
**Total Components:** 47
2223+
**Total Components:** 48
21392224

21402225
**Implementations:**
21412226

2142-
- **HTML/CSS:** 47 components
2143-
- **React:** 47 components (1149 tests total, 56 test suites)
2227+
- **HTML/CSS:** 48 components
2228+
- **React:** 48 components (1248 tests total, 62 test suites)
21442229
- **Web Component:** 7 components (Button, Heading, Icon, Link, OrderedList, Paragraph, UnorderedList)
21452230

2146-
**Test Coverage:** 1149 tests across 56 test suites
2231+
**Test Coverage:** 1248 tests across 62 test suites
21472232

21482233
---
21492234

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Complete documentation voor het Design System Starter Kit.
9191

9292
- **Tokens per configuration:** ~1100 (400 semantic + 700 component)
9393
- **Configurations:** 8 (2 themes × 2 modes × 2 project types)
94-
- **Components:** 49 (5 layout + 10 content + 9 display/feedback + 3 navigation + 25 form; HTML/CSS + React)
95-
- **Tests:** 1225 across 60 test suites
94+
- **Components:** 48 (5 layout + 10 content + 9 display/feedback + 1 branding + 3 navigation + 25 form; HTML/CSS + React)
95+
- **Tests:** 1248 across 62 test suites
9696
- **Storybook stories:** 130+
9797

9898
---

docs/changelog.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ All notable changes to this project are documented in this file.
66

77
---
88

9+
## Version 5.20.0 (April 5, 2026)
10+
11+
### Logo component (issue #126)
12+
13+
#### Added
14+
15+
- **Logo** component — theme-aware inline SVG logo met twee kleurlagen gekoppeld aan design tokens (PR #139)
16+
- `--dsn-logo-color-primary` token → `{dsn.color.accent-1-inverse.bg-default}` (merkkleur per actief thema)
17+
- `--dsn-logo-color-label` token → `{dsn.color.neutral.bg-document}` (documentachtergrond, doorkijkje-effect)
18+
- Standalone gebruik: `role="img"` + `<title>` + `aria-labelledby`; decoratief gebruik: `aria-hidden={true}`
19+
- `useId()` voor unieke title-ids bij meerdere instanties op één pagina
20+
- `title` prop (default: `"Starter Kit"`) en volledige spread van `React.SVGProps<SVGSVGElement>`
21+
- 14 React tests
22+
- Referentie-SVG (`logo_starter-kit.svg`) verplaatst van project root naar `packages/components-html/src/logo/`
23+
24+
---
25+
926
## Version 5.18.0 (April 4, 2026)
1027

1128
### MenuButton component + gedeelde menu-item tokens

0 commit comments

Comments
 (0)