@amsterdam/design-system-react 2.0.2 → 2.1.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 (110) hide show
  1. package/dist/Accordion/Accordion.d.ts +3 -3
  2. package/dist/Accordion/AccordionSection.d.ts +5 -5
  3. package/dist/App/App.d.ts +12 -0
  4. package/dist/App/App.js +8 -0
  5. package/dist/App/App.test.d.ts +5 -0
  6. package/dist/App/App.test.js +33 -0
  7. package/dist/App/index.d.ts +6 -0
  8. package/dist/App/index.js +5 -0
  9. package/dist/AppNavigation/AppNavigation.d.ts +45 -0
  10. package/dist/AppNavigation/AppNavigation.js +18 -0
  11. package/dist/AppNavigation/AppNavigation.test.d.ts +5 -0
  12. package/dist/AppNavigation/AppNavigation.test.js +33 -0
  13. package/dist/AppNavigation/AppNavigationButton.d.ts +18 -0
  14. package/dist/AppNavigation/AppNavigationButton.js +17 -0
  15. package/dist/AppNavigation/AppNavigationLink.d.ts +19 -0
  16. package/dist/AppNavigation/AppNavigationLink.js +19 -0
  17. package/dist/AppNavigation/AppNavigationMenu.d.ts +9 -0
  18. package/dist/AppNavigation/AppNavigationMenu.js +5 -0
  19. package/dist/AppNavigation/index.d.ts +6 -0
  20. package/dist/AppNavigation/index.js +5 -0
  21. package/dist/Badge/Badge.d.ts +4 -4
  22. package/dist/Blockquote/Blockquote.d.ts +5 -5
  23. package/dist/Breakout/BreakoutCell.d.ts +2 -2
  24. package/dist/Button/Button.d.ts +7 -5
  25. package/dist/Button/Button.js +1 -0
  26. package/dist/Card/Card.d.ts +9 -9
  27. package/dist/Card/CardHeading.d.ts +4 -4
  28. package/dist/Card/CardHeadingGroup.d.ts +5 -5
  29. package/dist/Card/CardImage.d.ts +2 -2
  30. package/dist/Checkbox/Checkbox.d.ts +5 -5
  31. package/dist/Column/Column.d.ts +5 -5
  32. package/dist/DateInput/DateInput.d.ts +4 -4
  33. package/dist/DescriptionList/DescriptionList.d.ts +5 -5
  34. package/dist/Dialog/Dialog.d.ts +6 -7
  35. package/dist/Field/Field.d.ts +5 -5
  36. package/dist/FieldSet/FieldSet.d.ts +20 -10
  37. package/dist/FieldSet/FieldSet.js +4 -3
  38. package/dist/FieldSet/FieldSet.test.js +7 -0
  39. package/dist/Figure/Figure.d.ts +3 -3
  40. package/dist/Figure/FigureCaption.d.ts +5 -5
  41. package/dist/FileList/FileList.d.ts +2 -2
  42. package/dist/FileList/FileListItem.d.ts +4 -4
  43. package/dist/Grid/Grid.d.ts +2 -2
  44. package/dist/Grid/GridCell.d.ts +2 -2
  45. package/dist/Heading/Heading.d.ts +10 -11
  46. package/dist/Heading/Heading.js +1 -0
  47. package/dist/Icon/Icon.d.ts +0 -4
  48. package/dist/IconButton/IconButton.d.ts +4 -2
  49. package/dist/IconButton/IconButton.js +1 -0
  50. package/dist/Image/Image.d.ts +5 -5
  51. package/dist/ImageSlider/ImageSlider.d.ts +4 -4
  52. package/dist/ImageSlider/ImageSliderItem.d.ts +5 -5
  53. package/dist/ImageSlider/ImageSliderThumbnails.d.ts +5 -5
  54. package/dist/InvalidFormAlert/InvalidFormAlertWithErrors.d.ts +2 -2
  55. package/dist/Label/Label.d.ts +14 -6
  56. package/dist/Label/Label.js +3 -2
  57. package/dist/Label/Label.test.js +5 -0
  58. package/dist/Link/Link.d.ts +4 -4
  59. package/dist/LinkList/LinkListLink.d.ts +9 -4
  60. package/dist/LinkList/LinkListLink.js +2 -0
  61. package/dist/Logo/Logo.d.ts +2 -2
  62. package/dist/Menu/Menu.d.ts +31 -10
  63. package/dist/Menu/Menu.js +6 -1
  64. package/dist/Menu/Menu.test.js +28 -11
  65. package/dist/Menu/MenuLink.d.ts +8 -2
  66. package/dist/Menu/MenuLink.test.js +1 -1
  67. package/dist/OrderedList/OrderedList.d.ts +5 -5
  68. package/dist/PageHeader/PageHeader.d.ts +7 -7
  69. package/dist/PageHeader/PageHeader.test.js +0 -4
  70. package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.d.ts +1 -1
  71. package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.js +0 -4
  72. package/dist/PageHeader/PageHeaderMenuLink.d.ts +6 -6
  73. package/dist/PageHeader/PageHeaderMenuLink.js +0 -4
  74. package/dist/PageHeading/PageHeading.d.ts +5 -5
  75. package/dist/Pagination/LinkItem.d.ts +3 -3
  76. package/dist/Pagination/Pagination.d.ts +4 -4
  77. package/dist/Paragraph/Paragraph.d.ts +5 -9
  78. package/dist/PasswordInput/PasswordInput.d.ts +4 -4
  79. package/dist/Radio/Radio.d.ts +5 -5
  80. package/dist/Row/Row.d.ts +5 -5
  81. package/dist/SearchField/SearchField.d.ts +3 -3
  82. package/dist/SearchField/SearchField.test.js +2 -19
  83. package/dist/SearchField/SearchFieldButton.js +1 -1
  84. package/dist/SearchField/SearchFieldButton.test.d.ts +5 -0
  85. package/dist/SearchField/SearchFieldButton.test.js +47 -0
  86. package/dist/SearchField/SearchFieldInput.d.ts +2 -2
  87. package/dist/Select/Select.d.ts +5 -5
  88. package/dist/Spotlight/Spotlight.d.ts +6 -6
  89. package/dist/Spotlight/Spotlight.js +0 -4
  90. package/dist/StandaloneLink/StandaloneLink.d.ts +4 -4
  91. package/dist/Table/TableCaption.d.ts +0 -4
  92. package/dist/TableOfContents/TableOfContents.d.ts +7 -7
  93. package/dist/TableOfContents/TableOfContentsLink.d.ts +4 -4
  94. package/dist/Tabs/Tabs.d.ts +11 -11
  95. package/dist/Tabs/TabsButton.d.ts +5 -5
  96. package/dist/Tabs/TabsPanel.d.ts +5 -5
  97. package/dist/TextArea/TextArea.d.ts +12 -6
  98. package/dist/TextInput/TextInput.d.ts +4 -4
  99. package/dist/TimeInput/TimeInput.d.ts +4 -4
  100. package/dist/UnorderedList/UnorderedList.d.ts +5 -5
  101. package/dist/common/useIsAfterBreakpoint.d.ts +4 -0
  102. package/dist/common/useIsAfterBreakpoint.js +4 -4
  103. package/dist/index.cjs.js +35 -18
  104. package/dist/index.cjs.js.map +1 -1
  105. package/dist/index.d.ts +61 -1860
  106. package/dist/index.esm.js +35 -18
  107. package/dist/index.esm.js.map +1 -1
  108. package/dist/tsconfig.build.tsbuildinfo +1 -0
  109. package/dist/tsconfig.tsbuildinfo +1 -1
  110. package/package.json +20 -19
