@amsterdam/design-system-react 0.1.7 → 0.1.9

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 (50) hide show
  1. package/dist/Accordion/Accordion.d.ts +1 -2
  2. package/dist/Alert/Alert.d.ts +2 -2
  3. package/dist/AspectRatio/AspectRatio.d.ts +1 -1
  4. package/dist/Breadcrumb/Breadcrumb.d.ts +3 -4
  5. package/dist/Card/Card.d.ts +19 -0
  6. package/dist/Card/Card.test.d.ts +1 -0
  7. package/dist/Card/index.d.ts +2 -0
  8. package/dist/Dialog/Dialog.d.ts +9 -0
  9. package/dist/Dialog/Dialog.test.d.ts +1 -0
  10. package/dist/Dialog/index.d.ts +2 -0
  11. package/dist/Footer/Footer.d.ts +0 -6
  12. package/dist/Grid/Grid.d.ts +40 -0
  13. package/dist/Grid/Grid.test.d.ts +1 -0
  14. package/dist/Grid/GridCell.d.ts +16 -12
  15. package/dist/Grid/GridCell.test.d.ts +1 -0
  16. package/dist/Grid/gridCellClasses.d.ts +2 -0
  17. package/dist/Grid/index.d.ts +2 -3
  18. package/dist/Highlight/Highlight.d.ts +10 -0
  19. package/dist/Highlight/Highlight.test.d.ts +1 -0
  20. package/dist/Highlight/index.d.ts +2 -0
  21. package/dist/Image/Image.d.ts +8 -0
  22. package/dist/Image/Image.test.d.ts +1 -0
  23. package/dist/Image/index.d.ts +2 -0
  24. package/dist/Logo/Logo.d.ts +11 -0
  25. package/dist/Logo/Logo.test.d.ts +1 -0
  26. package/dist/Logo/brand/LogoAmsterdam.d.ts +3 -0
  27. package/dist/Logo/brand/LogoGgdAmsterdam.d.ts +3 -0
  28. package/dist/Logo/brand/LogoStadsarchief.d.ts +3 -0
  29. package/dist/Logo/brand/LogoStadsbankVanLening.d.ts +3 -0
  30. package/dist/Logo/brand/LogoVgaVerzekeringen.d.ts +3 -0
  31. package/dist/Logo/brand/index.d.ts +5 -0
  32. package/dist/Logo/index.d.ts +2 -0
  33. package/dist/Pagination/Pagination.d.ts +24 -0
  34. package/dist/Pagination/Pagination.test.d.ts +1 -0
  35. package/dist/Pagination/index.d.ts +2 -0
  36. package/dist/Paragraph/Paragraph.d.ts +1 -2
  37. package/dist/Screen/Screen.d.ts +11 -0
  38. package/dist/Screen/Screen.test.d.ts +1 -0
  39. package/dist/Screen/index.d.ts +2 -0
  40. package/dist/Switch/Switch.d.ts +4 -0
  41. package/dist/Switch/Switch.test.d.ts +1 -0
  42. package/dist/Switch/index.d.ts +1 -0
  43. package/dist/TopTaskLink/TopTaskLink.d.ts +1 -1
  44. package/dist/index.cjs.js +720 -224
  45. package/dist/index.cjs.js.map +1 -1
  46. package/dist/index.d.ts +8 -0
  47. package/dist/index.esm.js +679 -190
  48. package/dist/index.esm.js.map +1 -1
  49. package/package.json +22 -21
  50. package/dist/Grid/PageGrid.d.ts +0 -10
@@ -2,8 +2,7 @@
2
2
  * @license EUPL-1.2+
3
3
  * Copyright (c) 2023 Gemeente Amsterdam
4
4
  */
