Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
33d4692
feat: add nextjs package
Jul 23, 2026
a30767d
fix: revert components export .. from
Jul 23, 2026
320d44b
fix: remove unneeded linting packages from nextjs package
Jul 23, 2026
817625a
feat: add PageBody and PageFooter
Jul 24, 2026
f0e053b
Merge branch 'main' into feat/setup-nextjs-package
Jul 24, 2026
c4838de
fix: remove duplicate styleLint config
Jul 24, 2026
cb00301
feat: update homepage with content
Jul 27, 2026
d8738b8
chore: update @types/node to v24
Jul 27, 2026
7f276dd
chore: remove unneeded global css
Jul 27, 2026
463de29
Update packages/nextjs/package.json
eelcobosklopper Jul 27, 2026
8023116
Merge branch 'feat/setup-nextjs-package' into feat/add-nextjs-homepage
eelcobosklopper Jul 27, 2026
710e1c9
chore: remove next-env.d.ts
eelcobosklopper Jul 27, 2026
6a374d1
chore: add next-env.d.ts to gitignore
eelcobosklopper Jul 27, 2026
4d91244
feat: add footer and logo
eelcobosklopper Jul 28, 2026
c84c9b8
Merge branch 'feat/add-nextjs-homepage' into feat/setup-nextjs-package
eelcobosklopper Jul 30, 2026
dfd79e8
feat: add distDir nextjs config and cleanup old .next references
eelcobosklopper Jul 30, 2026
d6f8784
fix: remove unrs-resolver from allowBuilds pnpm workspace
eelcobosklopper Jul 30, 2026
5447ac1
fix: grid cell span all
eelcobosklopper Jul 30, 2026
ebc91c9
feat: replace ma-theme with start-theme design tokens
eelcobosklopper Jul 31, 2026
03fb9d1
feat: update content homepage
eelcobosklopper Aug 3, 2026
59e5592
fix: move codeblock out of paragraph
eelcobosklopper Aug 3, 2026
e716008
chore: remove comments from tsconfig
eelcobosklopper Aug 3, 2026
beadaf6
chore: remove eslint config for jsonc
eelcobosklopper Aug 3, 2026
d7780ce
feat: move nextjs project to apps folder and rename to next
eelcobosklopper Aug 5, 2026
2199d98
fix: replace ReactNode with PropsWithChildren
eelcobosklopper Aug 5, 2026
2d185c3
feat: update title
eelcobosklopper Aug 5, 2026
fe017b2
feat: add clean script and cleanup scripts
eelcobosklopper Aug 5, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ build/
coverage/
dist/
tmp/
.next/

# Ignore archives
*.7z
Expand Down
10 changes: 9 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import tseslint from 'typescript-eslint';

