@amsterdam/design-system-react 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/dist/Accordion/Accordion.d.ts +7 -7
  2. package/dist/Accordion/Accordion.js +2 -6
  3. package/dist/Accordion/Accordion.test.js +4 -4
  4. package/dist/Accordion/AccordionContext.d.ts +1 -2
  5. package/dist/Accordion/AccordionContext.js +3 -2
  6. package/dist/Accordion/AccordionSection.d.ts +5 -5
  7. package/dist/Accordion/AccordionSection.js +6 -9
  8. package/dist/Accordion/AccordionSection.test.js +18 -5
  9. package/dist/ActionGroup/ActionGroup.js +1 -5
  10. package/dist/Alert/Alert.d.ts +16 -4
  11. package/dist/Alert/Alert.js +3 -7
  12. package/dist/Alert/Alert.test.js +24 -13
  13. package/dist/Avatar/Avatar.js +1 -5
  14. package/dist/Avatar/Avatar.test.js +2 -1
  15. package/dist/Badge/Badge.d.ts +4 -4
  16. package/dist/Badge/Badge.js +1 -5
  17. package/dist/Blockquote/Blockquote.d.ts +5 -5
  18. package/dist/Blockquote/Blockquote.js +1 -5
  19. package/dist/Breadcrumb/Breadcrumb.js +0 -4
  20. package/dist/Breadcrumb/Breadcrumb.test.js +1 -1
  21. package/dist/Breadcrumb/BreadcrumbLink.js +0 -4
  22. package/dist/Breakout/Breakout.js +2 -6
  23. package/dist/Breakout/Breakout.test.js +1 -1
  24. package/dist/Breakout/BreakoutCell.d.ts +3 -3
  25. package/dist/Breakout/BreakoutCell.js +1 -5
  26. package/dist/Breakout/BreakoutCell.test.js +2 -2
  27. package/dist/Button/Button.d.ts +4 -4
  28. package/dist/Button/Button.js +1 -5
  29. package/dist/CallToActionLink/CallToActionLink.d.ts +12 -0
  30. package/dist/CallToActionLink/CallToActionLink.js +8 -0
  31. package/dist/CallToActionLink/CallToActionLink.test.d.ts +5 -0
  32. package/dist/CallToActionLink/CallToActionLink.test.js +33 -0
  33. package/dist/CallToActionLink/index.d.ts +6 -0
  34. package/dist/CallToActionLink/index.js +5 -0
  35. package/dist/Card/Card.d.ts +8 -8
  36. package/dist/Card/Card.js +1 -5
  37. package/dist/Card/CardHeading.d.ts +3 -3
  38. package/dist/Card/CardHeading.js +2 -6
  39. package/dist/Card/CardHeading.test.js +1 -1
  40. package/dist/Card/CardHeadingGroup.d.ts +5 -5
  41. package/dist/Card/CardHeadingGroup.js +1 -5
  42. package/dist/Card/CardImage.d.ts +2 -2
  43. package/dist/Card/CardImage.js +1 -5
  44. package/dist/Card/CardLink.js +1 -5
  45. package/dist/CharacterCount/CharacterCount.d.ts +4 -4
  46. package/dist/CharacterCount/CharacterCount.js +1 -5
  47. package/dist/Checkbox/Checkbox.d.ts +15 -9
  48. package/dist/Checkbox/Checkbox.js +4 -8
  49. package/dist/Checkbox/Checkbox.test.js +9 -0
  50. package/dist/Column/Column.d.ts +5 -5
  51. package/dist/Column/Column.js +1 -5
  52. package/dist/Column/Column.test.js +1 -1
  53. package/dist/DateInput/DateInput.d.ts +4 -4
  54. package/dist/DateInput/DateInput.js +1 -5
  55. package/dist/DescriptionList/DescriptionList.d.ts +5 -5
  56. package/dist/DescriptionList/DescriptionList.js +1 -5
  57. package/dist/DescriptionList/DescriptionListDescription.js +1 -5
  58. package/dist/DescriptionList/DescriptionListSection.js +1 -5
  59. package/dist/DescriptionList/DescriptionListTerm.js +1 -5
  60. package/dist/DescriptionList/index.d.ts +1 -1
  61. package/dist/Dialog/Dialog.d.ts +6 -6
  62. package/dist/Dialog/Dialog.js +2 -6
  63. package/dist/ErrorMessage/ErrorMessage.d.ts +11 -4
  64. package/dist/ErrorMessage/ErrorMessage.js +2 -6
  65. package/dist/Field/Field.d.ts +5 -5
  66. package/dist/Field/Field.js +1 -5
  67. package/dist/FieldSet/FieldSet.d.ts +7 -7
  68. package/dist/FieldSet/FieldSet.js +1 -5
  69. package/dist/Figure/Figure.d.ts +3 -3
  70. package/dist/Figure/Figure.js +1 -5
  71. package/dist/Figure/FigureCaption.d.ts +5 -5
  72. package/dist/Figure/FigureCaption.js +1 -5
  73. package/dist/FileInput/FileInput.js +1 -5
  74. package/dist/FileList/FileList.d.ts +3 -3
  75. package/dist/FileList/FileList.js +1 -5
  76. package/dist/FileList/FileListItem.d.ts +4 -4
  77. package/dist/FileList/FileListItem.js +2 -6
  78. package/dist/Grid/Grid.d.ts +2 -2
  79. package/dist/Grid/Grid.js +1 -5
  80. package/dist/Grid/Grid.test.js +1 -1
  81. package/dist/Grid/GridCell.d.ts +2 -2
  82. package/dist/Grid/GridCell.js +1 -5
  83. package/dist/Grid/GridCell.test.js +1 -1
  84. package/dist/Heading/Heading.d.ts +18 -7
  85. package/dist/Heading/Heading.js +1 -10
  86. package/dist/Heading/Heading.test.js +1 -3
  87. package/dist/Hint/Hint.d.ts +3 -3
  88. package/dist/Hint/Hint.js +1 -5
  89. package/dist/Icon/Icon.d.ts +15 -3
  90. package/dist/Icon/Icon.js +14 -13
  91. package/dist/Icon/Icon.test.js +5 -0
  92. package/dist/IconButton/IconButton.js +1 -5
  93. package/dist/Image/Image.d.ts +4 -4
  94. package/dist/Image/Image.js +2 -6
  95. package/dist/Image/Image.test.js +2 -2
  96. package/dist/Image/index.d.ts +1 -1
  97. package/dist/Image/index.js +1 -1
  98. package/dist/ImageSlider/ImageSlider.d.ts +3 -3
  99. package/dist/ImageSlider/ImageSlider.js +2 -6
  100. package/dist/ImageSlider/ImageSliderControls.js +2 -6
  101. package/dist/ImageSlider/ImageSliderItem.d.ts +5 -5
  102. package/dist/ImageSlider/ImageSliderItem.js +1 -5
  103. package/dist/ImageSlider/ImageSliderScroller.js +1 -5
  104. package/dist/ImageSlider/ImageSliderThumbnails.d.ts +4 -4
  105. package/dist/ImageSlider/ImageSliderThumbnails.js +2 -6
  106. package/dist/InvalidFormAlert/InvalidFormAlert.d.ts +4 -4
  107. package/dist/InvalidFormAlert/InvalidFormAlert.js +0 -4
  108. package/dist/InvalidFormAlert/InvalidFormAlertWithErrors.js +5 -6
  109. package/dist/Label/Label.d.ts +10 -5
  110. package/dist/Label/Label.js +1 -10
  111. package/dist/Link/Link.d.ts +4 -4
  112. package/dist/Link/Link.js +1 -5
  113. package/dist/LinkList/LinkList.d.ts +1 -1
  114. package/dist/LinkList/LinkList.js +1 -5
  115. package/dist/LinkList/LinkListLink.d.ts +13 -4
  116. package/dist/LinkList/LinkListLink.js +3 -7
  117. package/dist/LinkList/LinkListLink.test.js +1 -1
  118. package/dist/Logo/Logo.d.ts +2 -2
  119. package/dist/Logo/Logo.js +1 -5
  120. package/dist/Logo/brand/LogoAmsterdam.js +2 -5
  121. package/dist/Logo/brand/LogoGgdAmsterdam.js +2 -5
  122. package/dist/Logo/brand/LogoMuseumWeesp.js +2 -5
  123. package/dist/Logo/brand/LogoStadsarchief.js +2 -5
  124. package/dist/Logo/brand/LogoStadsbankVanLening.js +2 -5
  125. package/dist/Logo/brand/LogoVgaVerzekeringen.js +2 -5
  126. package/dist/Logo/index.d.ts +1 -1
  127. package/dist/Mark/Mark.js +1 -5
  128. package/dist/Menu/Menu.d.ts +28 -0
  129. package/dist/Menu/Menu.js +10 -0
  130. package/dist/Menu/Menu.test.d.ts +5 -0
  131. package/dist/Menu/Menu.test.js +38 -0
  132. package/dist/Menu/MenuLink.d.ts +20 -0
  133. package/dist/Menu/MenuLink.js +8 -0
  134. package/dist/Menu/MenuLink.test.d.ts +5 -0
  135. package/dist/Menu/MenuLink.test.js +56 -0
  136. package/dist/Menu/index.d.ts +7 -0
  137. package/dist/Menu/index.js +5 -0
  138. package/dist/OrderedList/OrderedList.d.ts +5 -5
  139. package/dist/OrderedList/OrderedList.js +1 -5
  140. package/dist/OrderedList/OrderedList.test.js +1 -1
  141. package/dist/OrderedList/OrderedListItem.js +1 -5
  142. package/dist/Overlap/Overlap.js +1 -5
  143. package/dist/Page/Page.js +1 -5
  144. package/dist/PageFooter/PageFooter.js +1 -5
  145. package/dist/PageFooter/PageFooterMenu.js +1 -5
  146. package/dist/PageFooter/PageFooterMenuLink.js +1 -5
  147. package/dist/PageFooter/PageFooterSpotlight.js +1 -5
  148. package/dist/PageHeader/PageHeader.d.ts +7 -7
  149. package/dist/PageHeader/PageHeader.js +3 -7
  150. package/dist/PageHeader/PageHeader.test.js +1 -1
  151. package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.js +1 -1
  152. package/dist/PageHeader/PageHeaderMenuLink.d.ts +5 -5
  153. package/dist/PageHeader/PageHeaderMenuLink.js +1 -1
  154. package/dist/PageHeading/PageHeading.d.ts +6 -5
  155. package/dist/PageHeading/PageHeading.js +2 -5
  156. package/dist/Pagination/Pagination.d.ts +52 -10
  157. package/dist/Pagination/Pagination.js +5 -9
  158. package/dist/Pagination/Pagination.test.js +23 -10
  159. package/dist/Pagination/getRange.js +4 -2
  160. package/dist/Paragraph/Paragraph.d.ts +10 -5
  161. package/dist/Paragraph/Paragraph.js +1 -10
  162. package/dist/PasswordInput/PasswordInput.d.ts +4 -4
  163. package/dist/PasswordInput/PasswordInput.js +1 -5
  164. package/dist/PasswordInput/PasswordInput.test.js +1 -1
  165. package/dist/Radio/Radio.d.ts +15 -9
  166. package/dist/Radio/Radio.js +4 -8
  167. package/dist/Radio/Radio.test.js +9 -0
  168. package/dist/Row/Row.d.ts +5 -5
  169. package/dist/Row/Row.js +1 -5
  170. package/dist/Row/Row.test.js +1 -1
  171. package/dist/SearchField/SearchField.d.ts +3 -5
  172. package/dist/SearchField/SearchField.js +1 -5
  173. package/dist/SearchField/SearchFieldButton.js +0 -4
  174. package/dist/SearchField/SearchFieldInput.d.ts +2 -2
  175. package/dist/SearchField/SearchFieldInput.js +1 -5
  176. package/dist/Select/Select.d.ts +5 -5
  177. package/dist/Select/Select.js +1 -5
  178. package/dist/Select/SelectOption.js +1 -5
  179. package/dist/Select/SelectOptionGroup.js +1 -5
  180. package/dist/SkipLink/SkipLink.js +1 -5
  181. package/dist/Spotlight/Spotlight.d.ts +5 -5
  182. package/dist/Spotlight/Spotlight.js +1 -1
  183. package/dist/Spotlight/Spotlight.test.js +1 -1
  184. package/dist/StandaloneLink/StandaloneLink.d.ts +15 -8
  185. package/dist/StandaloneLink/StandaloneLink.js +4 -6
  186. package/dist/StandaloneLink/StandaloneLink.test.js +6 -4
  187. package/dist/Switch/Switch.js +1 -5
  188. package/dist/Table/Table.js +1 -5
  189. package/dist/Table/TableBody.js +1 -5
  190. package/dist/Table/TableCaption.d.ts +5 -0
  191. package/dist/Table/TableCaption.js +1 -10
  192. package/dist/Table/TableCell.js +1 -5
  193. package/dist/Table/TableFooter.js +1 -5
  194. package/dist/Table/TableHeader.js +1 -5
  195. package/dist/Table/TableHeaderCell.js +1 -5
  196. package/dist/Table/TableRow.js +1 -5
  197. package/dist/TableOfContents/TableOfContents.d.ts +9 -9
  198. package/dist/TableOfContents/TableOfContents.js +4 -7
  199. package/dist/TableOfContents/TableOfContentsLink.d.ts +4 -4
  200. package/dist/TableOfContents/TableOfContentsLink.js +0 -4
  201. package/dist/TableOfContents/TableOfContentsList.js +1 -5
  202. package/dist/TableOfContents/TableOfContentsList.test.js +1 -1
  203. package/dist/Tabs/Tabs.d.ts +11 -11
  204. package/dist/Tabs/Tabs.js +1 -5
  205. package/dist/Tabs/TabsButton.d.ts +5 -5
  206. package/dist/Tabs/TabsButton.js +1 -5
  207. package/dist/Tabs/TabsList.js +1 -5
  208. package/dist/Tabs/TabsPanel.d.ts +5 -5
  209. package/dist/Tabs/TabsPanel.js +1 -5
  210. package/dist/Tabs/index.d.ts +2 -2
  211. package/dist/TextArea/TextArea.d.ts +4 -4
  212. package/dist/TextArea/TextArea.js +1 -5
  213. package/dist/TextInput/TextInput.d.ts +4 -4
  214. package/dist/TextInput/TextInput.js +1 -5
  215. package/dist/TimeInput/TimeInput.d.ts +4 -4
  216. package/dist/TimeInput/TimeInput.js +1 -5
  217. package/dist/UnorderedList/UnorderedList.d.ts +5 -5
  218. package/dist/UnorderedList/UnorderedList.js +1 -5
  219. package/dist/UnorderedList/UnorderedList.test.js +1 -1
  220. package/dist/UnorderedList/UnorderedListItem.js +1 -5
  221. package/dist/common/formatFileType.d.ts +1 -1
  222. package/dist/common/formatFileType.js +10 -10
  223. package/dist/common/useKeyboardFocus.js +6 -6
  224. package/dist/common/useKeyboardFocus.test.js +2 -6
  225. package/dist/index.cjs.js +731 -619
  226. package/dist/index.cjs.js.map +1 -1
  227. package/dist/index.d.ts +394 -267
  228. package/dist/index.esm.js +633 -523
  229. package/dist/index.esm.js.map +1 -1
  230. package/dist/index.js +2 -0
  231. package/dist/tsconfig.tsbuildinfo +1 -1
  232. package/package.json +21 -21