5
- import type { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
6
- import { HTMLAttributes, PropsWithChildren } from 'react';
5
+ import { ForwardRefExoticComponent, HTMLAttributes, PropsWithChildren, ReactNode, RefAttributes } from 'react';
7
6
  import { AccordionSection } from './AccordionSection';
8
7
  import { HeadingLevel } from '../Heading/Heading';
9
8
  export interface AccordionProps extends HTMLAttributes<HTMLDivElement> {
@@ -2,7 +2,7 @@
2
2
  * @license EUPL-1.2+
3
3
  * Copyright (c) 2023 Gemeente Amsterdam
4
4
  */
5
- import React, { HTMLAttributes, PropsWithChildren } from 'react';
5
+ import { HTMLAttributes, PropsWithChildren } from 'react';
6
6
  export interface AlertProps extends PropsWithChildren<HTMLAttributes<HTMLDivElement>> {
7
7
  title?: string;
8
8
  severity?: undefined | 'error' | 'success';
@@ -10,4 +10,4 @@ export interface AlertProps extends PropsWithChildren<HTMLAttributes<HTMLDivElem
10
10
  icon?: boolean;
11
11
  onClose?: () => void;
12
12
  }
13
- export declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
13
+ export declare const Alert: import("react").ForwardRefExoticComponent<AlertProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2023 Gemeente Amsterdam
4
4
  */
5
5
  import { HTMLAttributes, PropsWithChildren } from 'react';
6
- export type Ratio = 'extra-tall' | 'tall' | 'square' | 'wide' | 'extra-wide';
6
+ export type Ratio = 'x-tall' | 'tall' | 'square' | 'wide' | 'x-wide' | '2x-wide';
7
7
  export interface AspectRatioProps extends PropsWithChildren<HTMLAttributes<HTMLDivElement>> {
8
8
  ratio?: Ratio;
9
9
  }
@@ -1,11 +1,10 @@
1
- import React from 'react';
2
- import type { HTMLAttributes, PropsWithChildren } from 'react';
3
- interface BreadcrumbComponent extends React.ForwardRefExoticComponent<PropsWithChildren<HTMLAttributes<HTMLElement>> & React.RefAttributes<HTMLElement>> {
1
+ import { ForwardRefExoticComponent, HTMLAttributes, PropsWithChildren, RefAttributes } from 'react';
2
+ interface BreadcrumbComponent extends ForwardRefExoticComponent<PropsWithChildren<HTMLAttributes<HTMLElement>> & RefAttributes<HTMLElement>> {
4
3
  Item: typeof BreadcrumbItem;
5
4
  }
6
5
  export declare const Breadcrumb: BreadcrumbComponent;
7
6
  export interface BreadcrumbItemProps extends PropsWithChildren<HTMLAttributes<HTMLLIElement>> {
8
7
  href: string;
9
8
  }
10
- declare const BreadcrumbItem: React.ForwardRefExoticComponent<BreadcrumbItemProps & React.RefAttributes<HTMLLIElement>>;
9
+ declare const BreadcrumbItem: ForwardRefExoticComponent<BreadcrumbItemProps & RefAttributes<HTMLLIElement>>;
11
10
  export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { AnchorHTMLAttributes, ForwardRefExoticComponent, HTMLAttributes, PropsWithChildren, RefAttributes } from 'react';
6
+ export interface CardHeadingProps extends PropsWithChildren<HTMLAttributes<HTMLElement>> {
7
+ tagline: string;
8
+ }
9
+ export declare const CardHeadingGroup: ForwardRefExoticComponent<CardHeadingProps & RefAttributes<HTMLElement>>;
10
+ export declare const CardLink: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & {
11
+ children?: import("react").ReactNode;
12
+ } & RefAttributes<HTMLAnchorElement>>;
13
+ export interface CardProps extends PropsWithChildren<HTMLAttributes<HTMLElement>> {
14
+ }
15
+ export interface CardComponent extends ForwardRefExoticComponent<PropsWithChildren<HTMLAttributes<HTMLElement>> & RefAttributes<HTMLElement> & CardProps> {
16
+ HeadingGroup: typeof CardHeadingGroup;
17
+ Link: typeof CardLink;
18
+ }
19
+ export declare const Card: CardComponent;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ export { Card } from './Card';
2
+ export type { CardProps } from './Card';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { DialogHTMLAttributes, PropsWithChildren, ReactNode } from 'react';
6
+ export interface DialogProps extends PropsWithChildren<DialogHTMLAttributes<HTMLDialogElement>> {
7
+ actions?: ReactNode;
8
+ }
9
+ export declare const Dialog: import("react").ForwardRefExoticComponent<DialogProps & import("react").RefAttributes<HTMLDialogElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ export { Dialog } from './Dialog';
2
+ export type { DialogProps } from './Dialog';
@@ -3,21 +3,15 @@
3
3
  * Copyright (c) 2023 Gemeente Amsterdam
4
4
  */
5
5
  import { ForwardRefExoticComponent, HTMLAttributes, PropsWithChildren, RefAttributes } from 'react';
6
- import { GridCellProps } from '../Grid';
7
6
  export declare const FooterTop: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
8
7
  children?: import("react").ReactNode;
9
8
  } & RefAttributes<HTMLDivElement>>;
10
- export type FooterColumnProps = HTMLAttributes<HTMLDivElement> & GridCellProps;
11
- export declare const FooterColumn: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & GridCellProps & {
12
- children?: import("react").ReactNode;
13
- } & RefAttributes<HTMLDivElement>>;
14
9
  export declare const FooterBottom: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
15
10
  children?: import("react").ReactNode;
16
11
  } & RefAttributes<HTMLDivElement>>;
17
12
  interface FooterComponent extends ForwardRefExoticComponent<PropsWithChildren<HTMLAttributes<HTMLElement>> & RefAttributes<HTMLElement>> {
18
13
  Top: typeof FooterTop;
19
14
  Bottom: typeof FooterBottom;
20
- Column: typeof FooterColumn;
21
15
  }
22
16
  export declare const Footer: FooterComponent;
23
17
  export {};
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { ForwardRefExoticComponent, HTMLAttributes, PropsWithChildren, RefAttributes } from 'react';
6
+ import { GridCell } from './GridCell';
7
+ export type GridColumnNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
8
+ export type GridColumnNumbers = {
9
+ narrow: GridColumnNumber;
10
+ medium: GridColumnNumber;
11
+ wide: GridColumnNumber;
12
+ };
13
+ type GridDensity = 'low' | 'high';
14
+ type GridPaddingSize = 'small' | 'medium' | 'large';
15
+ type GridPaddingVerticalProp = {
16
+ paddingBottom?: never;
17
+ paddingTop?: never;
18
+ /** The amount of vertical whitespace above and below the grid. */
19
+ paddingVertical?: GridPaddingSize;
20
+ };
21
+ type GridPaddingTopAndBottomProps = {
22
+ /** The amount of vertical whitespace below the grid. */
23
+ paddingBottom?: GridPaddingSize;
24
+ /** The amount of vertical whitespace above the grid. */
25
+ paddingTop?: GridPaddingSize;
26
+ paddingVertical?: never;
27
+ };
28
+ export type GridProps = {
29
+ /**
30
+ * The density of the grid: low (for websites) or high (for applications).
31
+ * Adjusts the pace with which columns get wider, and the start width as well.
32
+ * This is to be implemented more generally – it will be moved into a theme soon.
33
+ */
34
+ density?: GridDensity;
35
+ } & (GridPaddingVerticalProp | GridPaddingTopAndBottomProps) & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
36
+ interface GridComponent extends ForwardRefExoticComponent<GridProps & RefAttributes<HTMLDivElement>> {
37
+ Cell: typeof GridCell;
38
+ }
39
+ export declare const Grid: GridComponent;
40
+ export {};
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -2,17 +2,21 @@
2
2
  * @license EUPL-1.2+
3
3
  * Copyright (c) 2023 Gemeente Amsterdam
4
4
  */
5
- import { HTMLAttributes } from 'react';
6
- import { PageGridColumnNumber } from './PageGrid';
7
- type GridColumns = PageGridColumnNumber | {
8
- start?: PageGridColumnNumber;
9
- span: PageGridColumnNumber;
5
+ import { HTMLAttributes, PropsWithChildren } from 'react';
6
+ import type { GridColumnNumber, GridColumnNumbers } from './Grid';
7
+ type GridCellFullWidthProp = {
8
+ /** Whether the cell spans the full width of the grid. */
9
+ fullWidth?: boolean;
10
+ span?: never;
11
+ start?: never;
10
12
  };
11
- export interface GridCellProps extends HTMLAttributes<HTMLDivElement> {
12
- gridColumns?: GridColumns;
13
- }
14
- export declare const gridColumnClassNames: (gridColumns?: GridColumns) => string;
15
- export declare const GridCell: import("react").ForwardRefExoticComponent<GridCellProps & {
16
- children?: import("react").ReactNode;
17
- } & import("react").RefAttributes<HTMLDivElement>>;
13
+ type GridCellColumnProps = {
14
+ fullWidth?: never;
15
+ /** The amount of grid columns the cell spans. */
16
+ span?: GridColumnNumber | GridColumnNumbers;
17
+ /** The index of the grid column the cell starts at. */
18
+ start?: GridColumnNumber | GridColumnNumbers;
19
+ };
20
+ export type GridCellProps = (GridCellFullWidthProp | GridCellColumnProps) & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
21
+ export declare const GridCell: import("react").ForwardRefExoticComponent<GridCellProps & import("react").RefAttributes<HTMLDivElement>>;
18
22
  export {};
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ import { GridCellProps } from './GridCell';
2
+ export declare const gridCellClasses: (span?: GridCellProps['span'], start?: GridCellProps['start']) => string[];
@@ -1,4 +1,3 @@
1
- export type { GridCellProps } from './GridCell';
2
- export type { PageGridProps } from './PageGrid';
1
+ export * from './Grid';
3
2
  export * from './GridCell';
4
- export * from './PageGrid';
3
+ export type { GridCellProps } from './GridCell';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { HTMLAttributes, PropsWithChildren } from 'react';
6
+ export interface HighlightProps extends PropsWithChildren<HTMLAttributes<HTMLElement>> {
7
+ as?: 'article' | 'aside' | 'div' | 'footer' | 'section';
8
+ color?: 'blue' | 'dark-green' | 'green' | 'light-blue' | 'magenta' | 'orange' | 'purple' | 'yellow';
9
+ }
10
+ export declare const Highlight: import("react").ForwardRefExoticComponent<HighlightProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ export { Highlight } from './Highlight';
2
+ export type { HighlightProps } from './Highlight';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { ImgHTMLAttributes } from 'react';
6
+ export interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
7
+ }
8
+ export declare const Image: import("react").ForwardRefExoticComponent<ImageProps & import("react").RefAttributes<HTMLImageElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ export { Image } from './Image';
2
+ export type { ImageProps } from './Image';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { ForwardRefExoticComponent, RefAttributes, SVGProps } from 'react';
6
+ type LogoBrand = 'amsterdam' | 'ggd-amsterdam' | 'stadsarchief' | 'stadsbank-van-lening' | 'vga-verzekeringen';
7
+ export interface LogoProps extends SVGProps<SVGSVGElement> {
8
+ brand?: LogoBrand;
9
+ }
10
+ export declare const Logo: ForwardRefExoticComponent<Omit<LogoProps, "ref"> & RefAttributes<SVGSVGElement>>;
11
+ export {};
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,3 @@
1
+ import { type SVGProps } from 'react';
2
+ declare const LogoAmsterdam: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default LogoAmsterdam;
@@ -0,0 +1,3 @@
1
+ import { type SVGProps } from 'react';
2
+ declare const LogoGgdAmsterdam: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default LogoGgdAmsterdam;
@@ -0,0 +1,3 @@
1
+ import { type SVGProps } from 'react';
2
+ declare const LogoStadsarchief: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default LogoStadsarchief;
@@ -0,0 +1,3 @@
1
+ import { type SVGProps } from 'react';
2
+ declare const LogoStadsbankVanLening: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default LogoStadsbankVanLening;
@@ -0,0 +1,3 @@
1
+ import { type SVGProps } from 'react';
2
+ declare const LogoVgaVerzekeringen: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default LogoVgaVerzekeringen;
@@ -0,0 +1,5 @@
1
+ export { default as LogoAmsterdam } from './LogoAmsterdam';
2
+ export { default as LogoGgdAmsterdam } from './LogoGgdAmsterdam';
3
+ export { default as LogoStadsarchief } from './LogoStadsarchief';
4
+ export { default as LogoStadsbankVanLening } from './LogoStadsbankVanLening';
5
+ export { default as LogoVgaVerzekeringen } from './LogoVgaVerzekeringen';
@@ -0,0 +1,2 @@
1
+ export { Logo } from './Logo';
2
+ export type { LogoProps } from './Logo';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { HTMLAttributes } from 'react';
6
+ export interface PaginationProps extends HTMLAttributes<HTMLElement> {
7
+ /**
8
+ * The maximum amount of pages shown. This has a lower limit of 5
9
+ */
10
+ maxVisiblePages?: number;
11
+ /**
12
+ * Callback triggered when interaction changes the page number.
13
+ */
14
+ onPageChange?: (page: number) => void;
15
+ /**
16
+ * The current page number.
17
+ */
18
+ page?: number;
19
+ /**
20
+ * The total number of pages.
21
+ */
22
+ totalPages: number;
23
+ }
24
+ export declare const Pagination: import("react").ForwardRefExoticComponent<PaginationProps & import("react").RefAttributes<HTMLElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ export { Pagination } from './Pagination';
2
+ export type { PaginationProps } from './Pagination';
@@ -4,8 +4,7 @@
4
4
  * Copyright (c) 2023 Gemeente Amsterdam
5
5
  */
6
6
  import { HTMLAttributes } from 'react';
7
- import { GridCellProps } from '../Grid';
8
- export interface ParagraphProps extends HTMLAttributes<HTMLParagraphElement>, GridCellProps {
7
+ export interface ParagraphProps extends HTMLAttributes<HTMLParagraphElement> {
9
8
  size?: 'small' | 'large';
10
9
  /**
11
10
  * De kleur van de paragraaf
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { HTMLAttributes, PropsWithChildren } from 'react';
6
+ type ScreenMaxWidth = 'wide' | 'x-wide';
7
+ export interface ScreenProps extends PropsWithChildren<HTMLAttributes<HTMLDivElement>> {
8
+ maxWidth?: ScreenMaxWidth;
9
+ }
10
+ export declare const Screen: import("react").ForwardRefExoticComponent<ScreenProps & import("react").RefAttributes<HTMLDivElement>>;
11
+ export {};
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ export { Screen } from './Screen';
2
+ export type { ScreenProps } from './Screen';
@@ -0,0 +1,4 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ export declare const Switch: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
3
+ children?: import("react").ReactNode;
4
+ } & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1 @@
1
+ export { Switch } from './Switch';
@@ -5,6 +5,6 @@
5
5
  import { AnchorHTMLAttributes } from 'react';
6
6
  export interface TopTaskLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
7
7
  label: string;
8
- description?: string;
8
+ description: string;
9
9
  }
10
10
  export declare const TopTaskLink: import("react").ForwardRefExoticComponent<TopTaskLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;