@@ -29,10 +29,10 @@ export declare const Accordion: import("react").ForwardRefExoticComponent<{
29
29
  } & HTMLAttributes<HTMLDivElement> & {
30
30
  children?: import("react").ReactNode | undefined;
31
31
  } & import("react").RefAttributes<HTMLDivElement>> & {
32
- Section: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
33
- children?: import("react").ReactNode | undefined;
34
- } & {
32
+ Section: import("react").ForwardRefExoticComponent<{
35
33
  expanded?: boolean;
36
34
  label: string;
35
+ } & HTMLAttributes<HTMLElement> & {
36
+ children?: import("react").ReactNode | undefined;
37
37
  } & import("react").RefAttributes<HTMLDivElement>>;
38
38
  };
@@ -3,17 +3,17 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
  import type { HTMLAttributes, PropsWithChildren } from 'react';
6
- export type AccordionSectionProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {
6
+ export type AccordionSectionProps = {
7
7
  /** Whether the content is displayed initially. */
8
8
  expanded?: boolean;
9
9
  /** The heading text. */
10
10
  label: string;
11
- };
12
- export declare const AccordionSection: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
13
- children?: import("react").ReactNode | undefined;
14
- } & {
11
+ } & PropsWithChildren<HTMLAttributes<HTMLElement>>;
12
+ export declare const AccordionSection: import("react").ForwardRefExoticComponent<{
15
13
  /** Whether the content is displayed initially. */
16
14
  expanded?: boolean;
17
15
  /** The heading text. */
18
16
  label: string;
17
+ } & HTMLAttributes<HTMLElement> & {
18
+ children?: import("react").ReactNode | undefined;
19
19
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ import type { HTMLAttributes, PropsWithChildren } from 'react';
6
+ export type AppProps = PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
7
+ /**
8
+ * @see {@link https://designsystem.amsterdam/?path=/docs/components-TODO-ADD-GROUP-app--docs App docs at Amsterdam Design System}
9
+ */
10
+ export declare const App: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
11
+ children?: import("react").ReactNode | undefined;
12
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { clsx } from 'clsx';
3
+ import { forwardRef } from 'react';
4
+ /**
5
+ * @see {@link https://designsystem.amsterdam/?path=/docs/components-TODO-ADD-GROUP-app--docs App docs at Amsterdam Design System}
6
+ */
7
+ export const App = forwardRef(({ children, className, ...restProps }, ref) => (_jsx("div", { ...restProps, className: clsx('ams-app', className), ref: ref, children: children })));
8
+ App.displayName = 'App';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ import '@testing-library/jest-dom';
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * @license EUPL-1.2+
4
+ * Copyright Gemeente Amsterdam
5
+ */
6
+ import { render } from '@testing-library/react';
7
+ import { createRef } from 'react';
8
+ import { App } from './App';
9
+ import '@testing-library/jest-dom';
10
+ describe('App', () => {
11
+ it('renders', () => {
12
+ const { container } = render(_jsx(App, {}));
13
+ const component = container.querySelector(':only-child');
14
+ expect(component).toBeInTheDocument();
15
+ expect(component).toBeVisible();
16
+ });
17
+ it('renders a design system BEM class name', () => {
18
+ const { container } = render(_jsx(App, {}));
19
+ const component = container.querySelector(':only-child');
20
+ expect(component).toHaveClass('ams-app');
21
+ });
22
+ it('renders an extra class name', () => {
23
+ const { container } = render(_jsx(App, { className: "extra" }));
24
+ const component = container.querySelector(':only-child');
25
+ expect(component).toHaveClass('ams-app extra');
26
+ });
27
+ it('supports ForwardRef in React', () => {
28
+ const ref = createRef();
29
+ const { container } = render(_jsx(App, { ref: ref }));
30
+ const component = container.querySelector(':only-child');
31
+ expect(ref.current).toBe(component);
32
+ });
33
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ export { App } from './App';
6
+ export type { AppProps } from './App';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ export { App } from './App';
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ import type { HTMLAttributes, PropsWithChildren } from 'react';
6
+ export type AppNavigationProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {
7
+ expandable?: boolean;
8
+ expanded?: boolean;
9
+ onToggle?: () => void;
10
+ };
11
+ /**
12
+ * @see {@link https://designsystem.amsterdam/?path=/docs/components-TODO-ADD-GROUP-app-navigation--docs AppNavigation docs at Amsterdam Design System}
13
+ */
14
+ export declare const AppNavigationRoot: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
15
+ children?: import("react").ReactNode | undefined;
16
+ } & {
17
+ expandable?: boolean;
18
+ expanded?: boolean;
19
+ onToggle?: () => void;
20
+ } & import("react").RefAttributes<HTMLElement>>;
21
+ export declare const AppNavigation: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
22
+ children?: import("react").ReactNode | undefined;
23
+ } & {
24
+ expandable?: boolean;
25
+ expanded?: boolean;
26
+ onToggle?: () => void;
27
+ } & import("react").RefAttributes<HTMLElement>> & {
28
+ Button: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLButtonElement> & {
29
+ children?: import("react").ReactNode | undefined;
30
+ } & {
31
+ active?: boolean;
32
+ icon?: import("..").IconProps["svg"];
33
+ label: string;
34
+ } & import("react").RefAttributes<HTMLButtonElement>>;
35
+ Link: import("react").ForwardRefExoticComponent<import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
36
+ children?: import("react").ReactNode | undefined;
37
+ } & {
38
+ active?: boolean;
39
+ icon?: import("..").IconProps["svg"];
40
+ label: string;
41
+ } & import("react").RefAttributes<HTMLAnchorElement>>;
42
+ Menu: import("react").ForwardRefExoticComponent<import("react").OlHTMLAttributes<HTMLOListElement> & {
43
+ children?: import("react").ReactNode | undefined;
44
+ } & import("react").RefAttributes<HTMLOListElement>>;
45
+ };
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronForwardIcon } from '@amsterdam/design-system-react-icons';
3
+ import { clsx } from 'clsx';
4
+ import { forwardRef } from 'react';
5
+ import { IconButton } from '../IconButton';
6
+ import { AppNavigationMenuButton } from './AppNavigationButton';
7
+ import { AppNavigationMenuLink } from './AppNavigationLink';
8
+ import { AppNavigationMenu } from './AppNavigationMenu';
9
+ /**
10
+ * @see {@link https://designsystem.amsterdam/?path=/docs/components-TODO-ADD-GROUP-app-navigation--docs AppNavigation docs at Amsterdam Design System}
11
+ */
12
+ export const AppNavigationRoot = forwardRef(({ children, className, expandable, expanded, onToggle, ...restProps }, ref) => (_jsxs("nav", { ...restProps, className: clsx('ams-app-navigation', expanded && 'ams-app-navigation--expanded', className), ref: ref, children: [expandable && (_jsx(IconButton, { className: "ams-app-navigation__toggle", color: "inverse", label: "Toggle navigation", onClick: onToggle, size: "large", svg: ChevronForwardIcon })), _jsx("ol", { className: "ams-app-navigation__menu", children: children })] })));
13
+ AppNavigationRoot.displayName = 'AppNavigation';
14
+ export const AppNavigation = Object.assign(AppNavigationRoot, {
15
+ Button: AppNavigationMenuButton,
16
+ Link: AppNavigationMenuLink,
17
+ Menu: AppNavigationMenu,
18
+ });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ import '@testing-library/jest-dom';
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * @license EUPL-1.2+
4
+ * Copyright Gemeente Amsterdam
5
+ */
6
+ import { render } from '@testing-library/react';
7
+ import { createRef } from 'react';
8
+ import { AppNavigation } from './AppNavigation';
9
+ import '@testing-library/jest-dom';
10
+ describe('AppNavigation', () => {
11
+ it('renders', () => {
12
+ const { container } = render(_jsx(AppNavigation, {}));
13
+ const component = container.querySelector(':only-child');
14
+ expect(component).toBeInTheDocument();
15
+ expect(component).toBeVisible();
16
+ });
17
+ it('renders a design system BEM class name', () => {
18
+ const { container } = render(_jsx(AppNavigation, {}));
19
+ const component = container.querySelector(':only-child');
20
+ expect(component).toHaveClass('ams-app-navigation');
21
+ });
22
+ it('renders an extra class name', () => {
23
+ const { container } = render(_jsx(AppNavigation, { className: "extra" }));
24
+ const component = container.querySelector(':only-child');
25
+ expect(component).toHaveClass('ams-app-navigation extra');
26
+ });
27
+ it('supports ForwardRef in React', () => {
28
+ const ref = createRef();
29
+ const { container } = render(_jsx(AppNavigation, { ref: ref }));
30
+ const component = container.querySelector(':only-child');
31
+ expect(ref.current).toBe(component);
32
+ });
33
+ });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ import type { HTMLAttributes, PropsWithChildren } from 'react';
6
+ import type { IconProps } from '../Icon';
7
+ export type AppNavigationMenuButtonProps = PropsWithChildren<HTMLAttributes<HTMLButtonElement>> & {
8
+ active?: boolean;
9
+ icon?: IconProps['svg'];
10
+ label: string;
11
+ };
12
+ export declare const AppNavigationMenuButton: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLButtonElement> & {
13
+ children?: import("react").ReactNode | undefined;
14
+ } & {
15
+ active?: boolean;
16
+ icon?: IconProps["svg"];
17
+ label: string;
18
+ } & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronDownIcon } from '@amsterdam/design-system-react-icons';
3
+ import { clsx } from 'clsx';
4
+ import { Children, isValidElement } from 'react';
5
+ import { forwardRef } from 'react';
6
+ import { Icon } from '../Icon';
7
+ export const AppNavigationMenuButton = forwardRef(({ active, children, className, icon, label, ...restProps }, ref) => {
8
+ // const [submenuOpen, setSubmenuOpen] = useState(false)
9
+ // Check if children contain an element with type 'AppNavigation.Menu'
10
+ const hasSubMenu = Children.toArray(children).some((child) => isValidElement(child) && child.type?.displayName === 'AppNavigation.Menu');
11
+ return (_jsxs("li", { className: clsx('ams-app-navigation__menu-item'), children: [_jsxs("button", { ...restProps,
12
+ // aria-expanded={hasSubMenu ? submenuOpen : undefined}
13
+ className: clsx('ams-app-navigation__menu-link', active && 'ams-app-navigation__menu-link--active', className),
14
+ // onClick={handleClick}
15
+ ref: ref, children: [icon && _jsx(Icon, { size: "large", svg: icon }), _jsx("span", { className: "ams-app-navigation__menu-link-label", children: label }), hasSubMenu && _jsx(Icon, { className: "ams-app-navigation__menu-link-chevron", size: "small", svg: ChevronDownIcon })] }), children] }));
16
+ });
17
+ AppNavigationMenuButton.displayName = 'AppNavigation.MenuButton';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ import type { AnchorHTMLAttributes, PropsWithChildren } from 'react';
6
+ import React from 'react';
7
+ import type { IconProps } from '../Icon';
8
+ export type AppNavigationMenuLinkProps = PropsWithChildren<AnchorHTMLAttributes<HTMLAnchorElement>> & {
9
+ active?: boolean;
10
+ icon?: IconProps['svg'];
11
+ label: string;
12
+ };
13
+ export declare const AppNavigationMenuLink: React.ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & {
14
+ children?: React.ReactNode | undefined;
15
+ } & {
16
+ active?: boolean;
17
+ icon?: IconProps["svg"];
18
+ label: string;
19
+ } & React.RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronDownIcon } from '@amsterdam/design-system-react-icons';
3
+ import { clsx } from 'clsx';
4
+ import { Children, isValidElement, useState } from 'react';
5
+ import { forwardRef } from 'react';
6
+ import { Icon } from '../Icon';
7
+ export const AppNavigationMenuLink = forwardRef(({ active, children, className, icon, label, ...restProps }, ref) => {
8
+ const [submenuOpen, setSubmenuOpen] = useState(false);
9
+ // Check if children contain an element with type 'AppNavigation.Menu'
10
+ const hasSubMenu = Children.toArray(children).some((child) => isValidElement(child) && child.type?.displayName === 'AppNavigation.Menu');
11
+ const handleClick = (e) => {
12
+ if (hasSubMenu) {
13
+ e.preventDefault();
14
+ setSubmenuOpen((open) => !open);
15
+ }
16
+ };
17
+ return (_jsxs("li", { className: clsx('ams-app-navigation__menu-item', submenuOpen && 'ams-app-navigation__menu-item--open'), children: [_jsxs("a", { ...restProps, "aria-expanded": hasSubMenu ? submenuOpen : undefined, className: clsx('ams-app-navigation__menu-link', active && 'ams-app-navigation__menu-link--active', className), onClick: handleClick, ref: ref, children: [icon && _jsx(Icon, { size: "large", svg: icon }), _jsx("span", { className: "ams-app-navigation__menu-link-label", children: label }), hasSubMenu && _jsx(Icon, { className: "ams-app-navigation__menu-link-chevron", size: "small", svg: ChevronDownIcon })] }), children] }));
18
+ });
19
+ AppNavigationMenuLink.displayName = 'AppNavigation.MenuLink';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ import type { OlHTMLAttributes, PropsWithChildren } from 'react';
6
+ export type AppNavigationMenuProps = PropsWithChildren<OlHTMLAttributes<HTMLOListElement>>;
7
+ export declare const AppNavigationMenu: import("react").ForwardRefExoticComponent<OlHTMLAttributes<HTMLOListElement> & {
8
+ children?: import("react").ReactNode | undefined;
9
+ } & import("react").RefAttributes<HTMLOListElement>>;
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { clsx } from 'clsx';
3
+ import { forwardRef } from 'react';
4
+ export const AppNavigationMenu = forwardRef(({ children, className, ...restProps }, ref) => (_jsx("ol", { className: clsx('ams-app-navigation__menu', className), ref: ref, ...restProps, children: children })));
5
+ AppNavigationMenu.displayName = 'AppNavigation.Menu';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ export { AppNavigation } from './AppNavigation';
6
+ export type { AppNavigationProps } from './AppNavigation';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+ export { AppNavigation } from './AppNavigation';
@@ -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 = HTMLAttributes<HTMLElement> & {
8
+ export type BadgeProps = {
9
9
  /** The background colour. */
10
10
  color?: BadgeColor;
11
11
  /** The text content. */
12
12
  label: string | number;
13
- };
13
+ } & HTMLAttributes<HTMLElement>;
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<HTMLAttributes<HTMLElement> & {
17
+ export declare const Badge: import("react").ForwardRefExoticComponent<{
18
18
  /** The background colour. */
19
19
  color?: BadgeColor;
20
20
  /** The text content. */
21
21
  label: string | number;
22
- } & import("react").RefAttributes<HTMLElement>>;
22
+ } & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
23
23
  export {};
