@amsterdam/design-system-react 0.1.7 → 0.1.8
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.
- package/dist/Accordion/Accordion.d.ts +1 -2
- package/dist/Alert/Alert.d.ts +2 -2
- package/dist/AspectRatio/AspectRatio.d.ts +1 -1
- package/dist/Breadcrumb/Breadcrumb.d.ts +3 -4
- package/dist/Card/Card.d.ts +19 -0
- package/dist/Card/Card.test.d.ts +1 -0
- package/dist/Card/index.d.ts +2 -0
- package/dist/Footer/Footer.d.ts +0 -6
- package/dist/Grid/Grid.d.ts +40 -0
- package/dist/Grid/Grid.test.d.ts +1 -0
- package/dist/Grid/GridCell.d.ts +16 -12
- package/dist/Grid/GridCell.test.d.ts +1 -0
- package/dist/Grid/gridCellClasses.d.ts +2 -0
- package/dist/Grid/index.d.ts +2 -3
- package/dist/Highlight/Highlight.d.ts +10 -0
- package/dist/Highlight/Highlight.test.d.ts +1 -0
- package/dist/Highlight/index.d.ts +2 -0
- package/dist/Image/Image.d.ts +8 -0
- package/dist/Image/Image.test.d.ts +1 -0
- package/dist/Image/index.d.ts +2 -0
- package/dist/Pagination/Pagination.d.ts +24 -0
- package/dist/Pagination/Pagination.test.d.ts +1 -0
- package/dist/Pagination/index.d.ts +2 -0
- package/dist/Paragraph/Paragraph.d.ts +1 -2
- package/dist/Screen/Screen.d.ts +11 -0
- package/dist/Screen/Screen.test.d.ts +1 -0
- package/dist/Screen/index.d.ts +2 -0
- package/dist/Switch/Switch.d.ts +4 -0
- package/dist/Switch/Switch.test.d.ts +1 -0
- package/dist/Switch/index.d.ts +1 -0
- package/dist/TopTaskLink/TopTaskLink.d.ts +1 -1
- package/dist/index.cjs.js +503 -221
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.esm.js +464 -187
- package/dist/index.esm.js.map +1 -1
- package/package.json +22 -21
- 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
|
|
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> {
|
package/dist/Alert/Alert.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license EUPL-1.2+
|
|
3
3
|
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
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:
|
|
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 = '
|
|
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
|
|
2
|
-
|
|
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:
|
|
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';
|
package/dist/Footer/Footer.d.ts
CHANGED
|
@@ -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';
|
package/dist/Grid/GridCell.d.ts
CHANGED
|
@@ -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 {
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
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';
|
package/dist/Grid/index.d.ts
CHANGED
|
@@ -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,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,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';
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* Copyright (c) 2023 Gemeente Amsterdam
|
|
5
5
|
*/
|
|
6
6
|
import { HTMLAttributes } from 'react';
|
|
7
|
-
|
|
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 @@
|
|
|
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
|
|
8
|
+
description: string;
|
|
9
9
|
}
|
|
10
10
|
export declare const TopTaskLink: import("react").ForwardRefExoticComponent<TopTaskLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|