+
+
+ 16px: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
+ labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
+ nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
+ esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
+ in culpa qui officia deserunt mollit anim id est laborum.
+
+
+
+
+
+ ))}
+
+
+ {Object.values(tokens).map((token, index) => (
+
+
+ {token['name']}
+ {index === 0 ? Shade 1 is bedoeld als : null}
+
+ {index === 0 ? Shade 1 is bedoeld als : null}
+
+ ))}
+ >
+ );
+};
+
+interface ColorSamplePageProps {
+ scales: {
+ id: string;
+ label: string;
+ tokens: DesignToken[];
+ }[];
+}
+
+export const ColorSamplePage = ({ scales }: ColorSamplePageProps) => {
+ return (
+
+
+ {scales.map(({ id, label, tokens }) => (
+
+ ))}
+
+ {scales.map(({ id, label, tokens }) => (
+
+ {label}
+
+
+
+ ))}
+
+ );
+};
diff --git a/proprietary/purmerend-design-tokens/documentation/basis-tokens.mdx b/proprietary/purmerend-design-tokens/documentation/basis-tokens.mdx
new file mode 100644
index 000000000..99b56cfb2
--- /dev/null
+++ b/proprietary/purmerend-design-tokens/documentation/basis-tokens.mdx
@@ -0,0 +1,60 @@
+import { Meta } from "@storybook/blocks";
+import tokens from "../dist/tokens.json";
+import colorSchemeDark from "../dist/color-scheme-dark/tokens.json";
+import { ColorSamplePage } from "./ColorSampleList";
+
+
+
+# Basis Tokens
+
+
+
+## Color scheme "dark"
+
+
diff --git a/proprietary/purmerend-design-tokens/documentation/color-sample.mjs b/proprietary/purmerend-design-tokens/documentation/color-sample.mjs
new file mode 100644
index 000000000..dd3c17b33
--- /dev/null
+++ b/proprietary/purmerend-design-tokens/documentation/color-sample.mjs
@@ -0,0 +1,69 @@
+import css from '@utrecht/color-sample-css/dist/index.mjs';
+
+const sheet = new CSSStyleSheet();
+sheet.replaceSync(css);
+
+const extrasheet = new CSSStyleSheet();
+extrasheet.replaceSync(`:host {
+ display: inline-block;
+ block-size: var(--utrecht-color-sample-block-size, 2em);
+ inline-size: var(--utrecht-color-sample-inline-size, 2em);
+}
+ svg {
+ display: block;
+ block-size: var(--utrecht-color-sample-block-size, 2em);
+ inline-size: var(--utrecht-color-sample-inline-size, 2em);
+}`);
+
+export class ColorSampleElement extends HTMLElement {
+ static define() {
+ const name = 'nldesignsystem-color-sample';
+
+ if (customElements.get(name)) {
+ console.warn(`Custom element already registered: ${name}`);
+ } else {
+ customElements.define(name, ColorSampleElement);
+ }
+ }
+
+ connectedCallback() {
+ if (this.shadowRoot) {
+ return;
+ }
+
+ const color = this.getAttribute('color');
+ const data = this.ownerDocument.createElement('data');
+ data.value = color;
+ data.className = 'utrecht-color-sample';
+
+ // Create a hidden `span` HTML element for the label text,
+ // that we will associate with the image using `aria-labelledby`.
+ const labelId = crypto.randomUUID();
+ const span = this.ownerDocument.createElement('span');
+ span.id = labelId;
+ span.hidden = true;
+ span.textContent = this.hasAttribute('label') ? this.getAttribute('label') : color;
+
+ // Create a `svg` element that will be an image completely filled with one color.
+ const svg = this.ownerDocument.createElementNS('http://www.w3.org/2000/svg', 'svg');
+ svg.setAttribute('fill', color || 'var(--utrecht-color-sample-color, currentColor)');
+ svg.setAttribute('width', '1em');
+ svg.setAttribute('height', '1em');
+ svg.setAttribute('role', 'image');
+ svg.setAttribute('viewBox', '0 0 1 1');
+ svg.setAttribute('aria-labelledby', labelId);
+
+ // TODO: Make sure if the SVG is stretched outside of the viewbox, there is a rect outside the viewbox to fill the entire SVG.
+ const rect = this.ownerDocument.createElementNS('http://www.w3.org/2000/svg', 'rect');
+ rect.setAttribute('height', '1');
+ rect.setAttribute('width', '1');
+ svg.appendChild(rect);
+
+ const shadow = this.attachShadow({ mode: 'open' });
+ shadow.adoptedStyleSheets = [sheet, extrasheet];
+ shadow.appendChild(svg);
+ shadow.appendChild(span);
+
+ this.appendChild(data);
+ }
+}
diff --git a/proprietary/purmerend-design-tokens/documentation/color.mdx b/proprietary/purmerend-design-tokens/documentation/color.mdx
index e187ab816..560fc38ef 100644
--- a/proprietary/purmerend-design-tokens/documentation/color.mdx
+++ b/proprietary/purmerend-design-tokens/documentation/color.mdx
@@ -6,7 +6,7 @@ import config from "../src/config.json";
-# Color
+# Color xxx
## Find a color
diff --git a/proprietary/purmerend-design-tokens/documentation/example-rendering.mjs b/proprietary/purmerend-design-tokens/documentation/example-rendering.mjs
new file mode 100644
index 000000000..9142af269
--- /dev/null
+++ b/proprietary/purmerend-design-tokens/documentation/example-rendering.mjs
@@ -0,0 +1,36 @@
+const sheet = new CSSStyleSheet();
+sheet.replaceSync(`.nldesignsystem-example-rendering {
+ -webkit-user-select: none;
+ cursor: default;
+ user-select: none;
+ forced-color-adjust: none;
+}`);
+
+export class ColorContrastCanvasElement extends HTMLElement {
+ static define() {
+ const name = 'nldesignsystem-example-rendering';
+
+ if (customElements.get(name)) {
+ console.warn(`Custom element already registered: ${name}`);
+ } else {
+ customElements.define(name, ColorContrastCanvasElement);
+ }
+ }
+
+ connectedCallback() {
+ if (this.shadowRoot) {
+ return;
+ }
+
+ const div = this.ownerDocument.createElement('div');
+ div.role = 'img';
+ div.inert = true;
+ div.className = 'nldesignsystem-example-rendering';
+ div.setAttribute('aria-label', this.getAttribute('label'));
+ div.appendChild(this.ownerDocument.createElement('slot'));
+
+ const shadow = this.attachShadow({ mode: 'open' });
+ shadow.adoptedStyleSheets = [sheet];
+ shadow.appendChild(div);
+ }
+}
diff --git a/proprietary/purmerend-design-tokens/package.json b/proprietary/purmerend-design-tokens/package.json
index a2254145d..8e393ef22 100644
--- a/proprietary/purmerend-design-tokens/package.json
+++ b/proprietary/purmerend-design-tokens/package.json
@@ -33,9 +33,11 @@
"@nl-design-system-unstable/basis-design-tokens": "workspace:*",
"@nl-design-system-unstable/design-tokens-table-react": "workspace:*",
"@nl-design-system-unstable/theme-toolkit": "workspace:*",
+ "@nl-design-system-unstable/tokens-lib": "workspace:*",
"@storybook/react": "8.2.7",
"@tokens-studio/sd-transforms": "1.2.3",
"@types/react": "18.3.3",
+ "@utrecht/color-sample-css": "1.4.0",
"@utrecht/component-library-react": "7.1.0",
"@utrecht/components": "6.2.0",
"chokidar-cli": "3.0.0",