@@ -3,16 +3,16 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
  import type { BlockquoteHTMLAttributes, PropsWithChildren } from 'react';
6
- export type BlockquoteProps = PropsWithChildren<BlockquoteHTMLAttributes<HTMLQuoteElement>> & {
6
+ export type BlockquoteProps = {
7
7
  /** Changes the text colour for readability on a dark background. */
8
8
  color?: 'inverse';
9
- };
9
+ } & PropsWithChildren<BlockquoteHTMLAttributes<HTMLQuoteElement>>;
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<BlockquoteHTMLAttributes<HTMLQuoteElement> & {
14
- children?: import("react").ReactNode | undefined;
15
- } & {
13
+ export declare const Blockquote: import("react").ForwardRefExoticComponent<{
16
14
  /** Changes the text colour for readability on a dark background. */
17
15
  color?: "inverse";
16
+ } & BlockquoteHTMLAttributes<HTMLQuoteElement> & {
17
+ children?: import("react").ReactNode | undefined;
18
18
  } & import("react").RefAttributes<HTMLQuoteElement>>;
@@ -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 = BreakoutCellRowSpanAndStartProps & (BreakoutCellSpanAllProp | BreakoutCellSpanAndStartProps) & PropsWithChildren<HTMLAttributes<HTMLElement>> & {
32
+ export type BreakoutCellProps = {
33
33
  /** The HTML element to use. */
34
34
  as?: BreakoutCellTag;
35
- };
35
+ } & BreakoutCellRowSpanAndStartProps & PropsWithChildren<HTMLAttributes<HTMLElement>> & (BreakoutCellSpanAllProp | BreakoutCellSpanAndStartProps);
36
36
  export declare const BreakoutCell: import("react").ForwardRefExoticComponent<BreakoutCellProps & import("react").RefAttributes<any>>;
37
37
  export {};
@@ -14,19 +14,21 @@ 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 = (IconBeforeProp | IconOnlyProp) & {
17
+ type IconButtonProps = {
18
18
  /** Adds an icon to the button, showing it after the label. */
19
19
  icon: IconProps['svg'];
20
- };
20
+ } & (IconBeforeProp | IconOnlyProp);
21
21
  type TextButtonProps = {
22
22
  icon?: never;
23
23
  iconBefore?: never;
24
24
  iconOnly?: never;
25
25
  };
26
- export type ButtonProps = (IconButtonProps | TextButtonProps) & PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>> & {
26
+ export declare const buttonVariants: readonly ["primary", "secondary", "tertiary"];
27
+ type ButtonVariant = (typeof buttonVariants)[number];
28
+ export type ButtonProps = {
27
29
  /** The level of prominence. Use a primary button only once per page or section. */
28
- variant?: 'primary' | 'secondary' | 'tertiary';
29
- };
30
+ variant?: ButtonVariant;
31
+ } & PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>> & (IconButtonProps | TextButtonProps);
30
32
  /**
31
33
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-buttons-button--docs Button docs at Amsterdam Design System}
32
34
  */
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { clsx } from 'clsx';
3
3
  import { forwardRef } from 'react';
4
4
  import { Icon } from '../Icon';
5
+ export const buttonVariants = ['primary', 'secondary', 'tertiary'];
5
6
  /**
6
7
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-buttons-button--docs Button docs at Amsterdam Design System}
7
8
  */
@@ -10,21 +10,21 @@ export type CardProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
10
10
  export declare const Card: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
11
11
  children?: import("react").ReactNode | undefined;
12
12
  } & import("react").RefAttributes<HTMLElement>> & {
13
- Heading: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & {
14
- children?: import("react").ReactNode | undefined;
15
- } & {
13
+ Heading: import("react").ForwardRefExoticComponent<{
16
14
  color?: "inverse";
17
- level: 1 | 2 | 3 | 4;
15
+ level: 2 | 1 | 3 | 4;
18
16
  size?: "level-1" | "level-2" | "level-3" | "level-4" | "level-5" | "level-6";
19
- } & import("react").RefAttributes<HTMLHeadingElement>>;
20
- HeadingGroup: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
17
+ } & HTMLAttributes<HTMLHeadingElement> & {
21
18
  children?: import("react").ReactNode | undefined;
22
- } & {
19
+ } & import("react").RefAttributes<HTMLHeadingElement>>;
20
+ HeadingGroup: import("react").ForwardRefExoticComponent<{
23
21
  tagline: string;
22
+ } & HTMLAttributes<HTMLElement> & {
23
+ children?: import("react").ReactNode | undefined;
24
24
  } & import("react").RefAttributes<HTMLElement>>;
25
- Image: import("react").ForwardRefExoticComponent<import("../common/types").AspectRatioProps & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "children"> & {
25
+ Image: import("react").ForwardRefExoticComponent<{
26
26
  alt: string;
27
- } & import("react").RefAttributes<HTMLImageElement>>;
27
+ } & import("../common/types").AspectRatioProps & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "children"> & import("react").RefAttributes<HTMLImageElement>>;
28
28
  Link: import("react").ForwardRefExoticComponent<import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
29
29
  children?: import("react").ReactNode | undefined;
30
30
  } & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -2,10 +2,10 @@
