@amsterdam/design-system-react 0.1.5 → 0.1.6
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/AspectRatio/AspectRatio.d.ts +10 -0
- package/dist/AspectRatio/AspectRatio.test.d.ts +1 -0
- package/dist/AspectRatio/index.d.ts +2 -0
- package/dist/Card/Card.d.ts +18 -0
- package/dist/Card/Card.test.d.ts +1 -0
- package/dist/Card/index.d.ts +2 -0
- package/dist/Hero/Hero.d.ts +15 -0
- package/dist/Hero/Hero.test.d.ts +1 -0
- package/dist/Hero/index.d.ts +1 -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/buttons/Button/Button.d.ts +12 -0
- package/dist/buttons/Button/Button.test.d.ts +1 -0
- package/dist/buttons/Button/index.d.ts +2 -0
- package/dist/containers/Accordion/Accordion.d.ts +17 -0
- package/dist/containers/Accordion/Accordion.test.d.ts +1 -0
- package/dist/containers/Accordion/AccordionContext.d.ts +8 -0
- package/dist/containers/Accordion/AccordionSection.d.ts +12 -0
- package/dist/containers/Accordion/AccordionSection.test.d.ts +1 -0
- package/dist/containers/Accordion/index.d.ts +3 -0
- package/dist/containers/Accordion/useFocusWithArrow.test.d.ts +1 -0
- package/dist/containers/Accordion/useFocusWithArrows.d.ts +24 -0
- package/dist/containers/Footer/Footer.d.ts +23 -0
- package/dist/containers/Footer/Footer.test.d.ts +1 -0
- package/dist/containers/Footer/index.d.ts +1 -0
- package/dist/containers/VisuallyHidden/VisuallyHidden.d.ts +8 -0
- package/dist/containers/VisuallyHidden/VisuallyHidden.test.d.ts +1 -0
- package/dist/containers/VisuallyHidden/index.d.ts +1 -0
- package/dist/forms/Checkbox/Checkbox.d.ts +12 -0
- package/dist/forms/Checkbox/Checkbox.test.d.ts +1 -0
- package/dist/forms/Checkbox/index.d.ts +2 -0
- package/dist/forms/FormLabel/FormLabel.d.ts +9 -0
- package/dist/forms/FormLabel/FormLabel.test.d.ts +1 -0
- package/dist/forms/FormLabel/index.d.ts +1 -0
- package/dist/index.cjs.js +40 -40
- package/dist/index.esm.js +40 -40
- package/dist/layout/GridCell/GridCell.d.ts +18 -0
- package/dist/layout/GridCell/index.d.ts +2 -0
- package/dist/layout/PageGrid/PageGrid.d.ts +10 -0
- package/dist/layout/PageGrid/index.d.ts +2 -0
- package/dist/media/Icon/Icon.d.ts +12 -0
- package/dist/media/Icon/Icon.test.d.ts +1 -0
- package/dist/media/Icon/index.d.ts +2 -0
- package/dist/navigation/Breadcrumb/Breadcrumb.d.ts +11 -0
- package/dist/navigation/Breadcrumb/Breadcrumb.test.d.ts +1 -0
- package/dist/navigation/Breadcrumb/index.d.ts +2 -0
- package/dist/navigation/Link/Link.d.ts +21 -0
- package/dist/navigation/Link/Link.test.d.ts +1 -0
- package/dist/navigation/Link/index.d.ts +2 -0
- package/dist/navigation/PageMenu/PageMenu.d.ts +20 -0
- package/dist/navigation/PageMenu/PageMenu.test.d.ts +1 -0
- package/dist/navigation/PageMenu/index.d.ts +2 -0
- package/dist/navigation/TopTaskLink/TopTaskLink.d.ts +10 -0
- package/dist/navigation/TopTaskLink/TopTaskLink.test.d.ts +1 -0
- package/dist/navigation/TopTaskLink/index.d.ts +1 -0
- package/dist/text/Blockquote/Blockquote.d.ts +15 -0
- package/dist/text/Blockquote/Blockquote.test.d.ts +1 -0
- package/dist/text/Blockquote/index.d.ts +2 -0
- package/dist/text/Heading/Heading.d.ts +29 -0
- package/dist/text/Heading/Heading.test.d.ts +1 -0
- package/dist/text/Heading/index.d.ts +2 -0
- package/dist/text/OrderedList/OrderedList.d.ts +17 -0
- package/dist/text/OrderedList/OrderedList.test.d.ts +1 -0
- package/dist/text/OrderedList/index.d.ts +2 -0
- package/dist/text/PageHeading/PageHeading.d.ts +15 -0
- package/dist/text/PageHeading/PageHeading.test.d.ts +1 -0
- package/dist/text/PageHeading/index.d.ts +2 -0
- package/dist/text/Paragraph/Paragraph.d.ts +18 -0
- package/dist/text/Paragraph/Paragraph.test.d.ts +1 -0
- package/dist/text/Paragraph/index.d.ts +2 -0
- package/dist/text/UnorderedList/UnorderedList.d.ts +17 -0
- package/dist/text/UnorderedList/UnorderedList.test.d.ts +1 -0
- package/dist/text/UnorderedList/index.d.ts +2 -0
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -26
|
@@ -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 type Ratio = 'extra-tall' | 'tall' | 'square' | 'wide' | 'extra-wide';
|
|
7
|
+
export interface AspectRatioProps extends PropsWithChildren<HTMLAttributes<HTMLDivElement>> {
|
|
8
|
+
ratio?: Ratio;
|
|
9
|
+
}
|
|
10
|
+
export declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
import { AnchorHTMLAttributes, ForwardRefExoticComponent, HTMLAttributes, PropsWithChildren, RefAttributes } from 'react';
|
|
6
|
+
export declare const CardHeadingGroup: ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
|
|
7
|
+
children?: import("react").ReactNode;
|
|
8
|
+
} & RefAttributes<HTMLElement>>;
|
|
9
|
+
export declare const CardLink: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
10
|
+
children?: import("react").ReactNode;
|
|
11
|
+
} & RefAttributes<HTMLAnchorElement>>;
|
|
12
|
+
export interface CardProps extends PropsWithChildren<HTMLAttributes<HTMLElement>> {
|
|
13
|
+
}
|
|
14
|
+
export interface CardComponent extends ForwardRefExoticComponent<PropsWithChildren<HTMLAttributes<HTMLElement>> & RefAttributes<HTMLElement> & CardProps> {
|
|
15
|
+
HeadingGroup: typeof CardHeadingGroup;
|
|
16
|
+
Link: typeof CardLink;
|
|
17
|
+
}
|
|
18
|
+
export declare const Card: CardComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
import { HTMLAttributes } from 'react';
|
|
6
|
+
export interface HeroProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
7
|
+
/**
|
|
8
|
+
* De kleur van de titel
|
|
9
|
+
* Gebruik deze property om de titel in tegenovergestelde kleur te tonen.
|
|
10
|
+
*/
|
|
11
|
+
inverseColor?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const Hero: import("react").ForwardRefExoticComponent<HeroProps & {
|
|
14
|
+
children?: import("react").ReactNode;
|
|
15
|
+
} & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Hero } from './Hero';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Switch } from './Switch';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
5
|
+
*/
|
|
6
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
7
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
|
+
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
9
|
+
}
|
|
10
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & {
|
|
11
|
+
children?: import("react").ReactNode;
|
|
12
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
import type { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
6
|
+
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
7
|
+
import { AccordionSection } from './AccordionSection';
|
|
8
|
+
import { HeadingLevel } from '../../text/Heading/Heading';
|
|
9
|
+
export interface AccordionProps extends HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
headingLevel: HeadingLevel;
|
|
12
|
+
section?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface AccordionComponent extends ForwardRefExoticComponent<PropsWithChildren<HTMLAttributes<HTMLDivElement>> & RefAttributes<HTMLDivElement> & AccordionProps> {
|
|
15
|
+
Section: typeof AccordionSection;
|
|
16
|
+
}
|
|
17
|
+
export declare const Accordion: AccordionComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { HeadingLevel } from '../../text/Heading/Heading';
|
|
3
|
+
export interface AccordionContextValue {
|
|
4
|
+
headingLevel: HeadingLevel;
|
|
5
|
+
section?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const AccordionContext: import("react").Context<AccordionContextValue>;
|
|
8
|
+
export default AccordionContext;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
import { HTMLAttributes } from 'react';
|
|
6
|
+
export interface AccordionSectionProps extends HTMLAttributes<HTMLElement> {
|
|
7
|
+
label: string;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const AccordionSection: import("react").ForwardRefExoticComponent<AccordionSectionProps & {
|
|
11
|
+
children?: import("react").ReactNode;
|
|
12
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
import type { KeyboardEvent, RefObject } from 'react';
|
|
6
|
+
export declare const KeyboardKeys: {
|
|
7
|
+
ArrowUp: string;
|
|
8
|
+
ArrowDown: string;
|
|
9
|
+
ArrowRight: string;
|
|
10
|
+
ArrowLeft: string;
|
|
11
|
+
Home: string;
|
|
12
|
+
End: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Focus on children with arrow keys and home / end buttons.
|
|
16
|
+
*
|
|
17
|
+
* @param ref Component ref
|
|
18
|
+
* @param rotating Jump to first item from last or vice versa
|
|
19
|
+
* @param horizontally In case you need to navigate horizontally, using left / right arrow buttons
|
|
20
|
+
*/
|
|
21
|
+
declare const useFocusWithArrows: (ref: RefObject<HTMLDivElement>, rotating?: boolean, horizontally?: boolean) => {
|
|
22
|
+
keyDown: (e: KeyboardEvent) => void;
|
|
23
|
+
};
|
|
24
|
+
export default useFocusWithArrows;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
import { ForwardRefExoticComponent, HTMLAttributes, PropsWithChildren, RefAttributes } from 'react';
|
|
6
|
+
import { GridCellProps } from '../../layout/GridCell';
|
|
7
|
+
export declare const FooterTop: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
children?: import("react").ReactNode;
|
|
9
|
+
} & 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
|
+
export declare const FooterBottom: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
15
|
+
children?: import("react").ReactNode;
|
|
16
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
17
|
+
interface FooterComponent extends ForwardRefExoticComponent<PropsWithChildren<HTMLAttributes<HTMLElement>> & RefAttributes<HTMLElement>> {
|
|
18
|
+
Top: typeof FooterTop;
|
|
19
|
+
Bottom: typeof FooterBottom;
|
|
20
|
+
Column: typeof FooterColumn;
|
|
21
|
+
}
|
|
22
|
+
export declare const Footer: FooterComponent;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Footer } from './Footer';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
import { HTMLAttributes } from 'react';
|
|
6
|
+
export declare const VisuallyHidden: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
7
|
+
children?: import("react").ReactNode;
|
|
8
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VisuallyHidden } from './VisuallyHidden';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
import { InputHTMLAttributes } from 'react';
|
|
6
|
+
export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & {
|
|
11
|
+
children?: import("react").ReactNode;
|
|
12
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
+
* Copyright (c) 2023 Gemeente Amsterdam
|
|
5
|
+
*/
|
|
6
|
+
import { LabelHTMLAttributes } from 'react';
|
|
7
|
+
export declare const FormLabel: import("react").ForwardRefExoticComponent<LabelHTMLAttributes<HTMLLabelElement> & {
|
|
8
|
+
children?: import("react").ReactNode;
|
|
9
|
+
} & import("react").RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FormLabel } from './FormLabel';
|