Skip to content

Commit cb3f0fc

Browse files
Deploying to gh-pages from @ 5caf228 🚀
1 parent b0c97e6 commit cb3f0fc

File tree

497 files changed

+82094
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

497 files changed

+82094
-0
lines changed

demo-DES-1080-focus-tokens/.nojekyll

Whitespace-only changes.

demo-DES-1080-focus-tokens/5caf2286df86ba812c982f786c658cb86cee637a.txt

Whitespace-only changes.
+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file.
4+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5+
6+
## [0.3.0](https://github.com/Amsterdam/design-system/compare/design-system-assets-v0.2.2...design-system-assets-v0.3.0) (2025-01-10)
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
* Delete Radio icon from assets ([#1696](https://github.com/Amsterdam/design-system/issues/1696))
11+
12+
### Features
13+
14+
* Make border of Radio thicker when hovering ([#1696](https://github.com/Amsterdam/design-system/issues/1696)) ([8839012](https://github.com/Amsterdam/design-system/commit/88390124aa5197f6c784dae4fc2a7c3e18d75ca6))
15+
* Change SVGO config ([#1671](https://github.com/Amsterdam/design-system/issues/1671)) ([7b79ade](https://github.com/Amsterdam/design-system/commit/7b79adef8b2ff7977e5af7cc6f329191f1dfff3f))
16+
17+
## [0.2.2](https://github.com/Amsterdam/design-system/compare/design-system-assets-v0.2.1...design-system-assets-v0.2.2) (2024-10-25)
18+
19+
### Features
20+
21+
* Use inline SVG icon for Radio button ([#1460](https://github.com/Amsterdam/design-system/issues/1460)) ([c19055b](https://github.com/Amsterdam/design-system/commit/c19055bd6453ce40ca43b31d599f14ec65d6037a))
22+
23+
## [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)
24+
25+
### Features
26+
27+
* 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))
28+
29+
## [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)
30+
31+
### ⚠ BREAKING CHANGES
32+
33+
* Shorten namespaces in theme and tokens ([#1125](https://github.com/Amsterdam/design-system/issues/1125))
34+
35+
### Features
36+
37+
* Shorten namespaces in theme and tokens ([#1125](https://github.com/Amsterdam/design-system/issues/1125)) ([1c81f3b](https://github.com/Amsterdam/design-system/commit/1c81f3bd14c1f202eec2341aec1888fb74d956d5))
38+
39+
## [0.1.8](https://github.com/Amsterdam/design-system/compare/design-system-assets-v0.1.7...design-system-assets-v0.1.8) (2024-03-08)
40+
41+
### Features
42+
43+
* Logo Museum Weesp ([#1088](https://github.com/Amsterdam/design-system/issues/1088)) ([da1b780](https://github.com/Amsterdam/design-system/commit/da1b7808b5bcf17acb93fe46531a9722814e9256))
44+
45+
## [0.1.7](https://github.com/Amsterdam/design-system/compare/@amsterdam/design-system-assets@0.1.6...@amsterdam/design-system-assets@0.1.7) (2024-01-31)
46+
47+
**Note:** Version bump only for package @amsterdam/design-system-assets
48+
49+
## [0.1.6](https://github.com/Amsterdam/design-system/compare/@amsterdam/design-system-assets@0.1.5...@amsterdam/design-system-assets@0.1.6) (2023-12-22)
50+
51+
**Note:** Version bump only for package @amsterdam/design-system-assets
52+
53+
## [0.1.5](https://github.com/Amsterdam/design-system/compare/@amsterdam/design-system-assets@0.1.4...@amsterdam/design-system-assets@0.1.5) (2023-12-01)
54+
55+
**Note:** Version bump only for package @amsterdam/design-system-assets
56+
57+
## [0.1.4](https://github.com/Amsterdam/design-system/compare/@amsterdam/design-system-assets@0.1.3...@amsterdam/design-system-assets@0.1.4) (2023-11-27)
58+
59+
**Note:** Version bump only for package @amsterdam/design-system-assets
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- @license CC0-1.0 -->
2+
3+
# Contributing Guidelines
4+
5+
## Importing icons from Figma
6+
7+
We create and update icons in Figma, then import them into this package for distribution.
8+
9+
**Important**: Only export icons from Figma for use in this package. Do not use these icons directly in an application.
10+
11+
To export all icons from [the Figma file](https://www.figma.com/design/9IGm6IdPUYizBNGsUnueBd/Amsterdam-Design-System?node-id=6852-5124), use Figma's built-in SVG export feature.
12+
Select the frame containing all the icon shapes, press `Enter` to select direct children and then press `Enter` again to select all icon components.
13+
In the right-hand sidebar, click the plus sign next to Export. Choose SVG and export.
14+
Copy these files over to the `icons` folder and run the following command to optimize them:
15+
16+
```sh
17+
npm run optimize-icons
18+
```

demo-DES-1080-focus-tokens/LICENSE.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!-- @license CC0-1.0 -->
2+
3+
# License
4+
5+
The open source license does NOT apply to files in this directory.
6+
7+
These are properietary assets to the City of Amsterdam.

demo-DES-1080-focus-tokens/README.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!-- @license CC0-1.0 -->
2+
3+
# Amsterdam Design System: Assets
4+
5+
This package provides all assets from the [Amsterdam Design System](https://designsystem.amsterdam).
6+
Use it to include the correct fonts, icons or logos in your website or application.
7+
8+
## Installation
9+
10+
Install this package by itself if you want or need to reference assets directly in your project.
11+
12+
Note that our [React components](https://www.npmjs.com/package/@amsterdam/design-system-react) provide more functionality for some of the assets and use them automatically.
13+
You should use that package if your application uses React.
14+
15+
```sh
16+
npm install @amsterdam/design-system-assets
17+
```
18+
19+
## Usage
20+
21+
### Application icons
22+
23+
The Design System handbook helps using [a favicon](https://designsystem.amsterdam/?path=/docs/brand-assets-favicon--docs) or [a web manifest and application icons](https://designsystem.amsterdam/?path=/docs/docs-developer-guide-web-app--docs) for home screens of devices in your website or application.
24+
25+
### Font files
26+
27+
The package contains our Amsterdam Sans font in OpenType format (.otf) and Web Open Format Font (.woff).
28+
Import our stylesheet to make all of them available to your project.
29+
30+
<!-- prettier-ignore -->
31+
```ts
32+
import "@amsterdam/design-system-assets/font/index.css"
33+
```
34+
35+
The Design System Handbook offers [more guidance in using the font](https://designsystem.amsterdam/?path=/docs/brand-assets-font--docs).
36+
37+
Note that the font is proprietary. Using it requires [a license](https://designsystem.amsterdam/?path=/docs/docs-terms-of-use-copyright--docs).
38+
39+
### Icons
40+
41+
The Design System Handbook offers an [overview of our icon library](https://designsystem.amsterdam/?path=/docs/brand-assets-icons--docs).
42+
43+
You can import the SVG files to use icons in your website or application.
44+
45+
In a React project, use the [Icon component](https://designsystem.amsterdam/?path=/docs/components-media-icon--docs) instead.
46+
It offers a convenient API for using the icons and streamlines alignment with text.
47+
48+
### Logos
49+
50+
The logo of the City of Amsterdam is available as an SVG image, as well as logos for various departments and services.
51+
52+
In a React project, use the [Logo component](https://designsystem.amsterdam/?path=/docs/components-media-logo--docs) instead.
53+
54+
## Updating
55+
56+
We follow semantic versioning and publish a [change log](https://github.com/Amsterdam/design-system/blob/main/proprietary/assets/CHANGELOG.md) to guide you through updates.
57+
The assets are a public API of the design system.
58+
Note that detecting changed or deleted assets is still a manual process.
59+
60+
## Support
61+
62+
Contact us if you have a question, find an issue, or want to contribute.
63+
Find ways to reach us on [designsystem.amsterdam](https://designsystem.amsterdam/?path=/docs/docs-introduction--docs#send-a-message).
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import{j as e}from"./jsx-runtime-Cf8x2fCZ.js";import{useMDXComponents as a}from"./index-1Ha5aU2j.js";import{M as i,e as r,P as c,f as d,h as o}from"./index-BNbikkJM.js";import{A as h,E as l,R as m}from"./Accordion.stories-DrW2U0B5.js";import"./index-yBjzXJbu.js";import"./index-C0MU9AHG.js";import"./_commonjsHelpers-CqkleIqs.js";import"./iframe-jaBkKXcC.js";import"./index-fNjTmf9T.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";import"./index.esm-hirjXOjg.js";import"./clsx-B-dksMZM.js";import"./index.esm-DvoLfDtE.js";import"./exampleContent-PGFPgakh.js";import"./getHeadingTag-Dv1eMqvl.js";import"./Icon-CJVFfJZC.js";import"./useKeyboardFocus-nadMEUdd.js";const p=`<!-- @license CC0-1.0 -->
2+
3+
# Accordion
4+
5+
The accordion component is a clickable (vertically stacked) list of headings to hide or show associated content.
6+
With an accordion, you offer content to users progressively.
7+
8+
## Guidelines
9+
10+
- Use an accordion on a full page with essential and non-essential content.
11+
- Hiding non-essential content helps users get to important content more quickly.
12+
- Avoid using an accordion to avoid too much essential content on 1 page.
13+
- Rewrite the page more compactly or divide the content over multiple pages instead of using the accordion in the first place.
14+
- Don’t hide essential information in an accordion.
15+
- An accordion consists of several accordion sections.
16+
- Use a minimum of 3 and a maximum of 10 sections underneath each other.
17+
- It is essential for accordion sections to have clear headings, as the user cannot "scan" the hidden content to find relevant information.
18+
- Hiding the content has the disadvantage that "search in page" does not yield any hidden content results.
19+
- If you know the search term the user used to get to the accordion page, you can automatically expand the sections that contain the search term.
20+
- The accordion’s content may contain formatting (e.g. headings, lists, links and buttons).
21+
22+
You can navigate an accordion with your keyboard:
23+
24+
| key | element |
25+
| :------------- | :-------------------------------------------------------------------------------------------------------------------- |
26+
| Enter or Space | Open or close the accordion section that has the focus |
27+
| Tab | Go to the next element that can have focus |
28+
| Shift + Tab | Go to the next element that can have focus |
29+
| Down arrow | If an accordion section has focus, go to the next section; if the last section has focus, go to the first section |
30+
| Up arrow | If an accordion section has focus, go to the previous section; if the first section has focus, go to the last section |
31+
| Home | If an accordion section has focus: go to the first section |
32+
| End | If an accordion section has focus, go to the last section |
33+
34+
## Relevant WCAG requirements
35+
36+
The WCAG requirements for the Button and Heading components also apply to the accordion header.
37+
38+
Pay extra attention to these parts:
39+
40+
- [WCAG requirement 1.3.1](https://www.w3.org/TR/WCAG21/#info-and-relationships): the heading level of the accordion sections depends on where in the page the accordion is placed, this may differ per page.
41+
- [WCAG requirement 1.3.6](https://www.w3.org/TR/WCAG21/#identify-purpose): use \`aria-controls\` for the button, and use a \`region\` landmark for the expandable region (use the HTML element \`<section>\` for this)
42+
- [WCAG requirement 1.4.3](https://www.w3.org/TR/WCAG21/#contrast-minimum): contrast between text and background and between icon and background is sufficient in all variants, all interactive statuses and all possible combinations.
43+
- [WCAG requirement 3.2.1](https://www.w3.org/TR/WCAG21/#on-focus): do not automatically make the accordion expanded when the button gets focus.
44+
- [WCAG requirement 2.1.3](https://www.w3.org/TR/WCAG21/#keyboard-no-exception): Support the optional keys: \`Down Arrow\`, \`Up Arrow\`, \`Home\` and \`End\`.
45+
- \`Space\` should activate the button, not scroll the page (use \`keypressEvt.preventDefault()\`).
46+
- [WCAG requirement 2.4.6](https://www.w3.org/TR/WCAG21/#headings-and-labels): The text used both as a heading and as a label for the button must be clear because the content is not always visible.
47+
- [WCAG requirement 2.4.10](https://www.w3.org/TR/WCAG21/#section-headings): accordions that are part of the running text must use section headings.
48+
49+
## References
50+
51+
- [W3C - Accordion Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/)
52+
`;/*@license CC0-1.0*/function s(t){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...a(),...t.components};return e.jsxs(e.Fragment,{children:[`
53+
`,`
54+
`,e.jsx(i,{of:h}),`
55+
`,e.jsx(r,{children:p}),`
56+
`,e.jsxs(n.p,{children:[`Each accordion section has its unique name.
57+
Provide this name via the `,e.jsx(n.code,{children:"label"})," property of the ",e.jsx(n.code,{children:"Accordion.Section"})," component."]}),`
58+
`,e.jsx(c,{}),`
59+
`,e.jsx(d,{}),`
60+
`,e.jsx(n.h2,{id:"examples",children:"Examples"}),`
61+
`,e.jsx(n.h3,{id:"expanded-by-default",children:"Expanded by default"}),`
62+
`,e.jsxs(n.p,{children:["If you want the contents of an accordion section to appear initially, pass the ",e.jsx(n.code,{children:"expanded"})," property to the ",e.jsx(n.code,{children:"Accordion.Section"})," component."]}),`
63+
`,e.jsx(o,{of:l}),`
64+
`,e.jsx(n.h3,{id:"limit-the-amount-of-accessibility-landmarks",children:"Limit the amount of accessibility landmarks"}),`
65+
`,e.jsxs(n.p,{children:["An Accordion Section renders a ",e.jsx(n.code,{children:"section"}),` element in HTML by default.
66+
Each of them introduces a landmark region, but having many of them on a page can confuse screen reader users.
67+
Let Accordions with 6 Sections or more render generic `,e.jsx(n.code,{children:"div"})," elements through ",e.jsx(n.code,{children:'sectionAs="div"'}),"."]}),`
68+
`,e.jsx(o,{of:m}),`
69+
`,e.jsx(n.h3,{id:"technical-considerations",children:"Technical considerations"}),`
70+
`,e.jsxs(n.h3,{id:"the-accordion-parent-component",children:["The ",e.jsx(n.code,{children:"Accordion"})," parent component"]}),`
71+
`,e.jsx(n.p,{children:"The parent component is used for several reasons:"}),`
72+
`,e.jsxs(n.ul,{children:[`
73+
`,e.jsx(n.li,{children:"It sets the spacing between Accordion Sections."}),`
74+
`,e.jsx(n.li,{children:"It allows you to set the same heading level for all Accordion Sections."}),`
75+
`,e.jsx(n.li,{children:"It allows you to set the same HTML element for all Accordion Sections."}),`
76+
`,e.jsx(n.li,{children:"It adds the extra keyboard navigation described in the guidelines."}),`
77+
`]}),`
78+
`,e.jsxs(n.h3,{id:"the-html-details-element",children:["The HTML ",e.jsx(n.code,{children:"details"})," element"]}),`
79+
`,e.jsxs(n.p,{children:["Currently (28-6-2023), the ",e.jsx(n.code,{children:"details"}),` element has some accessibility problems.
80+
`,e.jsx(n.a,{href:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary#summaries_as_headings",rel:"nofollow",children:"For example, a heading in a summary is not adequately understood by screen readers"}),` and
81+
NVDA does not read Chrome and Edge’s collapsed and expanded status correctly.
82+
That’s why we chose not to use this native element.
83+
If these problems are solved, we could do this.`]})]})}function M(t={}){const{wrapper:n}={...a(),...t.components};return n?e.jsx(n,{...t,children:e.jsx(s,{...t})}):s(t)}export{M as default};

0 commit comments

Comments
 (0)