2
2
  * @license EUPL-1.2+
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
- export declare const CardHeading: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLHeadingElement> & {
6
- children?: import("react").ReactNode | undefined;
7
- } & {
5
+ export declare const CardHeading: import("react").ForwardRefExoticComponent<{
8
6
  color?: "inverse";
9
- level: 1 | 2 | 3 | 4;
7
+ level: 2 | 1 | 3 | 4;
10
8
  size?: "level-1" | "level-2" | "level-3" | "level-4" | "level-5" | "level-6";
9
+ } & import("react").HTMLAttributes<HTMLHeadingElement> & {
10
+ children?: import("react").ReactNode | undefined;
11
11
  } & import("react").RefAttributes<HTMLHeadingElement>>;
@@ -3,13 +3,13 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
  import type { HTMLAttributes, PropsWithChildren } from 'react';
6
- export type CardHeadingGroupProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {
6
+ export type CardHeadingGroupProps = {
7
7
  /** A short phrase of text, e.g. to categorise the card. Displayed above the card heading. */
8
8
  tagline: string;
9
- };
10
- export declare const CardHeadingGroup: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
11
- children?: import("react").ReactNode | undefined;
12
- } & {
9
+ } & PropsWithChildren<HTMLAttributes<HTMLElement>>;
10
+ export declare const CardHeadingGroup: import("react").ForwardRefExoticComponent<{
13
11
  /** A short phrase of text, e.g. to categorise the card. Displayed above the card heading. */
14
12
  tagline: string;
13
+ } & HTMLAttributes<HTMLElement> & {
14
+ children?: import("react").ReactNode | undefined;
15
15
  } & import("react").RefAttributes<HTMLElement>>;
@@ -2,6 +2,6 @@
2
2
  * @license EUPL-1.2+
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
- export declare const CardImage: import("react").ForwardRefExoticComponent<import("../common/types").AspectRatioProps & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "children"> & {
5
+ export declare const CardImage: import("react").ForwardRefExoticComponent<{
6
6
  alt: string;
7
- } & import("react").RefAttributes<HTMLImageElement>>;
7
+ } & import("../common/types").AspectRatioProps & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "children"> & import("react").RefAttributes<HTMLImageElement>>;
@@ -3,7 +3,7 @@
3
3
  * Copyright Gemeente Amsterdam
4
4
  */
5
5
  import type { InputHTMLAttributes, PropsWithChildren, ReactNode } from 'react';
6
- export type CheckboxProps = PropsWithChildren<Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'type'>> & {
6
+ export type CheckboxProps = {
7
7
  /**
8
8
  * An icon to display instead of the default icon.
9
9
  * @default CheckboxIcon
@@ -13,13 +13,11 @@ export type CheckboxProps = PropsWithChildren<Omit<InputHTMLAttributes<HTMLInput
13
13
  indeterminate?: boolean;
14
14
  /** Whether the value fails a validation rule. */
15
15
  invalid?: boolean;
16
- };
16
+ } & PropsWithChildren<Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'type'>>;
17
17
  /**
18
18
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-checkbox--docs Checkbox docs at Amsterdam Design System}
19
19
  */
20
- export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "aria-invalid" | "type"> & {
21
- children?: ReactNode | undefined;
22
- } & {
20
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<{
23
21
  /**
24
22
  * An icon to display instead of the default icon.
25
23
  * @default CheckboxIcon
@@ -29,4 +27,6 @@ export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<In
29
27
  indeterminate?: boolean;
30
28
  /** Whether the value fails a validation rule. */
31
29
  invalid?: boolean;
30
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "aria-invalid"> & {
31
+ children?: ReactNode | undefined;
32
32
  } & import("react").RefAttributes<HTMLInputElement>>;
@@ -8,7 +8,7 @@ export declare const columnTags: readonly ["article", "div", "section"];
8
8
  type ColumnTag = (typeof columnTags)[number];
9
9
  export declare const columnGapSizes: readonly ["none", "x-small", "small", "large", "x-large"];
10
10
  type ColumnGap = (typeof columnGapSizes)[number];
11
- export type ColumnProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {
11
+ export type ColumnProps = {
12
12
  /**
13
13
  * The vertical alignment of the items in the column.
14
14
  * @default start
@@ -29,13 +29,11 @@ export type ColumnProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {
29
29
  * @default medium
30
30
  */
31
31
  gap?: ColumnGap;
32
- };
32
+ } & PropsWithChildren<HTMLAttributes<HTMLElement>>;
33
33
  /**
34
34
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-layout-column--docs Column docs at Amsterdam Design System}
35
35
  */
36
- export declare const Column: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
37
- children?: import("react").ReactNode | undefined;
38
- } & {
36
+ export declare const Column: import("react").ForwardRefExoticComponent<{
39
37
  /**
40
38
  * The vertical alignment of the items in the column.
41
39
  * @default start
@@ -56,5 +54,7 @@ export declare const Column: import("react").ForwardRefExoticComponent<HTMLAttri
56
54
  * @default medium
57
55
  */
58
56
  gap?: ColumnGap;
57
+ } & HTMLAttributes<HTMLElement> & {
58
+ children?: import("react").ReactNode | undefined;
59
59
  } & import("react").RefAttributes<unknown>>;
60
60
  export {};
@@ -5,19 +5,19 @@
5
5
  import type { InputHTMLAttributes } from 'react';
6
6
  export declare const dateInputTypes: readonly ["date", "datetime-local"];
7
7
  type DateInputType = (typeof dateInputTypes)[number];
8
- export type DateInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'type'> & {
8
+ export type DateInputProps = {
9
9
  /** Whether the value fails a validation rule. */
10
10
  invalid?: boolean;
11
11
  /** The kind of data that the user should provide. */
12
12
  type?: DateInputType;
13
- };
13
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'type'>;
14
14
  /**
15
15
  * @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-date-input--docs Date Input docs at Amsterdam Design System}
16
16
  */
17
- export declare const DateInput: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "aria-invalid" | "type"> & {
17
+ export declare const DateInput: import("react").ForwardRefExoticComponent<{
18
18
  /** Whether the value fails a validation rule. */
19
19
  invalid?: boolean;
20
20
  /** The kind of data that the user should provide. */
21
21
  type?: DateInputType;
22
- } & import("react").RefAttributes<HTMLInputElement>>;
22
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "aria-invalid"> & import("react").RefAttributes<HTMLInputElement>>;
23
23
  export {};