@@ -8,8 +8,8 @@ export type AccordionProps = {
8
8
  /**
9
9
  * The hierarchical level of this Accordion’s Section Headings within the document.
10
10
  * There is no default value; determine the correct level for each instance.
11
- * Note: this intentionally does not change the font size.
12
- **/
11
+ * The value ‘1’ is deprecated.
12
+ */
13
13
  headingLevel: HeadingProps['level'];
14
14
  /** The HTML element to use for each Accordion Section. */
15
15
  sectionAs?: 'div' | 'section';
@@ -21,18 +21,18 @@ export declare const Accordion: import("react").ForwardRefExoticComponent<{
21
21
  /**
22
22
  * The hierarchical level of this Accordion’s Section Headings within the document.
23
23
  * There is no default value; determine the correct level for each instance.
24
- * Note: this intentionally does not change the font size.
25
- **/
24
+ * The value ‘1’ is deprecated.
25
+ */
26
26
  headingLevel: HeadingProps["level"];
27
27
  /** The HTML element to use for each Accordion Section. */
28
28
  sectionAs?: "div" | "section";
29
29
  } & HTMLAttributes<HTMLDivElement> & {
30
30
  children?: import("react").ReactNode | undefined;
31
31
  } & import("react").RefAttributes<HTMLDivElement>> & {
32
- Section: import("react").ForwardRefExoticComponent<{
32
+ Section: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
33
+ children?: import("react").ReactNode | undefined;
34
+ } & {
33
35
  expanded?: boolean;
34
36
  label: string;
35
- } & HTMLAttributes<HTMLElement> & {
36
- children?: import("react").ReactNode | undefined;
37
37
  } & import("react").RefAttributes<HTMLDivElement>>;
38
38
  };
@@ -1,13 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
- import clsx from 'clsx';
2
+ import { clsx } from 'clsx';
7
3
  import { forwardRef, useImperativeHandle, useRef } from 'react';
4
+ import { useKeyboardFocus } from '../common/useKeyboardFocus';
8
5
  import AccordionContext from './AccordionContext';
9
6
  import { AccordionSection } from './AccordionSection';
10
- import { useKeyboardFocus } from '../common/useKeyboardFocus';
11
7
  const AccordionRoot = forwardRef(({ children, className, headingLevel, sectionAs = 'section' }, ref) => {
12
8
  const innerRef = useRef(null);
13
9
  // use a passed ref if it's there, otherwise use innerRef
@@ -10,19 +10,19 @@ import { Accordion } from './Accordion';
10
10
  import '@testing-library/jest-dom';
11
11
  describe('Accordion', () => {
12
12
  it('renders an accordion', () => {
13
- const { container } = render(_jsx(Accordion, { headingLevel: 1 }));
13
+ const { container } = render(_jsx(Accordion, { headingLevel: 2 }));
14
14
  const accordion = container.querySelector('.ams-accordion');
15
15
  expect(accordion).toBeInTheDocument();
16
16
  expect(accordion).toBeVisible();
17
17
  });
18
18
  it('renders an extra class name', () => {
19
- const { container } = render(_jsx(Accordion, { className: "test", headingLevel: 1 }));
19
+ const { container } = render(_jsx(Accordion, { className: "test", headingLevel: 2 }));
20
20
  const accordion = container.querySelector('.ams-accordion');
21
21
  expect(accordion).toHaveClass('test');
22
22
  });
23
23
  it('sets focus on Accordion buttons when using arrow keys', async () => {
24
24
  const user = userEvent.setup();
25
- render(_jsxs(Accordion, { headingLevel: 1, children: [_jsx(Accordion.Section, { label: "one" }), _jsx(Accordion.Section, { label: "two" }), _jsx(Accordion.Section, { label: "three" })] }));
25
+ render(_jsxs(Accordion, { headingLevel: 2, children: [_jsx(Accordion.Section, { label: "one" }), _jsx(Accordion.Section, { label: "two" }), _jsx(Accordion.Section, { label: "three" })] }));
26
26
  const firstButton = screen.getByRole('button', { name: 'one' });
27
27
  const thirdButton = screen.getByRole('button', { name: 'three' });
28
28
  await user.click(firstButton);
@@ -37,7 +37,7 @@ describe('Accordion', () => {
37
37
  });
38
38
  it('supports ForwardRef in React', () => {
39
39
  const ref = createRef();
40
- const { container } = render(_jsx(Accordion, { headingLevel: 1, ref: ref }));
40
+ const { container } = render(_jsx(Accordion, { headingLevel: 2, ref: ref }));
41
41
  const accordion = container.querySelector('.ams-accordion');
42
42
  expect(ref.current).toBe(accordion);
43
43
  });
@@ -3,9 +3,8 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
  import type { AccordionProps } from './Accordion';
6
- import type { HeadingProps } from '../Heading/Heading';
7
6
  export type AccordionContextValue = {
8
- headingLevel: HeadingProps['level'] | null;
7
+ headingLevel: AccordionProps['headingLevel'];
9
8
  sectionAs?: AccordionProps['sectionAs'];
10
9
  };
11
10
  declare const AccordionContext: import("react").Context<AccordionContextValue>;
@@ -4,8 +4,9 @@
4
4
  */
5
5
  import { createContext } from 'react';
6
6
  const defaultValues = {
7
- headingLevel: null,
8
- sectionAs: 'section',
7
+ // Level 2 is set here, but it is never used.
8
+ // headingLevel is a required prop in Accordion, which always overwrites it.
9
+ headingLevel: 2,
9
10
  };
10
11
  const AccordionContext = createContext(defaultValues);
11
12
  export default AccordionContext;
@@ -3,17 +3,17 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
  import type { HTMLAttributes, PropsWithChildren } from 'react';
6
- export type AccordionSectionProps = {
6
+ export type AccordionSectionProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {
7
7
  /** Whether the content is displayed initially. */
8
8
  expanded?: boolean;
9
9
  /** The heading text. */
10
10
  label: string;
11
- } & PropsWithChildren<HTMLAttributes<HTMLElement>>;
12
- export declare const AccordionSection: import("react").ForwardRefExoticComponent<{
11
+ };
12
+ export declare const AccordionSection: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
13
+ children?: import("react").ReactNode | undefined;
14
+ } & {
13
15
  /** Whether the content is displayed initially. */
14
16
  expanded?: boolean;
15
17
  /** The heading text. */
16
18
  label: string;
17
- } & HTMLAttributes<HTMLElement> & {
18
- children?: import("react").ReactNode | undefined;
19
19
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,22 +1,19 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
2
  import { ChevronDownIcon } from '@amsterdam/design-system-react-icons';
7
- import clsx from 'clsx';
3
+ import { clsx } from 'clsx';
8
4
  import { forwardRef, useContext, useId, useState } from 'react';
9
- import AccordionContext from './AccordionContext';
10
- import { getHeadingTag } from '../Heading/getHeadingTag';
5
+ import { Heading } from '../Heading';
11
6
  import { Icon } from '../Icon/Icon';
7
+ import AccordionContext from './AccordionContext';
8
+ // The 'ams-accordion__header' class is @deprecated and will be removed in a future release.
12
9
  export const AccordionSection = forwardRef(({ children, className, expanded = false, label, ...restProps }, ref) => {
13
10
  const { headingLevel, sectionAs } = useContext(AccordionContext);
14
11
  const [isExpanded, setIsExpanded] = useState(expanded);
15
- const HeadingTag = getHeadingTag(headingLevel);
16
12
  const SectionTag = sectionAs || 'section';
17
13
  const id = useId();
14
+ const iconSize = `heading-${headingLevel}`;
18
15
  const buttonId = `button-${id}`;
19
16
  const panelId = `panel-${id}`;
20
- return (_jsxs("div", { className: clsx('ams-accordion__section', className), ref: ref, ...restProps, children: [_jsx(HeadingTag, { className: "ams-accordion__header", children: _jsxs("button", { "aria-controls": panelId, "aria-expanded": isExpanded, className: "ams-accordion__button", id: buttonId, onClick: () => setIsExpanded(!isExpanded), type: "button", children: [_jsx(Icon, { className: "ams-accordion__icon", size: "heading-4", svg: ChevronDownIcon }), label] }) }), _jsx(SectionTag, { "aria-labelledby": buttonId, className: clsx('ams-accordion__panel', { 'ams-accordion__panel--expanded': isExpanded }), id: panelId, children: children })] }));
17
+ return (_jsxs("div", { className: clsx('ams-accordion__section', className), ref: ref, ...restProps, children: [_jsx(Heading, { className: "ams-accordion__header", level: headingLevel, children: _jsxs("button", { "aria-controls": panelId, "aria-expanded": isExpanded, className: "ams-accordion__button", id: buttonId, onClick: () => setIsExpanded(!isExpanded), type: "button", children: [_jsx(Icon, { className: "ams-accordion__icon", size: iconSize, svg: ChevronDownIcon }), label] }) }), _jsx(SectionTag, { "aria-labelledby": buttonId, className: clsx('ams-accordion__panel', { 'ams-accordion__panel--expanded': isExpanded }), id: panelId, children: children })] }));
21
18
  });
22
19
  AccordionSection.displayName = 'Accordion.Section';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /**
3
3
  * @license EUPL-1.2+
4
4
  * Copyright Gemeente Amsterdam
@@ -25,7 +25,7 @@ describe('Accordion section', () => {
25
25
  name: testLabel,
26
26
  });
27
27
  const section = container.querySelector('.ams-accordion__panel');
28
- expect(heading).toHaveClass('ams-accordion__header');
28
+ expect(heading).toHaveClass('ams-heading ams-accordion__header');
29
29
  expect(button).toHaveClass('ams-accordion__button');
30
30
  expect(section).toBeInTheDocument();
31
31
  });
@@ -46,13 +46,13 @@ describe('Accordion section', () => {
46
46
  const sectionContent = getByText(testContent);
47
47
  expect(sectionContent).toHaveClass('ams-accordion__panel--expanded');
48
48
  });
49
- it('renders a section HTML tag by defaultt', () => {
50
- render(_jsx(Accordion, { headingLevel: 1, children: _jsx(Accordion.Section, { label: testLabel, children: testContent }) }));
49
+ it('renders a section HTML tag by default', () => {
50
+ render(_jsx(Accordion, { headingLevel: 2, children: _jsx(Accordion.Section, { label: testLabel, children: testContent }) }));
51
51
  const sectionQuery = screen.queryByRole('region');
52
52
  expect(sectionQuery).toBeInTheDocument();
53
53
  });
54
54
  it('does not render a section HTML tag when the sectionAs is "div"', () => {
55
- render(_jsx(Accordion, { headingLevel: 1, sectionAs: "div", children: _jsx(Accordion.Section, { label: testLabel, children: testContent }) }));
55
+ render(_jsx(Accordion, { headingLevel: 2, sectionAs: "div", children: _jsx(Accordion.Section, { label: testLabel, children: testContent }) }));
56
56
  const sectionQuery = screen.queryByRole('region');
57
57
  expect(sectionQuery).not.toBeInTheDocument();
58
58
  });
@@ -65,6 +65,19 @@ describe('Accordion section', () => {
65
65
  expect(heading).toBeInTheDocument();
66
66
  expect(heading).toBeVisible();
67
67
  });
68
+ it('renders the allowed levels correctly', () => {
69
+ render(_jsxs(_Fragment, { children: [_jsx(Accordion, { headingLevel: 2, children: _jsx(Accordion.Section, { label: "Level 2", children: testContent }) }), _jsx(Accordion, { headingLevel: 4, children: _jsx(Accordion.Section, { label: "Level 4", children: testContent }) })] }));
70
+ const headingLevel2 = screen.getByRole('heading', {
71
+ level: 2,
72
+ name: 'Level 2',
73
+ });
74
+ const headingLevel4 = screen.getByRole('heading', {
75
+ level: 4,
76
+ name: 'Level 4',
77
+ });
78
+ expect(headingLevel2).toBeInTheDocument();
79
+ expect(headingLevel4).toBeInTheDocument();
80
+ });
68
81
  it('renders an icon', () => {
69
82
  render(_jsx(Accordion.Section, { label: testLabel, children: testContent }));
70
83
  const button = screen.getByRole('button', {
@@ -1,9 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
- import clsx from 'clsx';
2
+ import { clsx } from 'clsx';
7
3
  import { forwardRef } from 'react';
8
4
  /**
9
5
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-layout-action-group--docs Action Group docs at Amsterdam Design System}
@@ -12,11 +12,17 @@ export type AlertProps = {
12
12
  closeButtonLabel?: string;
13
13
  /** The text for the Heading. */
14
14
  heading: string;
15
+ /**
16
+ * The id of the Heading element, which is used to label the Alert.
17
+ * Can be set to `null` to explicitly remove the label.
18
+ * Note: must be unique for the page.
19
+ */
20
+ headingId?: string | null;
15
21
  /**
16
22
  * The hierarchical level of the Alert’s Heading within the document.
17
23
  * There is no default value; determine the correct level for each instance.
18
- * Note: this intentionally does not change the font size.
19
- **/
24
+ * The size of the heading is fixed at level 3.
25
+ */
20
26
  headingLevel: HeadingProps['level'];
21
27
  /** A function to run when dismissing. */
22
28
  onClose?: () => void;
@@ -33,11 +39,17 @@ export declare const Alert: import("react").ForwardRefExoticComponent<{
33
39
  closeButtonLabel?: string;
34
40
  /** The text for the Heading. */
35
41
  heading: string;
42
+ /**
43
+ * The id of the Heading element, which is used to label the Alert.
44
+ * Can be set to `null` to explicitly remove the label.
45
+ * Note: must be unique for the page.
46
+ */
47
+ headingId?: string | null;
36
48
  /**
37
49
  * The hierarchical level of the Alert’s Heading within the document.
38
50
  * There is no default value; determine the correct level for each instance.
39
- * Note: this intentionally does not change the font size.
40
- **/
51
+ * The size of the heading is fixed at level 3.
52
+ */
41
53
  headingLevel: HeadingProps["level"];
42
54
  /** A function to run when dismissing. */
43
55
  onClose?: () => void;
@@ -1,10 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
2
  import { ErrorFillIcon, InfoFillIcon, SuccessFillIcon, WarningFillIcon } from '@amsterdam/design-system-react-icons';
7
- import clsx from 'clsx';
3
+ import { clsx } from 'clsx';
8
4
  import { forwardRef } from 'react';
9
5
  import { Heading } from '../Heading';
10
6
  import { Icon } from '../Icon';
@@ -18,8 +14,8 @@ const iconSvgBySeverity = {
18
14
  /**
19
15
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-feedback-alert--docs Alert docs at Amsterdam Design System}
20
16
  */
21
- export const Alert = forwardRef(({ children, className, closeable, closeButtonLabel = 'Sluiten', heading, headingLevel, onClose, severity, ...restProps }, ref) => {
17
+ export const Alert = forwardRef(({ children, className, closeable, closeButtonLabel = 'Sluiten', heading, headingId = 'ams-alert-heading', headingLevel, onClose, severity, ...restProps }, ref) => {
22
18
  const SeverityIcon = severity ? iconSvgBySeverity[severity] : InfoFillIcon;
23
- return (_jsxs("section", { ...restProps, className: clsx('ams-alert', severity && `ams-alert--${severity}`, className), ref: ref, children: [_jsx("div", { className: "ams-alert__severity-indicator", children: _jsx(Icon, { color: "inverse", size: "heading-4", svg: SeverityIcon }) }), _jsxs("div", { className: "ams-alert__content", children: [_jsxs(Row, { align: "between", alignVertical: "start", children: [_jsx(Heading, { level: headingLevel, size: "level-4", children: heading }), closeable && _jsx(IconButton, { label: closeButtonLabel, onClick: onClose, size: "heading-4" })] }), children] })] }));
19
+ return (_jsxs("section", { ...restProps, "aria-labelledby": headingId || undefined, className: clsx('ams-alert', severity && `ams-alert--${severity}`, className), ref: ref, children: [_jsx("div", { className: "ams-alert__severity-indicator", children: _jsx(Icon, { color: "inverse", size: "heading-3", svg: SeverityIcon }) }), _jsxs("div", { className: "ams-alert__content", children: [_jsxs(Row, { align: "between", alignVertical: "start", children: [_jsx(Heading, { id: headingId || undefined, level: headingLevel, size: "level-3", children: heading }), closeable && _jsx(IconButton, { label: closeButtonLabel, onClick: onClose, size: "heading-3" })] }), children] })] }));
24
20
  });
25
21
  Alert.displayName = 'Alert';
@@ -9,28 +9,28 @@ import { Alert } from './Alert';
9
9
  import '@testing-library/jest-dom';
10
10
  describe('Alert', () => {
11
11
  it('renders', () => {
12
- const { container } = render(_jsx(Alert, { heading: "Let op!", headingLevel: 2 }));
13
- const component = container.querySelector(':only-child');
12
+ render(_jsx(Alert, { heading: "Let op!", headingLevel: 2 }));
13
+ const component = screen.getByRole('region', { name: 'Let op!' });
14
14
  const icon = component?.querySelector('.ams-alert__severity-indicator > .ams-icon');
15
15
  expect(component).toBeInTheDocument();
16
16
  expect(component).toBeVisible();
17
17
  expect(icon).toBeInTheDocument();
18
- expect(icon).toBeVisible();
18
+ expect(icon).not.toBeVisible(); // The icon is hidden by default, and only shown when the CSS loads.
19
19
  });
20
20
  it('renders a design system BEM class name', () => {
21
- const { container } = render(_jsx(Alert, { heading: "Let op!", headingLevel: 2 }));
22
- const component = container.querySelector(':only-child');
21
+ render(_jsx(Alert, { heading: "Let op!", headingLevel: 2 }));
22
+ const component = screen.getByRole('region', { name: 'Let op!' });
23
23
  expect(component).toHaveClass('ams-alert');
24
24
  });
25
25
  it('renders an extra class name', () => {
26
- const { container } = render(_jsx(Alert, { className: "extra", heading: "Let op!", headingLevel: 2 }));
27
- const component = container.querySelector(':only-child');
26
+ render(_jsx(Alert, { className: "extra", heading: "Let op!", headingLevel: 2 }));
27
+ const component = screen.getByRole('region', { name: 'Let op!' });
28
28
  expect(component).toHaveClass('ams-alert extra');
29
29
  });
30
30
  it('supports ForwardRef in React', () => {
31
31
  const ref = createRef();
32
- const { container } = render(_jsx(Alert, { heading: "Let op!", headingLevel: 2, ref: ref }));
33
- const component = container.querySelector(':only-child');
32
+ render(_jsx(Alert, { heading: "Let op!", headingLevel: 2, ref: ref }));
33
+ const component = screen.getByRole('region', { name: 'Let op!' });
34
34
  expect(ref.current).toBe(component);
35
35
  });
36
36
  it('renders a heading', () => {
@@ -41,8 +41,8 @@ describe('Alert', () => {
41
41
  expect(heading).toBeInTheDocument();
42
42
  });
43
43
  it('renders the close button', () => {
44
- const { container } = render(_jsx(Alert, { closeable: true, heading: "Let op!", headingLevel: 2 }));
45
- const component = container.querySelector(':only-child');
44
+ render(_jsx(Alert, { closeable: true, heading: "Let op!", headingLevel: 2 }));
45
+ const component = screen.getByRole('region', { name: 'Let op!' });
46
46
  const closeButton = component?.querySelector('.ams-icon-button');
47
47
  expect(closeButton).toBeInTheDocument();
48
48
  expect(closeButton).toBeVisible();
@@ -54,10 +54,21 @@ describe('Alert', () => {
54
54
  });
55
55
  it('fires the onClose event when the close button is clicked', () => {
56
56
  const onClose = jest.fn();
57
- const { container } = render(_jsx(Alert, { closeable: true, heading: "Let op!", headingLevel: 2, onClose: onClose }));
58
- const component = container.querySelector(':only-child');
57
+ render(_jsx(Alert, { closeable: true, heading: "Let op!", headingLevel: 2, onClose: onClose }));
58
+ const component = screen.getByRole('region', { name: 'Let op!' });
59
59
  const closeButton = component?.querySelector('.ams-icon-button');
60
60
  fireEvent.click(closeButton);
61
61
  expect(onClose).toHaveBeenCalled();
62
62
  });
63
+ it('uses a custom headingId to label the Alert', () => {
64
+ render(_jsx(Alert, { heading: "Let op!", headingId: "custom-heading-id", headingLevel: 2 }));
65
+ const component = screen.getByRole('region', { name: 'Let op!' });
66
+ expect(component).toBeInTheDocument();
67
+ expect(component).toHaveAttribute('aria-labelledby', 'custom-heading-id');
68
+ });
69
+ it('does not label the Alert when headingId is set to null', () => {
70
+ const { container } = render(_jsx(Alert, { heading: "Let op!", headingId: null, headingLevel: 2 }));
71
+ const component = container.querySelector(':only-child');
72
+ expect(component).not.toHaveAttribute('aria-labelledby');
73
+ });
63
74
  });
@@ -1,10 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
2
  import { PersonFillIcon } from '@amsterdam/design-system-react-icons';
7
- import clsx from 'clsx';
3
+ import { clsx } from 'clsx';
8
4
  import { forwardRef } from 'react';
9
5
  import { Icon } from '../Icon';
10
6
  export const avatarColors = ['azure', 'green', 'lime', 'magenta', 'orange', 'yellow'];
@@ -34,7 +34,8 @@ describe('Avatar', () => {
34
34
  const component = screen.getByText('Gebruiker');
35
35
  const svg = container.querySelector('svg');
36
36
  expect(component).toBeVisible();
37
- expect(svg).toBeVisible();
37
+ expect(svg).toBeInTheDocument();
38
+ expect(svg).not.toBeVisible(); // The icon is hidden by default, and only shown when the CSS loads.
38
39
  });
39
40
  it('renders with a profile picture', () => {
40
41
  const { container } = render(_jsx(Avatar, { imageSrc: "image-source", label: "RS" }));
@@ -5,19 +5,19 @@
5
5
  import type { HTMLAttributes } from 'react';
6
6
  export declare const badgeColors: readonly ["azure", "lime", "magenta", "orange", "purple", "red", "yellow"];
7
7
  type BadgeColor = (typeof badgeColors)[number];
8
- export type BadgeProps = {
8
+ export type BadgeProps = HTMLAttributes<HTMLElement> & {
9
9
  /** The background colour. */
10
10
  color?: BadgeColor;
11
11
  /** The text content. */
12
12
  label: string | number;
13
- } & HTMLAttributes<HTMLElement>;
13
+ };
14
14
  /**
15
15
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-feedback-badge--docs Badge docs at Amsterdam Design System}
16
16
  */
17
- export declare const Badge: import("react").ForwardRefExoticComponent<{
17
+ export declare const Badge: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
18
18
  /** The background colour. */
19
19
  color?: BadgeColor;
20
20
  /** The text content. */
21
21
  label: string | number;
22
- } & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
22
+ } & import("react").RefAttributes<HTMLElement>>;
23
23
  export {};
@@ -1,9 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
- import clsx from 'clsx';
2
+ import { clsx } from 'clsx';
7
3
  import { forwardRef } from 'react';
8
4
  export const badgeColors = ['azure', 'lime', 'magenta', 'orange', 'purple', 'red', 'yellow'];
9
5
  /**
@@ -3,16 +3,16 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
  import type { BlockquoteHTMLAttributes, PropsWithChildren } from 'react';
6
- export type BlockquoteProps = {
6
+ export type BlockquoteProps = PropsWithChildren<BlockquoteHTMLAttributes<HTMLQuoteElement>> & {
7
7
  /** Changes the text colour for readability on a dark background. */
8
8
  color?: 'inverse';
9
- } & PropsWithChildren<BlockquoteHTMLAttributes<HTMLQuoteElement>>;
9
+ };
10
10
  /**
11
11
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-text-blockquote--docs Blockquote docs at Amsterdam Design System}
12
12
  */
13
- export declare const Blockquote: import("react").ForwardRefExoticComponent<{
13
+ export declare const Blockquote: import("react").ForwardRefExoticComponent<BlockquoteHTMLAttributes<HTMLQuoteElement> & {
14
+ children?: import("react").ReactNode | undefined;
15
+ } & {
14
16
  /** Changes the text colour for readability on a dark background. */
15
17
  color?: "inverse";
16
- } & BlockquoteHTMLAttributes<HTMLQuoteElement> & {
17
- children?: import("react").ReactNode | undefined;
18
18
  } & import("react").RefAttributes<HTMLQuoteElement>>;
@@ -1,9 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
- import clsx from 'clsx';
2
+ import { clsx } from 'clsx';
7
3
  import { forwardRef } from 'react';
8
4
  /**
9
5
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-text-blockquote--docs Blockquote docs at Amsterdam Design System}
@@ -1,8 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
2
  import { clsx } from 'clsx';
7
3
  import { forwardRef } from 'react';
8
4
  import { BreadcrumbLink } from './BreadcrumbLink';
@@ -30,7 +30,7 @@ describe('Breadcrumb', () => {
30
30
  { href: '/link-2', label: 'Link 2' },
31
31
  { href: '/link-3', label: 'Link 3' },
32
32
  ];
33
- const { container } = render(_jsx(Breadcrumb, { children: breadcrumbLinks.map((link, index) => (_jsx(Breadcrumb.Link, { href: link.href, children: link.label }, index))) }));
33
+ const { container } = render(_jsx(Breadcrumb, { children: breadcrumbLinks.map((link) => (_jsx(Breadcrumb.Link, { href: link.href, children: link.label }, link.label))) }));
34
34
  const breadcrumb = screen.getByRole('navigation');
35
35
  const breadcrumbs = container.querySelectorAll('.ams-breadcrumb__item');
36
36
  expect(breadcrumb).toBeInTheDocument();
@@ -1,8 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
2
  import { clsx } from 'clsx';
7
3
  import { forwardRef } from 'react';
8
4
  export const BreadcrumbLink = forwardRef(({ children, className, ...restProps }, ref) => (_jsx("li", { className: "ams-breadcrumb__item", children: _jsx("a", { ...restProps, className: clsx('ams-breadcrumb__link', className), ref: ref, children: children }) })));
@@ -1,12 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
- import clsx from 'clsx';
2
+ import { clsx } from 'clsx';
7
3
  import { forwardRef } from 'react';
8
- import { BreakoutCell } from './BreakoutCell';
9
4
  import { paddingClasses } from '../Grid/paddingClasses';
5
+ import { BreakoutCell } from './BreakoutCell';
10
6
  const BreakoutRoot = forwardRef(({ children, className, gapVertical, paddingBottom, paddingTop, paddingVertical, ...restProps }, ref) => (_jsx("div", { ...restProps, className: clsx('ams-breakout', gapVertical && `ams-breakout--gap-vertical--${gapVertical}`, paddingClasses('breakout', paddingBottom, paddingTop, paddingVertical), className), ref: ref, children: children })));
11
7
  BreakoutRoot.displayName = 'Breakout';
12
8
  /**
@@ -5,8 +5,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  */
6
6
  import { render } from '@testing-library/react';
7
7
  import { createRef } from 'react';
8
- import { Breakout } from './Breakout';
9
8
  import { gridGaps, gridPaddings } from '../Grid/Grid';
9
+ import { Breakout } from './Breakout';
10
10
  import '@testing-library/jest-dom';
11
11
  describe('Breakout', () => {
12
12
  it('renders', () => {
@@ -3,8 +3,8 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
  import type { HTMLAttributes, PropsWithChildren } from 'react';
6
- import type { BreakoutRowNumber, BreakoutRowNumbers } from './Breakout';
7
6
  import type { GridColumnNumber, GridColumnNumbers } from '../Grid/Grid';
7
+ import type { BreakoutRowNumber, BreakoutRowNumbers } from './Breakout';
8
8
  export declare const breakoutCellTags: readonly ["article", "div", "section"];
9
9
  type BreakoutCellTag = (typeof breakoutCellTags)[number];
10
10
  type BreakoutCellSpanAllProp = {
@@ -29,9 +29,9 @@ type BreakoutCellRowSpanAndStartProps = {
29
29
  /** The index of the grid row the cell starts at. */
30
30
  rowStart?: BreakoutRowNumber | BreakoutRowNumbers;
31
31
  };
32
- export type BreakoutCellProps = {
32
+ export type BreakoutCellProps = BreakoutCellRowSpanAndStartProps & (BreakoutCellSpanAllProp | BreakoutCellSpanAndStartProps) & PropsWithChildren<HTMLAttributes<HTMLElement>> & {
33
33
  /** The HTML element to use. */
34
34
  as?: BreakoutCellTag;
35
- } & (BreakoutCellSpanAllProp | BreakoutCellSpanAndStartProps) & BreakoutCellRowSpanAndStartProps & PropsWithChildren<HTMLAttributes<HTMLElement>>;
35
+ };
36
36
  export declare const BreakoutCell: import("react").ForwardRefExoticComponent<BreakoutCellProps & import("react").RefAttributes<any>>;
37
37
  export {};
@@ -1,9 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
- import clsx from 'clsx';
2
+ import { clsx } from 'clsx';
7
3
  import { forwardRef } from 'react';
8
4
  import { breakoutCellClasses } from './breakoutCellClasses';
9
5
  export const breakoutCellTags = ['article', 'div', 'section'];
@@ -5,10 +5,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  */
6
6
  import { render, screen } from '@testing-library/react';
7
7
  import { createRef } from 'react';
8
- import { Breakout } from './Breakout';
8
+ import { ariaRoleForTag } from '../common/accessibility';
9
9
  import '@testing-library/jest-dom';
10
+ import { Breakout } from './Breakout';
10
11
  import { breakoutCellTags } from './BreakoutCell';
11
- import { ariaRoleForTag } from '../common/accessibility';
12
12
  describe('Breakout cell', () => {
13
13
  it('renders', () => {
14
14
  const { container } = render(_jsx(Breakout.Cell, {}));
@@ -14,19 +14,19 @@ type IconOnlyProp = {
14
14
  /** Shows the icon without the label. Requires a value for `icon`. Cannot be used together with `iconBefore`. */
15
15
  iconOnly?: boolean;
16
16
  };
17
- type IconButtonProps = {
17
+ type IconButtonProps = (IconBeforeProp | IconOnlyProp) & {
18
18
  /** Adds an icon to the button, showing it after the label. */
19
19
  icon: IconProps['svg'];
20
- } & (IconBeforeProp | IconOnlyProp);
20
+ };
21
21
  type TextButtonProps = {
22
22
  icon?: never;
23
23
  iconBefore?: never;
24
24
  iconOnly?: never;
25
25
  };
26
- export type ButtonProps = {
26
+ export type ButtonProps = (IconButtonProps | TextButtonProps) & PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>> & {
27
27
  /** The level of prominence. Use a primary button only once per page or section. */
28
28
  variant?: 'primary' | 'secondary' | 'tertiary';
29
- } & (IconButtonProps | TextButtonProps) & PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>;
29
+ };
30
30
  /**
31
31
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-buttons-button--docs Button docs at Amsterdam Design System}
32
32
  */
@@ -1,9 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * @license EUPL-1.2+
4
- * Copyright Gemeente Amsterdam
5
- */
6
- import clsx from 'clsx';
2
+ import { clsx } from 'clsx';
7
3
  import { forwardRef } from 'react';
8
4
  import { Icon } from '../Icon';
9
5
  /**
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ import type { AnchorHTMLAttributes, PropsWithChildren } from 'react';
6
+ export type CallToActionLinkProps = PropsWithChildren<AnchorHTMLAttributes<HTMLAnchorElement>>;
7
+ /**
8
+ * @see {@link https://designsystem.amsterdam/?path=/docs/components-navigation-call-to-action-link--docs CallToActionLink docs at Amsterdam Design System}
9
+ */
10
+ export declare const CallToActionLink: import("react").ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & {
11
+ children?: import("react").ReactNode | undefined;
12
+ } & import("react").RefAttributes<HTMLAnchorElement>>;