@amsterdam/design-system-react 2.0.2 → 2.2.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.
- package/dist/Accordion/Accordion.d.ts +3 -3
- package/dist/Accordion/AccordionSection.d.ts +5 -5
- package/dist/Avatar/Avatar.d.ts +2 -2
- package/dist/Badge/Badge.d.ts +4 -4
- package/dist/Blockquote/Blockquote.d.ts +5 -5
- package/dist/Breakout/BreakoutCell.d.ts +2 -2
- package/dist/Button/Button.d.ts +7 -5
- package/dist/Button/Button.js +1 -0
- package/dist/Card/Card.d.ts +8 -8
- package/dist/Card/CardHeading.d.ts +3 -3
- package/dist/Card/CardHeadingGroup.d.ts +5 -5
- package/dist/Card/CardImage.d.ts +2 -2
- package/dist/Checkbox/Checkbox.d.ts +5 -5
- package/dist/Column/Column.d.ts +5 -5
- package/dist/DateInput/DateInput.d.ts +4 -4
- package/dist/DescriptionList/DescriptionList.d.ts +5 -5
- package/dist/Dialog/Dialog.d.ts +6 -7
- package/dist/Field/Field.d.ts +5 -5
- package/dist/FieldSet/FieldSet.d.ts +31 -10
- package/dist/FieldSet/FieldSet.js +4 -3
- package/dist/Figure/Figure.d.ts +3 -3
- package/dist/Figure/FigureCaption.d.ts +5 -5
- package/dist/FileList/FileList.d.ts +2 -2
- package/dist/FileList/FileListItem.d.ts +4 -4
- package/dist/Grid/Grid.d.ts +2 -2
- package/dist/Grid/GridCell.d.ts +2 -2
- package/dist/Heading/Heading.d.ts +10 -11
- package/dist/Heading/Heading.js +1 -0
- package/dist/Hint/Hint.d.ts +1 -0
- package/dist/Hint/Hint.js +2 -2
- package/dist/Icon/Icon.d.ts +0 -4
- package/dist/IconButton/IconButton.d.ts +4 -2
- package/dist/IconButton/IconButton.js +1 -0
- package/dist/Image/Image.d.ts +5 -5
- package/dist/Image/Image.js +1 -1
- package/dist/ImageSlider/ImageSlider.d.ts +4 -4
- package/dist/ImageSlider/ImageSliderItem.d.ts +5 -5
- package/dist/ImageSlider/ImageSliderThumbnails.d.ts +5 -5
- package/dist/InvalidFormAlert/InvalidFormAlertWithErrors.d.ts +2 -2
- package/dist/Label/Label.d.ts +25 -6
- package/dist/Label/Label.js +3 -2
- package/dist/Link/Link.d.ts +4 -4
- package/dist/LinkList/LinkList.d.ts +1 -1
- package/dist/LinkList/LinkListLink.d.ts +9 -4
- package/dist/LinkList/LinkListLink.js +2 -0
- package/dist/Logo/Logo.d.ts +2 -2
- package/dist/Menu/Menu.d.ts +31 -10
- package/dist/Menu/Menu.js +6 -1
- package/dist/Menu/MenuLink.d.ts +10 -4
- package/dist/OrderedList/OrderedList.d.ts +5 -5
- package/dist/Page/Page.d.ts +6 -2
- package/dist/Page/Page.js +1 -1
- package/dist/PageHeader/PageHeader.d.ts +8 -7
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.d.ts +1 -1
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.js +0 -4
- package/dist/PageHeader/PageHeaderMenuIcon.js +1 -1
- package/dist/PageHeader/PageHeaderMenuLink.d.ts +13 -6
- package/dist/PageHeader/PageHeaderMenuLink.js +3 -6
- package/dist/PageHeading/PageHeading.d.ts +5 -5
- package/dist/Pagination/LinkItem.d.ts +3 -3
- package/dist/Pagination/Pagination.d.ts +4 -4
- package/dist/Paragraph/Paragraph.d.ts +5 -9
- package/dist/PasswordInput/PasswordInput.d.ts +4 -4
- package/dist/Radio/Radio.d.ts +5 -5
- package/dist/Row/Row.d.ts +5 -5
- package/dist/SearchField/SearchField.d.ts +2 -2
- package/dist/SearchField/SearchFieldButton.js +1 -1
- package/dist/SearchField/SearchFieldInput.d.ts +2 -2
- package/dist/Select/Select.d.ts +5 -5
- package/dist/Spotlight/Spotlight.d.ts +6 -6
- package/dist/Spotlight/Spotlight.js +0 -4
- package/dist/StandaloneLink/StandaloneLink.d.ts +4 -4
- package/dist/Table/TableCaption.d.ts +0 -4
- package/dist/TableOfContents/TableOfContents.d.ts +7 -7
- package/dist/TableOfContents/TableOfContentsLink.d.ts +4 -4
- package/dist/Tabs/Tabs.d.ts +11 -11
- package/dist/Tabs/TabsButton.d.ts +5 -5
- package/dist/Tabs/TabsPanel.d.ts +5 -5
- package/dist/TextArea/TextArea.d.ts +12 -6
- package/dist/TextInput/TextInput.d.ts +4 -4
- package/dist/TimeInput/TimeInput.d.ts +4 -4
- package/dist/UnorderedList/UnorderedList.d.ts +5 -5
- package/dist/common/useIsAfterBreakpoint.d.ts +4 -0
- package/dist/common/useIsAfterBreakpoint.js +4 -4
- package/dist/index.cjs.js +62 -44
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +293 -218
- package/dist/index.esm.js +62 -44
- package/dist/index.esm.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +21 -20
- package/dist/Accordion/Accordion.test.d.ts +0 -5
- package/dist/Accordion/Accordion.test.js +0 -44
- package/dist/Accordion/AccordionSection.test.d.ts +0 -5
- package/dist/Accordion/AccordionSection.test.js +0 -100
- package/dist/ActionGroup/ActionGroup.test.d.ts +0 -5
- package/dist/ActionGroup/ActionGroup.test.js +0 -33
- package/dist/Alert/Alert.test.d.ts +0 -5
- package/dist/Alert/Alert.test.js +0 -74
- package/dist/Avatar/Avatar.test.d.ts +0 -5
- package/dist/Avatar/Avatar.test.js +0 -63
- package/dist/Badge/Badge.test.d.ts +0 -5
- package/dist/Badge/Badge.test.js +0 -43
- package/dist/Blockquote/Blockquote.test.d.ts +0 -5
- package/dist/Blockquote/Blockquote.test.js +0 -46
- package/dist/Breadcrumb/Breadcrumb.test.d.ts +0 -5
- package/dist/Breadcrumb/Breadcrumb.test.js +0 -45
- package/dist/Breadcrumb/BreadcrumbLink.test.d.ts +0 -5
- package/dist/Breadcrumb/BreadcrumbLink.test.js +0 -40
- package/dist/Breakout/Breakout.test.d.ts +0 -5
- package/dist/Breakout/Breakout.test.js +0 -62
- package/dist/Breakout/BreakoutCell.test.d.ts +0 -5
- package/dist/Breakout/BreakoutCell.test.js +0 -128
- package/dist/Button/Button.test.d.ts +0 -5
- package/dist/Button/Button.test.js +0 -114
- package/dist/CallToActionLink/CallToActionLink.test.d.ts +0 -5
- package/dist/CallToActionLink/CallToActionLink.test.js +0 -33
- package/dist/Card/Card.test.d.ts +0 -5
- package/dist/Card/Card.test.js +0 -33
- package/dist/Card/CardHeading.test.d.ts +0 -5
- package/dist/Card/CardHeading.test.js +0 -38
- package/dist/Card/CardHeadingGroup.test.d.ts +0 -5
- package/dist/Card/CardHeadingGroup.test.js +0 -38
- package/dist/Card/CardImage.test.d.ts +0 -5
- package/dist/Card/CardImage.test.js +0 -33
- package/dist/Card/CardLink.test.d.ts +0 -5
- package/dist/Card/CardLink.test.js +0 -33
- package/dist/CharacterCount/CharacterCount.test.d.ts +0 -5
- package/dist/CharacterCount/CharacterCount.test.js +0 -38
- package/dist/Checkbox/Checkbox.test.d.ts +0 -5
- package/dist/Checkbox/Checkbox.test.js +0 -142
- package/dist/Column/Column.test.d.ts +0 -5
- package/dist/Column/Column.test.js +0 -59
- package/dist/DateInput/DateInput.test.d.ts +0 -5
- package/dist/DateInput/DateInput.test.js +0 -58
- package/dist/DescriptionList/DescriptionList.test.d.ts +0 -5
- package/dist/DescriptionList/DescriptionList.test.js +0 -43
- package/dist/DescriptionList/DescriptionListDescription.test.d.ts +0 -5
- package/dist/DescriptionList/DescriptionListDescription.test.js +0 -33
- package/dist/DescriptionList/DescriptionListSection.test.d.ts +0 -5
- package/dist/DescriptionList/DescriptionListSection.test.js +0 -33
- package/dist/DescriptionList/DescriptionListTerm.test.d.ts +0 -5
- package/dist/DescriptionList/DescriptionListTerm.test.js +0 -33
- package/dist/Dialog/Dialog.test.d.ts +0 -5
- package/dist/Dialog/Dialog.test.js +0 -82
- package/dist/ErrorMessage/ErrorMessage.test.d.ts +0 -5
- package/dist/ErrorMessage/ErrorMessage.test.js +0 -53
- package/dist/Field/Field.test.d.ts +0 -5
- package/dist/Field/Field.test.js +0 -38
- package/dist/FieldSet/FieldSet.test.d.ts +0 -5
- package/dist/FieldSet/FieldSet.test.js +0 -63
- package/dist/Figure/Figure.test.d.ts +0 -5
- package/dist/Figure/Figure.test.js +0 -33
- package/dist/Figure/FigureCaption.test.d.ts +0 -5
- package/dist/Figure/FigureCaption.test.js +0 -38
- package/dist/FileInput/FileInput.test.d.ts +0 -5
- package/dist/FileInput/FileInput.test.js +0 -33
- package/dist/FileList/FileList.test.d.ts +0 -5
- package/dist/FileList/FileList.test.js +0 -33
- package/dist/FileList/FileListItem.test.d.ts +0 -5
- package/dist/FileList/FileListItem.test.js +0 -44
- package/dist/Grid/Grid.test.d.ts +0 -5
- package/dist/Grid/Grid.test.js +0 -69
- package/dist/Grid/GridCell.test.d.ts +0 -5
- package/dist/Grid/GridCell.test.js +0 -84
- package/dist/Heading/Heading.test.d.ts +0 -5
- package/dist/Heading/Heading.test.js +0 -70
- package/dist/Hint/Hint.test.d.ts +0 -5
- package/dist/Hint/Hint.test.js +0 -53
- package/dist/Icon/Icon.test.d.ts +0 -5
- package/dist/Icon/Icon.test.js +0 -60
- package/dist/IconButton/IconButton.test.d.ts +0 -5
- package/dist/IconButton/IconButton.test.js +0 -48
- package/dist/Image/Image.test.d.ts +0 -5
- package/dist/Image/Image.test.js +0 -43
- package/dist/ImageSlider/ImageSlider.test.d.ts +0 -5
- package/dist/ImageSlider/ImageSlider.test.js +0 -70
- package/dist/ImageSlider/ImageSliderControls.test.d.ts +0 -5
- package/dist/ImageSlider/ImageSliderControls.test.js +0 -25
- package/dist/ImageSlider/ImageSliderItem.test.d.ts +0 -5
- package/dist/ImageSlider/ImageSliderItem.test.js +0 -37
- package/dist/ImageSlider/ImageSliderScroller.test.d.ts +0 -5
- package/dist/ImageSlider/ImageSliderScroller.test.js +0 -37
- package/dist/ImageSlider/ImageSliderThumbnails.test.d.ts +0 -5
- package/dist/ImageSlider/ImageSliderThumbnails.test.js +0 -52
- package/dist/InvalidFormAlert/InvalidFormAlert.test.d.ts +0 -5
- package/dist/InvalidFormAlert/InvalidFormAlert.test.js +0 -108
- package/dist/Label/Label.test.d.ts +0 -5
- package/dist/Label/Label.test.js +0 -77
- package/dist/Link/Link.test.d.ts +0 -5
- package/dist/Link/Link.test.js +0 -43
- package/dist/LinkList/LinkList.test.d.ts +0 -5
- package/dist/LinkList/LinkList.test.js +0 -33
- package/dist/LinkList/LinkListLink.test.d.ts +0 -5
- package/dist/LinkList/LinkListLink.test.js +0 -54
- package/dist/Logo/Logo.test.d.ts +0 -5
- package/dist/Logo/Logo.test.js +0 -33
- package/dist/Mark/Mark.test.d.ts +0 -5
- package/dist/Mark/Mark.test.js +0 -33
- package/dist/Menu/Menu.test.d.ts +0 -5
- package/dist/Menu/Menu.test.js +0 -38
- package/dist/Menu/MenuLink.test.d.ts +0 -5
- package/dist/Menu/MenuLink.test.js +0 -56
- package/dist/OrderedList/OrderedList.test.d.ts +0 -5
- package/dist/OrderedList/OrderedList.test.js +0 -55
- package/dist/OrderedList/OrderedListItem.test.d.ts +0 -5
- package/dist/OrderedList/OrderedListItem.test.js +0 -32
- package/dist/Overlap/Overlap.test.d.ts +0 -5
- package/dist/Overlap/Overlap.test.js +0 -38
- package/dist/Page/Page.test.d.ts +0 -5
- package/dist/Page/Page.test.js +0 -33
- package/dist/PageFooter/PageFooter.test.d.ts +0 -5
- package/dist/PageFooter/PageFooter.test.js +0 -33
- package/dist/PageFooter/PageFooterMenu.test.d.ts +0 -5
- package/dist/PageFooter/PageFooterMenu.test.js +0 -35
- package/dist/PageFooter/PageFooterMenuLink.test.d.ts +0 -5
- package/dist/PageFooter/PageFooterMenuLink.test.js +0 -33
- package/dist/PageFooter/PageFooterSpotlight.test.d.ts +0 -5
- package/dist/PageFooter/PageFooterSpotlight.test.js +0 -33
- package/dist/PageHeader/PageHeader.test.d.ts +0 -6
- package/dist/PageHeader/PageHeader.test.js +0 -135
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.test.d.ts +0 -5
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.test.js +0 -38
- package/dist/PageHeader/PageHeaderMenuLink.test.d.ts +0 -5
- package/dist/PageHeader/PageHeaderMenuLink.test.js +0 -45
- package/dist/PageHeading/PageHeading.test.d.ts +0 -5
- package/dist/PageHeading/PageHeading.test.js +0 -40
- package/dist/Pagination/Pagination.test.d.ts +0 -5
- package/dist/Pagination/Pagination.test.js +0 -137
- package/dist/Paragraph/Paragraph.test.d.ts +0 -5
- package/dist/Paragraph/Paragraph.test.js +0 -62
- package/dist/PasswordInput/PasswordInput.test.d.ts +0 -5
- package/dist/PasswordInput/PasswordInput.test.js +0 -89
- package/dist/Radio/Radio.test.d.ts +0 -5
- package/dist/Radio/Radio.test.js +0 -134
- package/dist/Row/Row.test.d.ts +0 -5
- package/dist/Row/Row.test.js +0 -64
- package/dist/SearchField/SearchField.test.d.ts +0 -5
- package/dist/SearchField/SearchField.test.js +0 -50
- package/dist/SearchField/SearchFieldInput.test.d.ts +0 -5
- package/dist/SearchField/SearchFieldInput.test.js +0 -65
- package/dist/Select/Select.test.d.ts +0 -5
- package/dist/Select/Select.test.js +0 -74
- package/dist/Select/SelectOption.test.d.ts +0 -5
- package/dist/Select/SelectOption.test.js +0 -45
- package/dist/Select/SelectOptionGroup.test.d.ts +0 -5
- package/dist/Select/SelectOptionGroup.test.js +0 -45
- package/dist/SkipLink/SkipLink.test.d.ts +0 -5
- package/dist/SkipLink/SkipLink.test.js +0 -33
- package/dist/Spotlight/Spotlight.test.d.ts +0 -5
- package/dist/Spotlight/Spotlight.test.js +0 -46
- package/dist/StandaloneLink/StandaloneLink.test.d.ts +0 -5
- package/dist/StandaloneLink/StandaloneLink.test.js +0 -46
- package/dist/Switch/Switch.test.d.ts +0 -5
- package/dist/Switch/Switch.test.js +0 -69
- package/dist/Table/Table.test.d.ts +0 -5
- package/dist/Table/Table.test.js +0 -33
- package/dist/Table/TableBody.test.d.ts +0 -5
- package/dist/Table/TableBody.test.js +0 -34
- package/dist/Table/TableCaption.test.d.ts +0 -5
- package/dist/Table/TableCaption.test.js +0 -45
- package/dist/Table/TableCell.test.d.ts +0 -5
- package/dist/Table/TableCell.test.js +0 -36
- package/dist/Table/TableFooter.test.d.ts +0 -5
- package/dist/Table/TableFooter.test.js +0 -34
- package/dist/Table/TableHeader.test.d.ts +0 -5
- package/dist/Table/TableHeader.test.js +0 -34
- package/dist/Table/TableHeaderCell.test.d.ts +0 -5
- package/dist/Table/TableHeaderCell.test.js +0 -42
- package/dist/Table/TableRow.test.d.ts +0 -5
- package/dist/Table/TableRow.test.js +0 -35
- package/dist/TableOfContents/TableOfContents.test.d.ts +0 -5
- package/dist/TableOfContents/TableOfContents.test.js +0 -44
- package/dist/TableOfContents/TableOfContentsLink.test.d.ts +0 -5
- package/dist/TableOfContents/TableOfContentsLink.test.js +0 -34
- package/dist/TableOfContents/TableOfContentsList.test.d.ts +0 -5
- package/dist/TableOfContents/TableOfContentsList.test.js +0 -40
- package/dist/Tabs/Tabs.test.d.ts +0 -5
- package/dist/Tabs/Tabs.test.js +0 -104
- package/dist/Tabs/TabsButton.test.d.ts +0 -5
- package/dist/Tabs/TabsButton.test.js +0 -57
- package/dist/Tabs/TabsList.test.d.ts +0 -5
- package/dist/Tabs/TabsList.test.js +0 -32
- package/dist/Tabs/TabsPanel.test.d.ts +0 -5
- package/dist/Tabs/TabsPanel.test.js +0 -42
- package/dist/TextArea/TextArea.test.d.ts +0 -5
- package/dist/TextArea/TextArea.test.js +0 -105
- package/dist/TextInput/TextInput.test.d.ts +0 -5
- package/dist/TextInput/TextInput.test.js +0 -92
- package/dist/TimeInput/TimeInput.test.d.ts +0 -5
- package/dist/TimeInput/TimeInput.test.js +0 -51
- package/dist/UnorderedList/UnorderedList.test.d.ts +0 -5
- package/dist/UnorderedList/UnorderedList.test.js +0 -55
- package/dist/UnorderedList/UnorderedListItem.test.d.ts +0 -5
- package/dist/UnorderedList/UnorderedListItem.test.js +0 -32
- package/dist/common/formatFileSize.test.d.ts +0 -5
- package/dist/common/formatFileSize.test.js +0 -22
- package/dist/common/formatFileType.test.d.ts +0 -5
- package/dist/common/formatFileType.test.js +0 -27
- package/dist/common/useKeyboardFocus.test.d.ts +0 -5
- package/dist/common/useKeyboardFocus.test.js +0 -79
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @license EUPL-1.2+
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
|
-
import { PaginationProps } from './Pagination';
|
|
6
|
-
type LinkItemProps =
|
|
5
|
+
import type { PaginationProps } from './Pagination';
|
|
6
|
+
type LinkItemProps = {
|
|
7
7
|
currentPage: PaginationProps['page'];
|
|
8
8
|
pageNumber: number;
|
|
9
|
-
}
|
|
9
|
+
} & Pick<PaginationProps, 'linkComponent' | 'linkTemplate'>;
|
|
10
10
|
export declare const LinkItem: ({ currentPage, linkComponent, linkTemplate, pageNumber }: LinkItemProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
11
|
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { AnchorHTMLAttributes, ComponentType, HTMLAttributes } from 'react';
|
|
6
|
-
export type PaginationProps =
|
|
6
|
+
export type PaginationProps = {
|
|
7
7
|
/** The accessible name for the Pagination component. */
|
|
8
8
|
accessibleName?: string;
|
|
9
9
|
/**
|
|
@@ -50,11 +50,11 @@ export type PaginationProps = HTMLAttributes<HTMLElement> & {
|
|
|
50
50
|
* Note: must be unique for the page.
|
|
51
51
|
*/
|
|
52
52
|
visuallyHiddenLabelId?: string;
|
|
53
|
-
}
|
|
53
|
+
} & HTMLAttributes<HTMLElement>;
|
|
54
54
|
/**
|
|
55
55
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-navigation-pagination--docs Pagination docs at Amsterdam Design System}
|
|
56
56
|
*/
|
|
57
|
-
export declare const Pagination: import("react").ForwardRefExoticComponent<
|
|
57
|
+
export declare const Pagination: import("react").ForwardRefExoticComponent<{
|
|
58
58
|
/** The accessible name for the Pagination component. */
|
|
59
59
|
accessibleName?: string;
|
|
60
60
|
/**
|
|
@@ -101,4 +101,4 @@ export declare const Pagination: import("react").ForwardRefExoticComponent<HTMLA
|
|
|
101
101
|
* Note: must be unique for the page.
|
|
102
102
|
*/
|
|
103
103
|
visuallyHiddenLabelId?: string;
|
|
104
|
-
} & import("react").RefAttributes<HTMLElement>>;
|
|
104
|
+
} & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2+
|
|
3
|
-
* Copyright Gemeente Amsterdam
|
|
4
|
-
*/
|
|
5
1
|
/**
|
|
6
2
|
* @license EUPL-1.2+
|
|
7
3
|
* Copyright (c) 2021 Robbert Broersma
|
|
8
4
|
* Copyright Gemeente Amsterdam
|
|
9
5
|
*/
|
|
10
6
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
11
|
-
export type ParagraphProps =
|
|
7
|
+
export type ParagraphProps = {
|
|
12
8
|
/** Changes the text colour for readability on a dark background. */
|
|
13
9
|
color?: 'inverse';
|
|
14
10
|
/** The size of the text. */
|
|
15
11
|
size?: 'small' | 'large';
|
|
16
|
-
}
|
|
12
|
+
} & PropsWithChildren<HTMLAttributes<HTMLParagraphElement>>;
|
|
17
13
|
/**
|
|
18
14
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-text-paragraph--docs Paragraph docs at Amsterdam Design System}
|
|
19
15
|
*/
|
|
20
|
-
export declare const Paragraph: import("react").ForwardRefExoticComponent<
|
|
21
|
-
children?: import("react").ReactNode | undefined;
|
|
22
|
-
} & {
|
|
16
|
+
export declare const Paragraph: import("react").ForwardRefExoticComponent<{
|
|
23
17
|
/** Changes the text colour for readability on a dark background. */
|
|
24
18
|
color?: "inverse";
|
|
25
19
|
/** The size of the text. */
|
|
26
20
|
size?: "small" | "large";
|
|
21
|
+
} & HTMLAttributes<HTMLParagraphElement> & {
|
|
22
|
+
children?: import("react").ReactNode | undefined;
|
|
27
23
|
} & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { InputHTMLAttributes } from 'react';
|
|
6
|
-
export type PasswordInputProps =
|
|
6
|
+
export type PasswordInputProps = {
|
|
7
7
|
/** Whether the value fails a validation rule. */
|
|
8
8
|
invalid?: boolean;
|
|
9
|
-
}
|
|
9
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'autoCapitalize' | 'autoCorrect' | 'spellCheck' | 'type'>;
|
|
10
10
|
/**
|
|
11
11
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-password-input--docs Password Input docs at Amsterdam Design System}
|
|
12
12
|
*/
|
|
13
|
-
export declare const PasswordInput: import("react").ForwardRefExoticComponent<
|
|
13
|
+
export declare const PasswordInput: import("react").ForwardRefExoticComponent<{
|
|
14
14
|
/** Whether the value fails a validation rule. */
|
|
15
15
|
invalid?: boolean;
|
|
16
|
-
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
16
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "autoCapitalize" | "spellCheck" | "autoCorrect" | "aria-invalid" | "type"> & import("react").RefAttributes<HTMLInputElement>>;
|
package/dist/Radio/Radio.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { InputHTMLAttributes, PropsWithChildren, ReactNode } from 'react';
|
|
6
|
-
export type RadioProps =
|
|
6
|
+
export type RadioProps = {
|
|
7
7
|
/**
|
|
8
8
|
* An icon to display instead of the default icon.
|
|
9
9
|
* @default RadioIcon
|
|
@@ -11,13 +11,11 @@ export type RadioProps = PropsWithChildren<Omit<InputHTMLAttributes<HTMLInputEle
|
|
|
11
11
|
icon?: Function | ReactNode;
|
|
12
12
|
/** Whether the value fails a validation rule. */
|
|
13
13
|
invalid?: boolean;
|
|
14
|
-
}
|
|
14
|
+
} & PropsWithChildren<Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'type'>>;
|
|
15
15
|
/**
|
|
16
16
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-radio--docs Radio docs at Amsterdam Design System}
|
|
17
17
|
*/
|
|
18
|
-
export declare const Radio: import("react").ForwardRefExoticComponent<
|
|
19
|
-
children?: ReactNode | undefined;
|
|
20
|
-
} & {
|
|
18
|
+
export declare const Radio: import("react").ForwardRefExoticComponent<{
|
|
21
19
|
/**
|
|
22
20
|
* An icon to display instead of the default icon.
|
|
23
21
|
* @default RadioIcon
|
|
@@ -25,4 +23,6 @@ export declare const Radio: import("react").ForwardRefExoticComponent<Omit<Input
|
|
|
25
23
|
icon?: Function | ReactNode;
|
|
26
24
|
/** Whether the value fails a validation rule. */
|
|
27
25
|
invalid?: boolean;
|
|
26
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "aria-invalid" | "type"> & {
|
|
27
|
+
children?: ReactNode | undefined;
|
|
28
28
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
package/dist/Row/Row.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const rowTags: readonly ["article", "div", "section"];
|
|
|
8
8
|
type RowTag = (typeof rowTags)[number];
|
|
9
9
|
export declare const rowGapSizes: readonly ["none", "x-small", "small", "large", "x-large"];
|
|
10
10
|
type RowGap = (typeof rowGapSizes)[number];
|
|
11
|
-
export type RowProps =
|
|
11
|
+
export type RowProps = {
|
|
12
12
|
/**
|
|
13
13
|
* The horizontal alignment of the items in the row.
|
|
14
14
|
* @default start
|
|
@@ -34,13 +34,11 @@ export type RowProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {
|
|
|
34
34
|
* @default false
|
|
35
35
|
*/
|
|
36
36
|
wrap?: boolean;
|
|
37
|
-
}
|
|
37
|
+
} & PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
38
38
|
/**
|
|
39
39
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-layout-row--docs Row docs at Amsterdam Design System}
|
|
40
40
|
*/
|
|
41
|
-
export declare const Row: import("react").ForwardRefExoticComponent<
|
|
42
|
-
children?: import("react").ReactNode | undefined;
|
|
43
|
-
} & {
|
|
41
|
+
export declare const Row: import("react").ForwardRefExoticComponent<{
|
|
44
42
|
/**
|
|
45
43
|
* The horizontal alignment of the items in the row.
|
|
46
44
|
* @default start
|
|
@@ -66,5 +64,7 @@ export declare const Row: import("react").ForwardRefExoticComponent<HTMLAttribut
|
|
|
66
64
|
* @default false
|
|
67
65
|
*/
|
|
68
66
|
wrap?: boolean;
|
|
67
|
+
} & HTMLAttributes<HTMLElement> & {
|
|
68
|
+
children?: import("react").ReactNode | undefined;
|
|
69
69
|
} & import("react").RefAttributes<unknown>>;
|
|
70
70
|
export {};
|
|
@@ -288,8 +288,8 @@ export declare const SearchField: import("react").ForwardRefExoticComponent<HTML
|
|
|
288
288
|
formTarget?: string | undefined | undefined;
|
|
289
289
|
name?: string | undefined | undefined;
|
|
290
290
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
291
|
-
Input: import("react").ForwardRefExoticComponent<
|
|
291
|
+
Input: import("react").ForwardRefExoticComponent<{
|
|
292
292
|
invalid?: boolean;
|
|
293
293
|
label?: string;
|
|
294
|
-
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
294
|
+
} & import("react").InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
|
|
295
295
|
};
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { SearchIcon } from '@amsterdam/design-system-react-icons';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Button } from '../Button';
|
|
5
|
-
export const SearchFieldButton = forwardRef(({ children = 'Zoeken', ...restProps }, ref) => (_jsx(Button, { ...restProps, icon: SearchIcon, iconOnly: true, ref: ref, children: children })));
|
|
5
|
+
export const SearchFieldButton = forwardRef(({ children = 'Zoeken', ...restProps }, ref) => (_jsx(Button, { ...restProps, icon: SearchIcon, iconOnly: true, ref: ref, type: "submit", children: children })));
|
|
6
6
|
SearchFieldButton.displayName = 'SearchField.Button';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { InputHTMLAttributes } from 'react';
|
|
6
|
-
export declare const SearchFieldInput: import("react").ForwardRefExoticComponent<
|
|
6
|
+
export declare const SearchFieldInput: import("react").ForwardRefExoticComponent<{
|
|
7
7
|
/** Whether the value fails a validation rule. */
|
|
8
8
|
invalid?: boolean;
|
|
9
9
|
/** Describes the field for screen readers. */
|
|
10
10
|
label?: string;
|
|
11
|
-
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
11
|
+
} & InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
|
package/dist/Select/Select.d.ts
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { PropsWithChildren, SelectHTMLAttributes } from 'react';
|
|
6
|
-
export type SelectProps =
|
|
6
|
+
export type SelectProps = {
|
|
7
7
|
/** Whether the value fails a validation rule. */
|
|
8
8
|
invalid?: boolean;
|
|
9
|
-
}
|
|
9
|
+
} & PropsWithChildren<Omit<SelectHTMLAttributes<HTMLSelectElement>, 'aria-invalid'>>;
|
|
10
10
|
/**
|
|
11
11
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-select--docs Select docs at Amsterdam Design System}
|
|
12
12
|
*/
|
|
13
|
-
export declare const Select: import("react").ForwardRefExoticComponent<
|
|
14
|
-
children?: import("react").ReactNode | undefined;
|
|
15
|
-
} & {
|
|
13
|
+
export declare const Select: import("react").ForwardRefExoticComponent<{
|
|
16
14
|
/** Whether the value fails a validation rule. */
|
|
17
15
|
invalid?: boolean;
|
|
16
|
+
} & Omit<SelectHTMLAttributes<HTMLSelectElement>, "aria-invalid"> & {
|
|
17
|
+
children?: import("react").ReactNode | undefined;
|
|
18
18
|
} & import("react").RefAttributes<HTMLSelectElement>> & {
|
|
19
19
|
Group: import("react").ForwardRefExoticComponent<import("./SelectOptionGroup").SelectOptionGroupProps & {
|
|
20
20
|
children?: import("react").ReactNode | undefined;
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
* @license EUPL-1.2+
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
|
-
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
5
|
+
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
6
|
export declare const spotlightTags: readonly ["article", "aside", "div", "footer", "section"];
|
|
7
7
|
type SpotlightTag = (typeof spotlightTags)[number];
|
|
8
8
|
export declare const spotlightColors: readonly ["azure", "green", "lime", "magenta", "orange", "yellow"];
|
|
9
9
|
type SpotlightColor = (typeof spotlightColors)[number];
|
|
10
|
-
export type SpotlightProps =
|
|
10
|
+
export type SpotlightProps = {
|
|
11
11
|
/** The HTML element to use. */
|
|
12
12
|
as?: SpotlightTag;
|
|
13
13
|
/** The background colour. */
|
|
14
14
|
color?: SpotlightColor;
|
|
15
|
-
}
|
|
15
|
+
} & PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
16
16
|
/**
|
|
17
17
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-containers-spotlight--docs Spotlight docs at Amsterdam Design System}
|
|
18
18
|
*/
|
|
19
|
-
export declare const Spotlight: import("react").ForwardRefExoticComponent<
|
|
20
|
-
children?: import("react").ReactNode | undefined;
|
|
21
|
-
} & {
|
|
19
|
+
export declare const Spotlight: import("react").ForwardRefExoticComponent<{
|
|
22
20
|
/** The HTML element to use. */
|
|
23
21
|
as?: SpotlightTag;
|
|
24
22
|
/** The background colour. */
|
|
25
23
|
color?: SpotlightColor;
|
|
24
|
+
} & HTMLAttributes<HTMLElement> & {
|
|
25
|
+
children?: import("react").ReactNode | undefined;
|
|
26
26
|
} & import("react").RefAttributes<unknown>>;
|
|
27
27
|
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { AnchorHTMLAttributes } from 'react';
|
|
6
6
|
import type { IconProps } from '../Icon';
|
|
7
|
-
export type StandaloneLinkProps =
|
|
7
|
+
export type StandaloneLinkProps = {
|
|
8
8
|
/** Changes the text colour for readability on a light or dark background. */
|
|
9
9
|
color?: 'contrast' | 'inverse';
|
|
10
10
|
/**
|
|
@@ -12,11 +12,11 @@ export type StandaloneLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
|
12
12
|
* @default ChevronForwardIcon
|
|
13
13
|
*/
|
|
14
14
|
icon?: IconProps['svg'];
|
|
15
|
-
}
|
|
15
|
+
} & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'placeholder'>;
|
|
16
16
|
/**
|
|
17
17
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-navigation-standalone-link--docs Standalone Link docs at Amsterdam Design System}
|
|
18
18
|
*/
|
|
19
|
-
export declare const StandaloneLink: import("react").ForwardRefExoticComponent<
|
|
19
|
+
export declare const StandaloneLink: import("react").ForwardRefExoticComponent<{
|
|
20
20
|
/** Changes the text colour for readability on a light or dark background. */
|
|
21
21
|
color?: "contrast" | "inverse";
|
|
22
22
|
/**
|
|
@@ -24,4 +24,4 @@ export declare const StandaloneLink: import("react").ForwardRefExoticComponent<O
|
|
|
24
24
|
* @default ChevronForwardIcon
|
|
25
25
|
*/
|
|
26
26
|
icon?: IconProps["svg"];
|
|
27
|
-
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
27
|
+
} & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "placeholder"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
6
|
import type { HeadingProps } from '../Heading';
|
|
7
|
-
export type TableOfContentsProps =
|
|
7
|
+
export type TableOfContentsProps = {
|
|
8
8
|
/** The text for the Heading. */
|
|
9
9
|
heading?: string;
|
|
10
10
|
/**
|
|
@@ -12,13 +12,11 @@ export type TableOfContentsProps = PropsWithChildren<HTMLAttributes<HTMLElement>
|
|
|
12
12
|
* Visually, it always has the size of a level 3 Heading.
|
|
13
13
|
*/
|
|
14
14
|
headingLevel?: HeadingProps['level'];
|
|
15
|
-
}
|
|
15
|
+
} & PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
16
16
|
/**
|
|
17
17
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-navigation-table-of-contents--docs Table Of Contents docs at Amsterdam Design System}
|
|
18
18
|
*/
|
|
19
|
-
export declare const TableOfContents: import("react").ForwardRefExoticComponent<
|
|
20
|
-
children?: import("react").ReactNode | undefined;
|
|
21
|
-
} & {
|
|
19
|
+
export declare const TableOfContents: import("react").ForwardRefExoticComponent<{
|
|
22
20
|
/** The text for the Heading. */
|
|
23
21
|
heading?: string;
|
|
24
22
|
/**
|
|
@@ -26,10 +24,12 @@ export declare const TableOfContents: import("react").ForwardRefExoticComponent<
|
|
|
26
24
|
* Visually, it always has the size of a level 3 Heading.
|
|
27
25
|
*/
|
|
28
26
|
headingLevel?: HeadingProps["level"];
|
|
27
|
+
} & HTMLAttributes<HTMLElement> & {
|
|
28
|
+
children?: import("react").ReactNode | undefined;
|
|
29
29
|
} & import("react").RefAttributes<HTMLElement>> & {
|
|
30
|
-
Link: import("react").ForwardRefExoticComponent<
|
|
30
|
+
Link: import("react").ForwardRefExoticComponent<{
|
|
31
31
|
label: string;
|
|
32
|
-
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
32
|
+
} & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
33
33
|
List: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & {
|
|
34
34
|
children?: import("react").ReactNode | undefined;
|
|
35
35
|
} & import("react").RefAttributes<HTMLUListElement>>;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { AnchorHTMLAttributes } from 'react';
|
|
6
|
-
export type TableOfContentsLinkProps =
|
|
6
|
+
export type TableOfContentsLinkProps = {
|
|
7
7
|
/** The text for the link. */
|
|
8
8
|
label: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const TableOfContentsLink: import("react").ForwardRefExoticComponent<
|
|
9
|
+
} & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
10
|
+
export declare const TableOfContentsLink: import("react").ForwardRefExoticComponent<{
|
|
11
11
|
/** The text for the link. */
|
|
12
12
|
label: string;
|
|
13
|
-
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
13
|
+
} & AnchorHTMLAttributes<HTMLAnchorElement> & import("react").RefAttributes<HTMLAnchorElement>>;
|
package/dist/Tabs/Tabs.d.ts
CHANGED
|
@@ -3,32 +3,32 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
-
export type TabsProps =
|
|
6
|
+
export type TabsProps = {
|
|
7
7
|
/** The identifier of the initially active Tab. Corresponds to its Panel `id` value. */
|
|
8
8
|
activeTab?: string;
|
|
9
9
|
onTabChange?: (panelId: string) => void;
|
|
10
|
-
}
|
|
10
|
+
} & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
|
|
11
11
|
/**
|
|
12
12
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-containers-tabs--docs Tabs docs at Amsterdam Design System}
|
|
13
13
|
*/
|
|
14
|
-
export declare const Tabs: import("react").ForwardRefExoticComponent<
|
|
15
|
-
children?: import("react").ReactNode | undefined;
|
|
16
|
-
} & {
|
|
14
|
+
export declare const Tabs: import("react").ForwardRefExoticComponent<{
|
|
17
15
|
/** The identifier of the initially active Tab. Corresponds to its Panel `id` value. */
|
|
18
16
|
activeTab?: string;
|
|
19
17
|
onTabChange?: (panelId: string) => void;
|
|
18
|
+
} & HTMLAttributes<HTMLDivElement> & {
|
|
19
|
+
children?: import("react").ReactNode | undefined;
|
|
20
20
|
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
21
|
-
Button: import("react").ForwardRefExoticComponent<
|
|
22
|
-
children?: import("react").ReactNode | undefined;
|
|
23
|
-
} & {
|
|
21
|
+
Button: import("react").ForwardRefExoticComponent<{
|
|
24
22
|
'aria-controls': string;
|
|
23
|
+
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
24
|
+
children?: import("react").ReactNode | undefined;
|
|
25
25
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
26
26
|
List: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
27
27
|
children?: import("react").ReactNode | undefined;
|
|
28
28
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
29
|
-
Panel: import("react").ForwardRefExoticComponent<
|
|
30
|
-
children?: import("react").ReactNode | undefined;
|
|
31
|
-
} & {
|
|
29
|
+
Panel: import("react").ForwardRefExoticComponent<{
|
|
32
30
|
id: string;
|
|
31
|
+
} & HTMLAttributes<HTMLDivElement> & {
|
|
32
|
+
children?: import("react").ReactNode | undefined;
|
|
33
33
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
34
|
};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { ButtonHTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
-
export type TabsButtonProps =
|
|
6
|
+
export type TabsButtonProps = {
|
|
7
7
|
/** The identifier of the corresponding tab panel. */
|
|
8
8
|
'aria-controls': string;
|
|
9
|
-
}
|
|
10
|
-
export declare const TabsButton: import("react").ForwardRefExoticComponent<
|
|
11
|
-
children?: import("react").ReactNode | undefined;
|
|
12
|
-
} & {
|
|
9
|
+
} & PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
10
|
+
export declare const TabsButton: import("react").ForwardRefExoticComponent<{
|
|
13
11
|
/** The identifier of the corresponding tab panel. */
|
|
14
12
|
'aria-controls': string;
|
|
13
|
+
} & ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
14
|
+
children?: import("react").ReactNode | undefined;
|
|
15
15
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
package/dist/Tabs/TabsPanel.d.ts
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
-
export type TabsPanelProps =
|
|
6
|
+
export type TabsPanelProps = {
|
|
7
7
|
/** The identifier of the Tab Panel. */
|
|
8
8
|
id: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const TabsPanel: import("react").ForwardRefExoticComponent<
|
|
11
|
-
children?: import("react").ReactNode | undefined;
|
|
12
|
-
} & {
|
|
9
|
+
} & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
|
|
10
|
+
export declare const TabsPanel: import("react").ForwardRefExoticComponent<{
|
|
13
11
|
/** The identifier of the Tab Panel. */
|
|
14
12
|
id: string;
|
|
13
|
+
} & HTMLAttributes<HTMLDivElement> & {
|
|
14
|
+
children?: import("react").ReactNode | undefined;
|
|
15
15
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -3,18 +3,24 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { TextareaHTMLAttributes } from 'react';
|
|
6
|
-
export type TextAreaProps =
|
|
6
|
+
export type TextAreaProps = {
|
|
7
7
|
/** Whether the value fails a validation rule. */
|
|
8
8
|
invalid?: boolean;
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Allows the user to resize the text box. The default is resizing in both directions.
|
|
11
|
+
* Note: this feature is not fully supported in Safari on iOS.
|
|
12
|
+
*/
|
|
10
13
|
resize?: 'none' | 'horizontal' | 'vertical';
|
|
11
|
-
}
|
|
14
|
+
} & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'aria-invalid'>;
|
|
12
15
|
/**
|
|
13
16
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-text-area--docs Text Area docs at Amsterdam Design System}
|
|
14
17
|
*/
|
|
15
|
-
export declare const TextArea: import("react").ForwardRefExoticComponent<
|
|
18
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<{
|
|
16
19
|
/** Whether the value fails a validation rule. */
|
|
17
20
|
invalid?: boolean;
|
|
18
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Allows the user to resize the text box. The default is resizing in both directions.
|
|
23
|
+
* Note: this feature is not fully supported in Safari on iOS.
|
|
24
|
+
*/
|
|
19
25
|
resize?: "none" | "horizontal" | "vertical";
|
|
20
|
-
} & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
26
|
+
} & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "aria-invalid"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
import type { InputHTMLAttributes } from 'react';
|
|
6
6
|
export declare const textInputTypes: readonly ["email", "tel", "text", "url"];
|
|
7
7
|
type TextInputType = (typeof textInputTypes)[number];
|
|
8
|
-
export type TextInputProps =
|
|
8
|
+
export type TextInputProps = {
|
|
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?: TextInputType;
|
|
13
|
-
}
|
|
13
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid'>;
|
|
14
14
|
/**
|
|
15
15
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-text-input--docs Text Input docs at Amsterdam Design System}
|
|
16
16
|
*/
|
|
17
|
-
export declare const TextInput: import("react").ForwardRefExoticComponent<
|
|
17
|
+
export declare const TextInput: 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?: TextInputType;
|
|
22
|
-
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
22
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "aria-invalid"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
23
23
|
export {};
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { InputHTMLAttributes } from 'react';
|
|
6
|
-
export type TimeInputProps =
|
|
6
|
+
export type TimeInputProps = {
|
|
7
7
|
/** Whether the value fails a validation rule. */
|
|
8
8
|
invalid?: boolean;
|
|
9
|
-
}
|
|
9
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'type'>;
|
|
10
10
|
/**
|
|
11
11
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-time-input--docs Time Input docs at Amsterdam Design System}
|
|
12
12
|
*/
|
|
13
|
-
export declare const TimeInput: import("react").ForwardRefExoticComponent<
|
|
13
|
+
export declare const TimeInput: import("react").ForwardRefExoticComponent<{
|
|
14
14
|
/** Whether the value fails a validation rule. */
|
|
15
15
|
invalid?: boolean;
|
|
16
|
-
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
16
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "aria-invalid" | "type"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
-
export type UnorderedListProps =
|
|
6
|
+
export type UnorderedListProps = {
|
|
7
7
|
/** Changes the text colour for readability on a dark background. */
|
|
8
8
|
color?: 'inverse';
|
|
9
9
|
/** Whether the list items show a marker. */
|
|
10
10
|
markers?: boolean;
|
|
11
11
|
/** The size of the text. */
|
|
12
12
|
size?: 'small';
|
|
13
|
-
}
|
|
13
|
+
} & PropsWithChildren<HTMLAttributes<HTMLUListElement>>;
|
|
14
14
|
/**
|
|
15
15
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-text-unordered-list--docs Unordered List docs at Amsterdam Design System}
|
|
16
16
|
*/
|
|
17
|
-
export declare const UnorderedList: import("react").ForwardRefExoticComponent<
|
|
18
|
-
children?: import("react").ReactNode | undefined;
|
|
19
|
-
} & {
|
|
17
|
+
export declare const UnorderedList: import("react").ForwardRefExoticComponent<{
|
|
20
18
|
/** Changes the text colour for readability on a dark background. */
|
|
21
19
|
color?: "inverse";
|
|
22
20
|
/** Whether the list items show a marker. */
|
|
23
21
|
markers?: boolean;
|
|
24
22
|
/** The size of the text. */
|
|
25
23
|
size?: "small";
|
|
24
|
+
} & HTMLAttributes<HTMLUListElement> & {
|
|
25
|
+
children?: import("react").ReactNode | undefined;
|
|
26
26
|
} & import("react").RefAttributes<HTMLUListElement>> & {
|
|
27
27
|
Item: import("react").ForwardRefExoticComponent<import("react").LiHTMLAttributes<HTMLLIElement> & {
|
|
28
28
|
children?: import("react").ReactNode | undefined;
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* @license EUPL-1.2+
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
|
+
export declare const BREAKPOINTS: {
|
|
6
|
+
medium: string;
|
|
7
|
+
wide: string;
|
|
8
|
+
};
|
|
5
9
|
type useIsAfterBreakpointProps = 'medium' | 'wide';
|
|
6
10
|
declare const useIsAfterBreakpoint: (breakpoint: useIsAfterBreakpointProps) => boolean;
|
|
7
11
|
export default useIsAfterBreakpoint;
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { useLayoutEffect, useState } from 'react';
|
|
6
6
|
// TODO: we should set the breakpoint in JS somewhere and render this and the sass variables from that
|
|
7
|
-
const
|
|
8
|
-
medium: '
|
|
9
|
-
wide: '
|
|
7
|
+
export const BREAKPOINTS = {
|
|
8
|
+
medium: '37.5rem',
|
|
9
|
+
wide: '72.5rem',
|
|
10
10
|
};
|
|
11
11
|
const useIsAfterBreakpoint = (breakpoint) => {
|
|
12
12
|
const [matches, setMatches] = useState(false);
|
|
13
13
|
useLayoutEffect(() => {
|
|
14
14
|
// Check for window object to avoid SSR issues
|
|
15
15
|
if (breakpoint && typeof window !== 'undefined') {
|
|
16
|
-
const media = window.matchMedia(`(min-width: ${
|
|
16
|
+
const media = window.matchMedia(`(min-width: ${BREAKPOINTS[breakpoint]})`);
|
|
17
17
|
if (media.matches !== matches) {
|
|
18
18
|
setMatches(media.matches);
|
|
19
19
|
}
|