export default defineConfig([
// use the built-in globalIgnores utility to globally ignore files in the project
globalIgnores(['**/dist/', '**/build/', '**/coverage/', 'packages/web-components-stencil/loader']),
globalIgnores(['**/dist/', '**/build/', '**/coverage/', 'packages/web-components-stencil/loader', '**/.next/']),
Comment thread
eelcobosklopper marked this conversation as resolved.
Outdated
{
// Use the Perfectionist recommended/natural configuration for all possible JavaScript, TypeScript and JSX files
name: 'perfectionist/recommended/natural',
Expand Down Expand Up @@ -63,9 +63,17 @@ export default defineConfig([
// Use the @eslint/json recommended configuration to lint JSON files
name: 'eslint/json/recommended',
files: ['**/*.json'],
ignores: ['**/tsconfig*.json'],
Comment thread
eelcobosklopper marked this conversation as resolved.
language: 'json/json',
...json.configs.recommended,
},
{
// tsconfig files are JSONC, so allow comments
name: 'eslint/json/recommended/jsonc',
files: ['**/tsconfig*.json'],
language: 'json/jsonc',
...json.configs.recommended,
},
{
name: 'eslint-plugin-react',
files: ['**/*.{js,cjs,mjs,jsx,ts,tsx}'],
Expand Down
4 changes: 4 additions & 0 deletions packages/nextjs/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
html,
body {
min-block-size: 100%;
Comment thread
eelcobosklopper marked this conversation as resolved.
Outdated
}
20 changes: 20 additions & 0 deletions packages/nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { Metadata } from 'next';
import './globals.css';
import './theme.css';

export const metadata: Metadata = {
description: 'A Next.js example project using components from the NL Design System',
title: 'NL Design System',
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en" className="ma-theme">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<html lang="en" className="ma-theme">
<html lang="en" dir="ltr" id="top" className="ma-theme">

<body>{children}</body>
</html>
);
}
21 changes: 21 additions & 0 deletions packages/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Button } from '@/components/Button/Button';
import { Heading } from '@/components/Heading/Heading';
import { Link } from '@/components/Link/Link';
import { Paragraph } from '@/components/Paragraph/Paragraph';
import { SkipLink } from '@/components/SkipLink/SkipLink';

const Home = () => {
return (
<div>
<SkipLink href="#main">Naar de hoofdinhoud</SkipLink>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waar is <main id="main">?

<Heading level={1}>Voorbeeldpagina</Heading>
<Paragraph>Lets get started!</Paragraph>
<Button purpose="primary">Click me</Button>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Buttons kunnen het best in een ActionGroup ipv los, zoals die van Utrecht

<Paragraph>
<Link href="https://nldesignsystem.nl">NL Design System</Link>
</Paragraph>
</div>
);
};

export default Home;
929 changes: 929 additions & 0 deletions packages/nextjs/app/theme.css

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In een aparte branch heb ik deze file vervangen met @nl-design-system-community/ma-design-tokens/dist/variables.css.
Alsnog lijkt het mij wel fijner als voorbeeld om alleen een custom theme file te hebben met de alleen benodigde Design Tokens. @Robbert wat denk jij?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik stel voor om hier in eerste instantie het start-thema te importeren, zonder duplicatie

Dan kan later de packages/design-tokens/ aangepast worden om gebaseerd te worden op het start thema, en dan kun je locale design tokens gebruiken uit je workspace.

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions packages/nextjs/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { Button } from '@nl-design-system-candidate/button-react';

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mijn IDE (VScode) doet geen autocomplete omdat Typescript deze exports niet kan indexeren. Als ik de Button als een const exporteer dan pakt hij hem wel op maar Sonar vindt dit weer niet leuk.
Hebben jullie hier een oplossing voor?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zou je een issue willen aanmaken bij de candidate repo voor matige developer experience met TypeScript autocomplete? Als jij een oplossing hebt hoor ik het graag, ik denk dat dit van jou uit zou kunnen komen.

@eelcobosklopper eelcobosklopper Jul 30, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Het is niet een candidate repo issue maar hoe het component hier wordt ge-ïmporteerd en exporteerd. Ik loop tegen hetzelfde aan in de documentatie repo voor bijvoorbeeld packages/website/src/components/button/button.tsx waar de button van Utrecht gebruikt wordt.

Het is fijn om dit soort import/export component files te hebben zodat je als developer 1 centrale plek hebt voor je Button implementie. Dan is switchen tussen een community button of een candidate button minder gedoe.

Ik heb alleen nog geen betere manier gevonden dan dit te doen:

import { Button as ButtonReact } from '@nl-design-system-candidate/button-react';
import '@nl-design-system-candidate/button-css/button.css';

export const Button = ButtonReact;

Maar ik kan niet geloven dat anderen hier geen last van hebben dus ik ben heel benieuwd hoe zij dit hebben opgelost 😅
Ik gebruik VScode, misschien ligt het daar aan?

import '@nl-design-system-candidate/button-css/button.css';
2 changes: 2 additions & 0 deletions packages/nextjs/components/Heading/Heading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { Heading } from '@nl-design-system-candidate/heading-react';
import '@nl-design-system-candidate/heading-css/heading.css';
2 changes: 2 additions & 0 deletions packages/nextjs/components/Link/Link.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { Link } from '@nl-design-system-candidate/link-react';
import '@nl-design-system-candidate/link-css/link.css';
2 changes: 2 additions & 0 deletions packages/nextjs/components/Paragraph/Paragraph.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { Paragraph } from '@nl-design-system-candidate/paragraph-react';
import '@nl-design-system-candidate/paragraph-css/paragraph.css';
2 changes: 2 additions & 0 deletions packages/nextjs/components/SkipLink/SkipLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { SkipLink } from '@nl-design-system-candidate/skip-link-react';
import '@nl-design-system-candidate/skip-link-css/skip-link.css';
6 changes: 6 additions & 0 deletions packages/nextjs/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import './.next/dev/types/routes.d.ts';

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
8 changes: 8 additions & 0 deletions packages/nextjs/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
/* config options here */
reactCompiler: true,
};

export default nextConfig;
62 changes: 62 additions & 0 deletions packages/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "@example/nextjs",
"author": "Community for NL Design System",
"description": "A Next.js example project using components from the NL Design System",
"license": "EUPL-1.2",
"keywords": [
"nl-design-system"
],
"private": true,
"repository": {
"type": "git+ssh",
"url": "git@github.com:nl-design-system/example.git",
"directory": "packages/nextjs"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zullen we deze package verplaatsen naar /apps/next/?

  • apps/ wordt ook bij RHC/Utrecht/Theme Wizard/Editor gebruikt voor applicaties vs library onderscheid
  • Next.js kort zelf dingen vaak af als next ipv nextjs

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verplaatst naar /apps/next/
Aangezien we nu een apps folder hebben zou ik packages/storybook ook onder apps verwachten. Zal ik dit hier ook updaten of liever in een ander issue?

},
"scripts": {
"build": "next build",
"dev": "next dev",
"lint:css": "stylelint --allow-empty-input '**/*.{css,scss}'",
"lint:js": "eslint",
"lint:prettier": "prettier --write .",
"lint": "pnpm run --sequential '/^lint:.+$/'",
"prepare": "husky",
Comment thread
eelcobosklopper marked this conversation as resolved.
Outdated
"start": "next start"
},
"dependencies": {
"@nl-design-system-candidate/button-css": "1.1.0",
"@nl-design-system-candidate/button-react": "1.1.0",
"@nl-design-system-candidate/code-block-css": "1.2.0",
"@nl-design-system-candidate/code-block-react": "1.4.0",
"@nl-design-system-candidate/code-css": "3.0.0",
"@nl-design-system-candidate/code-react": "2.0.0",
"@nl-design-system-candidate/color-sample-css": "1.0.5",
"@nl-design-system-candidate/color-sample-react": "1.2.2",
"@nl-design-system-candidate/data-badge-css": "1.0.5",
"@nl-design-system-candidate/data-badge-react": "1.1.7",
"@nl-design-system-candidate/heading-css": "1.1.3",
"@nl-design-system-candidate/heading-react": "1.1.7",
"@nl-design-system-candidate/link-css": "2.0.3",
"@nl-design-system-candidate/link-react": "1.1.8",
"@nl-design-system-candidate/mark-css": "1.0.5",
"@nl-design-system-candidate/mark-react": "1.1.7",
"@nl-design-system-candidate/number-badge-css": "1.1.5",
"@nl-design-system-candidate/number-badge-react": "1.3.2",
"@nl-design-system-candidate/paragraph-css": "2.1.3",
"@nl-design-system-candidate/paragraph-react": "2.2.2",
"@nl-design-system-candidate/skip-link-css": "1.0.5",
"@nl-design-system-candidate/skip-link-react": "1.1.7",
"next": "16.2.10",
"react": "19.2.4",
"react-dom": "19.2.4"
},
"devDependencies": {
"@babel/runtime": "7.29.7",
"@nl-design-system/eslint-config": "2.4.0",
"@nl-design-system/tsconfig": "1.0.5",
"@types/node": "20.19.43",
Comment thread
eelcobosklopper marked this conversation as resolved.
Outdated
"@types/react": "19.2.17",
"@types/react-dom": "19.2.3",
"babel-plugin-react-compiler": "1.0.0",
"typescript": "5.9.3"
}
}
23 changes: 23 additions & 0 deletions packages/nextjs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": "@nl-design-system/tsconfig",
"compilerOptions": {
"allowSyntheticDefaultImports": true, // depricated and will stop functioning in v7. Added to overwrite usage in @nl-design-system/tsconfig
Comment thread
eelcobosklopper marked this conversation as resolved.
Outdated
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": false, // was true, don't think this is needed.
"noEmit": true, // gives room for other compiler tools
"module": "esnext", // overwrite NodeNext because this is a Frontend project
"moduleResolution": "bundler", // overwrite NodeNext because this is a Frontend project
"isolatedModules": true,
"incremental": true, // store tsbuildinfo files to improve subsequent build speed
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts", "**/*.mts"],
"exclude": ["node_modules"]
}
Loading