Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
faa68d7
chore: upgrade to react@19
richadr Mar 26, 2026
3518123
chore: upgrade @storybook/theming in shared package to match root pac…
richadr Mar 26, 2026
c8670bd
chore: upgrade vega-related packages to latest
richadr Mar 26, 2026
13aacba
feat: update VegaVisualization to handle breaking changes of react-ve…
richadr Mar 26, 2026
60c762c
chore: upgrade to gatsby@5.16.1
richadr Mar 26, 2026
bb126fa
chore: refactor jest config to ESM
richadr Mar 26, 2026
c6b6cce
chore: upgrade @testing-library/* to latest in react packages
richadr Mar 26, 2026
c6f3a94
test: update test to avoid <body> being rendered inside <div>
richadr Mar 26, 2026
4149a78
test: test Root component in a different way
richadr Mar 26, 2026
655d975
chore: upgrade @gemeente-denhaag/process-steps
richadr Mar 26, 2026
43f03ca
chore: add explicit dependency to types to ensure the correct version…
richadr Mar 26, 2026
cc84d41
chore: remove unused components and dependency
richadr Mar 26, 2026
1521360
chore: remove incompatible storybook plugin
richadr Mar 26, 2026
5ba5442
chore: upgrade html-react-parser to 5 (compatibility with React 19)
richadr Mar 26, 2026
65ef635
fix: fix type after upgrading @types/react
richadr Mar 26, 2026
5975d20
chore: skip type-checking of external files
richadr Mar 26, 2026
1a79dc2
chore: upgrade storybook (in storybook-angular) to 9
richadr Mar 26, 2026
9569e37
chore: clean up broken/unused docs
richadr Mar 26, 2026
3f9b24f
chore: fix import
richadr Mar 26, 2026
04463a1
chore: remove unused dependency
richadr Mar 26, 2026
ab79838
refactor: fix typo in component name
richadr Mar 27, 2026
beff7b7
fix: avoid rendering html/body tags in stories
richadr Mar 27, 2026
95d04a9
chore: migrate VegaVisualization to separate package
richadr Apr 2, 2026
0403f9e
chore: add build scaffolding for vega-visualization-react
richadr Apr 2, 2026
dd9d4de
docs: add changeset to release vega-visualization-react as 1.0.0
richadr Apr 2, 2026
7185c60
chore: pass with no tests
richadr Apr 2, 2026
69bd976
build: add vega to devDeps and remove unused dep
richadr Apr 2, 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
7 changes: 7 additions & 0 deletions .changeset/polite-eyes-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@utrecht/component-library-react": minor
---

- Upgraded react-vega, vega, vega-lite.
- `VegaVisualization` was updated to handle the changed API.
- `VegaVisualization` now has an `options` prop which is passed into the underlying `VegaEmbed` component. The `actions` prop, which can also be controlled through `options`, has been deprecated.
5 changes: 5 additions & 0 deletions .changeset/sharp-rats-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@utrecht/vega-visualization-react": major
---

Initial version as extracted from `@utrecht/component-library-react`
88 changes: 0 additions & 88 deletions documentation/button-types.stories.mdx

This file was deleted.

12 changes: 0 additions & 12 deletions documentation/components/Markdown.jsx

This file was deleted.

7 changes: 4 additions & 3 deletions documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
"@babel/preset-env": "7.24.8",
"@babel/preset-react": "7.24.7",
"@mdx-js/react": "2.3.0",
"@storybook/blocks": "7.6.21",
"@types/react": "19.2.14",
"@types/react-dom": "19.2.3",
"lodash.clonedeepwith": "4.5.0",
"lodash.isplainobject": "4.0.6",
"lodash.mapvalues": "4.6.0",
"lodash.omitby": "4.6.0",
"prop-types": "15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.2.4",
"react-dom": "19.2.4",
"typescript": "5.9.3",
"webpack": "5.89.0"
}
Expand Down
8 changes: 4 additions & 4 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
"@astrojs/react": "4.4.2",
"@nl-design-system/tsconfig": "1.0.5",
"@types/hast": "3.0.4",
"@types/react": "18.3.27",
"@types/react-dom": "18.3.7",
"@types/react": "19.2.14",
"@types/react-dom": "19.2.3",
"hast-util-is-element": "3.0.0",
"hast-util-select": "6.0.4",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.2.4",
"react-dom": "19.2.4",
"unist-util-visit": "5.0.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Config } from 'jest';

const config: Config = {
/**
* @type {import('jest').Config}
*/
const config = {
coverageProvider: 'v8',
extensionsToTreatAsEsm: ['.ts', '.tsx'],
rootDir: './src/',
Expand Down
13 changes: 7 additions & 6 deletions packages/component-library-pdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,21 @@
"@babel/plugin-transform-runtime": "7.24.7",
"@babel/preset-react": "7.24.7",
"@jest/globals": "29.7.0",
"@testing-library/jest-dom": "6.4.8",
"@testing-library/react": "15.0.7",
"@testing-library/dom": "10.4.1",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/react": "16.3.2",
"@types/node": "24.10.4",
"@types/react": "18.3.27",
"@types/react-dom": "18.3.7",
"@types/react": "19.2.14",
"@types/react-dom": "19.2.3",
"@utrecht/component-library-css": "workspace:*",
"@utrecht/component-library-react": "workspace:*",
"@utrecht/design-tokens": "workspace:*",
"cross-env": "7.0.3",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"prince": "1.11.8",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.2.4",
"react-dom": "19.2.4",
"rimraf": "5.0.10",
"ts-jest": "29.2.6",
"tsx": "4.19.4",
Expand Down
23 changes: 12 additions & 11 deletions packages/component-library-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
"@utrecht/unordered-list-css": "workspace:*",
"@utrecht/url-data-css": "workspace:*",
"@utrecht/vega-visualization-css": "workspace:*",
"@utrecht/vega-visualization-react": "workspace:*",
"clsx": "2.1.1",
"lodash.chunk": "4.2.0"
},
Expand All @@ -242,21 +243,21 @@
"@rollup/plugin-node-resolve": "15.2.4",
"@rollup/plugin-typescript": "12.1.4",
"@testing-library/dom": "10.4.1",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/react": "16.3.1",
"@testing-library/user-event": "14.5.2",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/react": "16.3.2",
"@testing-library/user-event": "14.6.1",
"@types/jest": "29.5.14",
"@types/lodash.chunk": "4.2.9",
"@types/react": "18.3.27",
"@types/react": "19.2.14",
"@types/testing-library__jest-dom": "5.14.9",
"@utrecht/build-utils-react": "workspace:*",
"gatsby": "5.12.12",
"gatsby": "5.16.1",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"next": "13.5.11",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-vega": "7.6.0",
"react": "19.2.4",
"react-dom": "19.2.4",
"react-vega": "8.0.0",
"rimraf": "5.0.10",
"rollup": "4.23.0",
"rollup-plugin-delete": "2.0.0",
Expand All @@ -270,9 +271,9 @@
"sort-package-json": "2.11.0",
"tslib": "2.6.3",
"typescript": "5.9.3",
"vega": "5.26.1",
"vega-embed": "6.23.0",
"vega-lite": "5.16.3"
"vega": "6.2.0",
"vega-embed": "7.1.0",
"vega-lite": "6.4.2"
},
"peerDependencies": {
"@babel/runtime": "^7.23.6",
Expand Down
8 changes: 4 additions & 4 deletions packages/component-library-react/src/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export interface AccordionSectionProps extends HTMLAttributes<HTMLDivElement> {
onActivate?: Function;
onButtonFocus?: Function;
onButtonBlur?: Function;
buttonRef?: RefObject<HTMLButtonElement>;
buttonRef?: RefObject<HTMLButtonElement | null>;
icon?: ReactNode;
}

Expand Down Expand Up @@ -181,9 +181,9 @@ export const Accordion = forwardRef(

Accordion.displayName = 'Accordion';

export const useAccordion = <T,>(sections: T[], ref: RefObject<HTMLDivElement | undefined>) => {
export const useAccordion = <T,>(sections: T[], ref: RefObject<HTMLDivElement | null>) => {
// const sections: AccordionSectionProviderProps[] = [];
const refs: RefObject<HTMLDivElement>[] = sections.map((_) => useRef<HTMLDivElement>(null));
const refs: RefObject<HTMLDivElement | null>[] = sections.map((_) => useRef<HTMLDivElement>(null));
const buttonRefs = sections.map((_) => useRef<HTMLButtonElement>(null));

return {
Expand Down Expand Up @@ -241,7 +241,7 @@ export interface AccordionProviderProps
}

export const AccordionProvider = ({ sections, icon, heading, headingLevel }: AccordionProviderProps) => {
const ref = useRef<HTMLDivElement>(null);
const ref = useRef<HTMLDivElement | null>(null);
const { refs, buttonRefs, focusNextSection, focusFirstSection, focusLastSection, focusPreviousSection } =
useAccordion(sections, ref);

Expand Down
95 changes: 2 additions & 93 deletions packages/component-library-react/src/VegaVisualization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,96 +4,5 @@
* Copyright (c) 2021-2024 Gemeente Utrecht
*/

import clsx from 'clsx';
import { Vega } from 'react-vega';
import { VegaProps } from 'react-vega/lib/Vega';
import { Config } from 'vega';

export interface VegaVisualizationProps extends Omit<VegaProps, 'renderer'> {
label?: string;
config?: Config;
}

const defaultConfig = {
font: 'var(--utrecht-vega-visualization-font-family, var(--utrecht-document-font-family))',
title: {
fontSize: 20,
anchor: 'start',
offset: 32,
subtitleFontSize: 16,
},
range: {
category: { scheme: 'set1' },
},
axis: {
labelFontSize: 16,
titleFontSize: 16,
labelFontWeight: 'bold',
titleFontWeight: 'normal',
labelAngle: 0,
ticks: false,
labelPadding: 12,
domainColor: 'var(--utrecht-vega-visualization-axis-domain-color, black)',
gridColor: 'var(--utrecht-vega-visualization-axis-grid-color, gray)',
tickColor: 'var(--utrecht-vega-visualization-axis-tick-color, black)',
},
axisY: {
titleAngle: 0,
titleX: 0,
titleY: 7,
titleAlign: 'left',
titleFontWeight: 'bold',
domain: false,
},
legend: { labelFontSize: 16, titleFontSize: 16 },
bar: { width: { band: 0.85 } },
view: { stroke: null },
padding: { left: 20, top: 20, right: 25, bottom: 20 },
locale: {
number: {
decimal: ',',
thousands: '.',
grouping: [3],
currency: ['', '\u00a0€'],
},
time: {
dateTime: '%a %e %B %Y %X',
date: '%d-%m-%Y',
time: '%H:%M:%S',
periods: ['AM', 'PM'],
days: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
shortDays: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
months: [
'januari',
'februari',
'maart',
'april',
'mei',
'juni',
'juli',
'augustus',
'september',
'oktober',
'november',
'december',
],
shortMonths: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
},
},
} as Config;

export const VegaVisualization = ({
actions = false,
className,
config,
label,
...restProps
}: VegaVisualizationProps) => {
return (
<div className={clsx('utrecht-vega-visualization', className)} role="img" aria-label={label}>
<div aria-hidden={true}>
<Vega {...restProps} actions={actions} renderer={'svg'} config={{ ...defaultConfig, ...config }} />
</div>
</div>
);
};
export { type VegaVisualizationProps } from '@utrecht/vega-visualization-react';
export { VegaVisualization } from '@utrecht/vega-visualization-react';
14 changes: 8 additions & 6 deletions packages/components-react/action-group-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,19 @@
"clsx": "2.1.1"
},
"devDependencies": {
"@testing-library/dom": "8.20.1",
"@testing-library/jest-dom": "6.5.0",
"@testing-library/react": "16.0.1",
"@testing-library/user-event": "14.5.2",
"@testing-library/dom": "10.4.1",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/react": "16.3.2",
"@testing-library/user-event": "14.6.1",
"@types/jest": "29.5.14",
"@types/react": "18.3.27",
"@types/react": "19.2.14",
"@types/react-dom": "19.2.3",
"@types/testing-library__jest-dom": "5.14.9",
"@utrecht/build-utils-react": "workspace:*",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"react": "18.3.1",
"react": "19.2.4",
"react-dom": "19.2.4",
"rollup": "4.23.0",
"typescript": "5.9.3"
},
Expand Down
Loading
Loading