+ )
+ },
+)
+
+TableOfContentsList.displayName = 'TableOfContents.List'
diff --git a/packages/react/src/TableOfContents/index.ts b/packages/react/src/TableOfContents/index.ts
new file mode 100644
index 0000000000..923942b9e9
--- /dev/null
+++ b/packages/react/src/TableOfContents/index.ts
@@ -0,0 +1,4 @@
+export { TableOfContents } from './TableOfContents'
+export type { TableOfContentsProps } from './TableOfContents'
+export type { TableOfContentsLinkProps } from './TableOfContentsLink'
+export type { TableOfContentsListProps } from './TableOfContentsList'
diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts
index 129ed0b182..cf6e5be48c 100644
--- a/packages/react/src/index.ts
+++ b/packages/react/src/index.ts
@@ -5,6 +5,8 @@
/* Append here */
export * from './FormErrorList'
+export * from './TableOfContents'
+export * from './ErrorMessage'
export * from './FileInput'
export * from './Field'
export * from './Select'
diff --git a/proprietary/assets/CHANGELOG.md b/proprietary/assets/CHANGELOG.md
index 490c62f0d3..02e05646f6 100644
--- a/proprietary/assets/CHANGELOG.md
+++ b/proprietary/assets/CHANGELOG.md
@@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [0.2.1](https://github.com/Amsterdam/design-system/compare/design-system-assets-v0.2.0...design-system-assets-v0.2.1) (2024-06-05)
+
+
+### Features
+
+* favicon, app icons and optional Web Manifest ([#1205](https://github.com/Amsterdam/design-system/issues/1205)) ([5513961](https://github.com/Amsterdam/design-system/commit/55139617966514207402f791a5b4e9778d059946))
+
## [0.2.0](https://github.com/Amsterdam/design-system/compare/design-system-assets-v0.1.8...design-system-assets-v0.2.0) (2024-03-12)
diff --git a/proprietary/assets/package.json b/proprietary/assets/package.json
index cfe1ef3c46..a89be55d33 100644
--- a/proprietary/assets/package.json
+++ b/proprietary/assets/package.json
@@ -1,5 +1,5 @@
{
- "version": "0.2.0",
+ "version": "0.2.1",
"author": "Community for NL Design System",
"description": "Assets for the City of Amsterdam",
"license": "SEE LICENSE IN LICENSE.md",
diff --git a/proprietary/tokens/CHANGELOG.md b/proprietary/tokens/CHANGELOG.md
index 68776379b9..56fbf6211c 100644
--- a/proprietary/tokens/CHANGELOG.md
+++ b/proprietary/tokens/CHANGELOG.md
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [0.9.0](https://github.com/Amsterdam/design-system/compare/design-system-tokens-v0.8.0...design-system-tokens-v0.9.0) (2024-06-05)
+
+
+### ⚠ BREAKING CHANGES
+
+* Disallow directional style rules ([#1245](https://github.com/Amsterdam/design-system/issues/1245))
+* Use invalid prop for most inputs ([#1240](https://github.com/Amsterdam/design-system/issues/1240))
+* Add invalid prop to Field Set and update Field and Field Set docs ([#1237](https://github.com/Amsterdam/design-system/issues/1237))
+* Allow additional background colours for Badge and remove dark blue option ([#1236](https://github.com/Amsterdam/design-system/issues/1236))
+* Rename Breadcrumb Item to Link ([#1232](https://github.com/Amsterdam/design-system/issues/1232))
+* Use logical properties for Search Field, Select, Text Area and Text Input ([#1226](https://github.com/Amsterdam/design-system/issues/1226))
+* Flatten token names for default text size and line height ([#1221](https://github.com/Amsterdam/design-system/issues/1221))
+
+### Features
+
+* Add Error Message ([#1247](https://github.com/Amsterdam/design-system/issues/1247)) ([1dec2ea](https://github.com/Amsterdam/design-system/commit/1dec2ead41fba24e4128c2e1d60b72a7ccb29a92))
+* Add Field component ([#1228](https://github.com/Amsterdam/design-system/issues/1228)) ([66832aa](https://github.com/Amsterdam/design-system/commit/66832aaf14a209915b60498acecf90cecff27c23))
+* Add invalid prop to Field Set and update Field and Field Set docs ([#1237](https://github.com/Amsterdam/design-system/issues/1237)) ([d7316e8](https://github.com/Amsterdam/design-system/commit/d7316e81cd424f79f9bd655265d1c9b41296fecf))
+* Allow additional background colours for Badge and remove dark blue option ([#1236](https://github.com/Amsterdam/design-system/issues/1236)) ([eec669a](https://github.com/Amsterdam/design-system/commit/eec669ad79353fc205e12a35aa7d0a8297c72e41))
+* Allow small text for ordered lists ([#1219](https://github.com/Amsterdam/design-system/issues/1219)) ([0e77bd6](https://github.com/Amsterdam/design-system/commit/0e77bd60d8f395417c3c736d8e51a3ca3729ece5))
+* Allow small text for unordered lists ([#1217](https://github.com/Amsterdam/design-system/issues/1217)) ([5012851](https://github.com/Amsterdam/design-system/commit/5012851492e50e50e2a651250622740e517fd22f))
+* File Input ([#1218](https://github.com/Amsterdam/design-system/issues/1218)) ([7b6ba98](https://github.com/Amsterdam/design-system/commit/7b6ba98530caaefafedada5b89a175ef0b1a8784))
+* Rename Breadcrumb Item to Link ([#1232](https://github.com/Amsterdam/design-system/issues/1232)) ([6cf2e5e](https://github.com/Amsterdam/design-system/commit/6cf2e5e51217900a24d739c4569c13237b9fb4ab))
+* Use invalid prop for most inputs ([#1240](https://github.com/Amsterdam/design-system/issues/1240)) ([9477186](https://github.com/Amsterdam/design-system/commit/9477186b8432d6d20991e93d92c64a4357d6f391))
+* Use logical properties for Search Field, Select, Text Area and Text Input ([#1226](https://github.com/Amsterdam/design-system/issues/1226)) ([4471c7a](https://github.com/Amsterdam/design-system/commit/4471c7a154e9f1f31dd92298f932f4bbc134dbf9))
+
+
+### Bug Fixes
+
+* Disallow directional style rules ([#1245](https://github.com/Amsterdam/design-system/issues/1245)) ([8ab6f81](https://github.com/Amsterdam/design-system/commit/8ab6f81d4cbcdb75b7acb986a145d49ccd1895c8))
+* Flatten token names for default text size and line height ([#1221](https://github.com/Amsterdam/design-system/issues/1221)) ([6eeaeb4](https://github.com/Amsterdam/design-system/commit/6eeaeb41fae90a2d455b4e41da3ff3a4561dcbe4))
+
## [0.8.0](https://github.com/Amsterdam/design-system/compare/design-system-tokens-v0.7.1...design-system-tokens-v0.8.0) (2024-04-22)
diff --git a/proprietary/tokens/package.json b/proprietary/tokens/package.json
index 72cfc07c26..0fff7794bb 100644
--- a/proprietary/tokens/package.json
+++ b/proprietary/tokens/package.json
@@ -1,5 +1,5 @@
{
- "version": "0.8.0",
+ "version": "0.9.0",
"author": "Community for NL Design System",
"description": "Design tokens for components for the City of Amsterdam based on the NL Design System architecture",
"license": "SEE LICENSE IN LICENSE.md",
diff --git a/proprietary/tokens/src/components/ams/error-message.tokens.json b/proprietary/tokens/src/components/ams/error-message.tokens.json
new file mode 100644
index 0000000000..a742de7279
--- /dev/null
+++ b/proprietary/tokens/src/components/ams/error-message.tokens.json
@@ -0,0 +1,11 @@
+{
+ "ams": {
+ "error-message": {
+ "color": { "value": "{ams.color.primary-red}" },
+ "font-family": { "value": "{ams.text.font-family}" },
+ "font-size": { "value": "{ams.text.level.6.font-size}" },
+ "font-weight": { "value": "{ams.text.font-weight.normal}" },
+ "line-height": { "value": "{ams.text.level.6.line-height}" }
+ }
+ }
+}
diff --git a/proprietary/tokens/src/components/ams/table-of-contents.tokens.json b/proprietary/tokens/src/components/ams/table-of-contents.tokens.json
new file mode 100644
index 0000000000..9329766bb0
--- /dev/null
+++ b/proprietary/tokens/src/components/ams/table-of-contents.tokens.json
@@ -0,0 +1,34 @@
+{
+ "ams": {
+ "table-of-contents": {
+ "font-family": { "value": "{ams.text.font-family}" },
+ "font-size": { "value": "{ams.text.level.5.font-size}" },
+ "font-weight": { "value": "{ams.text.font-weight.normal}" },
+ "gap": { "value": "{ams.space.inside.md}" },
+ "line-height": { "value": "{ams.text.level.5.line-height}" },
+ "link": {
+ "color": { "value": "{ams.link-appearance.color}" },
+ "outline-offset": { "value": "{ams.focus.outline-offset}" },
+ "text-decoration-line": { "value": "{ams.link-appearance.subtle.text-decoration-line}" },
+ "text-decoration-thickness": { "value": "{ams.link-appearance.text-decoration-thickness}" },
+ "text-underline-offset": { "value": "{ams.link-appearance.text-underline-offset}" },
+ "hover": {
+ "color": { "value": "{ams.link-appearance.hover.color}" },
+ "text-decoration-line": { "value": "{ams.link-appearance.subtle.hover.text-decoration-line}" }
+ }
+ },
+ "list": {
+ "gap": { "value": "{ams.space.inside.md}" },
+ "list": {
+ "padding-block-start": { "value": "{ams.space.inside.md}" },
+ "padding-inline-start": { "value": "{ams.space.inside.lg}" }
+ }
+ },
+ "heading": {
+ "font-weight": { "value": "{ams.text.font-weight.bold}" },
+ "font-size": { "value": "{ams.text.level.4.font-size}" },
+ "line-height": { "value": "{ams.text.level.4.line-height}" }
+ }
+ }
+ }
+}
diff --git a/storybook/src/components/ErrorMessage/ErrorMessage.docs.mdx b/storybook/src/components/ErrorMessage/ErrorMessage.docs.mdx
new file mode 100644
index 0000000000..74fae9a038
--- /dev/null
+++ b/storybook/src/components/ErrorMessage/ErrorMessage.docs.mdx
@@ -0,0 +1,19 @@
+import { Canvas, Controls, Markdown, Meta, Primary } from "@storybook/blocks";
+import * as ErrorMessageStories from "./ErrorMessage.stories.tsx";
+import README from "../../../../packages/css/src/components/error-message/README.md?raw";
+
+
+
+{README}
+
+
+
+
+
+## With a custom prefix
+
+Error messages are automatically prefixed with a visually hidden text, the Dutch word "Invoerfout".
+This makes the error message more clear for screen reader users.
+If you want to change this prefix, to support another language for example, you can use the `prefix` prop.
+
+
diff --git a/storybook/src/components/ErrorMessage/ErrorMessage.stories.tsx b/storybook/src/components/ErrorMessage/ErrorMessage.stories.tsx
new file mode 100644
index 0000000000..8e6c3e4312
--- /dev/null
+++ b/storybook/src/components/ErrorMessage/ErrorMessage.stories.tsx
@@ -0,0 +1,33 @@
+/**
+ * @license EUPL-1.2+
+ * Copyright Gemeente Amsterdam
+ */
+
+import { ErrorMessage } from '@amsterdam/design-system-react/src'
+import { Meta, StoryObj } from '@storybook/react'
+
+const meta = {
+ title: 'Components/Forms/Error Message',
+ component: ErrorMessage,
+ args: {
+ children: 'Vul een geldig e-mailadres in, bijvoorbeeld naam@voorbeeld.nl.',
+ },
+ argTypes: {
+ children: {
+ table: { disable: false },
+ },
+ },
+} satisfies Meta
+
+export default meta
+
+type Story = StoryObj
+
+export const Default: Story = {}
+
+export const WithCustomPrefix: Story = {
+ args: {
+ children: 'Enter an email address in the correct format, like name@example.com',
+ prefix: 'Error',
+ },
+}
diff --git a/storybook/src/components/Field/Field.docs.mdx b/storybook/src/components/Field/Field.docs.mdx
index c2283e9caf..4a0eb86187 100644
--- a/storybook/src/components/Field/Field.docs.mdx
+++ b/storybook/src/components/Field/Field.docs.mdx
@@ -14,7 +14,7 @@ import README from "../../../../packages/css/src/components/field/README.md?raw"
A Field can have a description.
Make sure to connect this description to the input in the Field,
-otherwise this won’t be read by a screen reader.
+otherwise it won’t be read by a screen reader.
Add an `aria-describedby` attribute to the input and provide the `id` of the describing element as its value.
@@ -22,5 +22,9 @@ Add an `aria-describedby` attribute to the input and provide the `id` of the des
## With Error
A Field can indicate if the contained input has a validation error.
+Use Error Message to describe the error.
+Make sure to connect the error message to the input in the Field,
+otherwise it won’t be read by a screen reader.
+Add an `aria-describedby` attribute to the input and provide the `id` of Error Message as its value.
diff --git a/storybook/src/components/Field/Field.stories.tsx b/storybook/src/components/Field/Field.stories.tsx
index c1559c47a3..e542c88ea8 100644
--- a/storybook/src/components/Field/Field.stories.tsx
+++ b/storybook/src/components/Field/Field.stories.tsx
@@ -3,8 +3,8 @@
* Copyright Gemeente Amsterdam
*/
-import { TextInput } from '@amsterdam/design-system-react'
-import { Field, Label, Paragraph } from '@amsterdam/design-system-react/src'
+import { ErrorMessage, Label, TextInput } from '@amsterdam/design-system-react'
+import { Field, Paragraph } from '@amsterdam/design-system-react/src'
import { Meta, StoryObj } from '@storybook/react'
const meta = {
@@ -48,7 +48,8 @@ export const WithError: Story = {
Typ geen persoonsgegevens in deze omschrijving. We vragen dit later in dit formulier aan u.
-
+ Geef aan waar het om gaat.
+
),
}
diff --git a/storybook/src/components/FieldSet/FieldSet.docs.mdx b/storybook/src/components/FieldSet/FieldSet.docs.mdx
index 4214143dec..506cab411d 100644
--- a/storybook/src/components/FieldSet/FieldSet.docs.mdx
+++ b/storybook/src/components/FieldSet/FieldSet.docs.mdx
@@ -25,6 +25,10 @@ and provide the `id` of the describing element as its value.
## With Error
A Field Set can indicate whether any of the inputs it contains has a validation error.
+Use Error Message to describe the error.
+Make sure to connect the error message to the correct input in the Field Set,
+otherwise it won’t be read by a screen reader.
+Add an `aria-describedby` attribute to the input and provide the `id` of Error Message as its value.
@@ -32,12 +36,19 @@ A Field Set can indicate whether any of the inputs it contains has a validation
Use a Field Set to group radio buttons.
When grouping radio inputs, use `role="radiogroup"` on Field Set to have this grouping explicitly announced as a radio group (the default role is `group`).
-
Using `role="radiogroup"` also allows you to use `aria-required` on Field Set, which isn’t allowed for role `group`.
Always also set `aria-required` on the individual radio buttons though, to make sure it’s read by screen readers.
+### Radio group with error
+
+A Field Set with a radio button group can also have a validation error.
+In this case, connect the error message to the Field Set instead of an input.
+Add an `aria-describedby` attribute to the Field Set and provide the `id` of Error Message as its value.
+
+
+
### Checkbox group
Use a Field Set to group checkboxes.
@@ -48,3 +59,9 @@ not report a description connected to a Field Set when it contains checkboxes.
Try to avoid using descriptions for Field Sets containing checkboxes for this reason.
+
+### Checkbox group with error
+
+Because of [the NVDA bug mentioned earlier](https://github.com/nvaccess/nvda/issues/12718),
+we currently do not have a reliable way to report error messages for checkbox groups with a validation error.
+We are working on adding this as soon as possible.
diff --git a/storybook/src/components/FieldSet/FieldSet.stories.tsx b/storybook/src/components/FieldSet/FieldSet.stories.tsx
index 501d5c56bd..1aed9b47b9 100644
--- a/storybook/src/components/FieldSet/FieldSet.stories.tsx
+++ b/storybook/src/components/FieldSet/FieldSet.stories.tsx
@@ -3,7 +3,16 @@
* Copyright Gemeente Amsterdam
*/
-import { Checkbox, Column, FieldSet, Label, Paragraph, Radio, TextInput } from '@amsterdam/design-system-react/src'
+import {
+ Checkbox,
+ Column,
+ ErrorMessage,
+ FieldSet,
+ Label,
+ Paragraph,
+ Radio,
+ TextInput,
+} from '@amsterdam/design-system-react/src'
import { Meta, StoryObj } from '@storybook/react'
const meta = {
@@ -64,9 +73,11 @@ export const WithError: Story = {
-
+ {args.invalid && Vul uw voornaam in.}
+
-
+ {args.invalid && Vul uw achternaam in.}
+
),
@@ -105,6 +116,45 @@ export const RadioGroup: Story = {
),
}
+export const RadioGroupWithError: Story = {
+ args: {
+ legend: 'Waar gaat uw melding over?',
+ invalid: true,
+ },
+ render: (args) => (
+
+ ),
+}
+
export const CheckboxGroup: Story = {
args: {
legend: 'Waar gaat uw melding over?',
@@ -128,3 +178,29 @@ export const CheckboxGroup: Story = {
),
}
+
+// export const CheckboxGroupWithError: Story = {
+// args: {
+// invalid: true,
+// legend: 'Waar gaat uw melding over?',
+// },
+// render: (args) => (
+//
+// ),
+// }
diff --git a/storybook/src/components/TableOfContents/TableOfContents.docs.mdx b/storybook/src/components/TableOfContents/TableOfContents.docs.mdx
new file mode 100644
index 0000000000..421979f29d
--- /dev/null
+++ b/storybook/src/components/TableOfContents/TableOfContents.docs.mdx
@@ -0,0 +1,15 @@
+import { Canvas, Controls, Markdown, Meta, Primary } from "@storybook/blocks";
+import * as TableOfContentsStories from "./TableOfContents.stories.tsx";
+import README from "../../../../packages/css/src/components/table-of-contents/README.md?raw";
+
+
+
+{README}
+
+
+
+
+
+## Multilevel
+
+
diff --git a/storybook/src/components/TableOfContents/TableOfContents.stories.tsx b/storybook/src/components/TableOfContents/TableOfContents.stories.tsx
new file mode 100644
index 0000000000..abfed9e065
--- /dev/null
+++ b/storybook/src/components/TableOfContents/TableOfContents.stories.tsx
@@ -0,0 +1,62 @@
+/**
+ * @license EUPL-1.2+
+ * Copyright Gemeente Amsterdam
+ */
+
+import { TableOfContents } from '@amsterdam/design-system-react/src'
+import { Meta, StoryObj } from '@storybook/react'
+
+const meta = {
+ title: 'Components/Navigation/Table of Contents',
+ component: TableOfContents,
+ args: {
+ heading: 'Op deze pagina',
+ children: (
+
+
+
+
+
+
+ ),
+ },
+} satisfies Meta
+
+export default meta
+
+type Story = StoryObj
+
+export const Default: Story = {}
+
+export const MultiLevel: Story = {
+ args: {
+ heading: 'Inhoudsopgave',
+ children: (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ),
+ },
+}