@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
|
@@ -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<
|
|
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 =
|
|
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<
|
|
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>>;
|
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ type AvatarColor = (typeof avatarColors)[number];
|
|
|
8
8
|
export type AvatarProps = {
|
|
9
9
|
/** The background colour. */
|
|
10
10
|
color?: AvatarColor;
|
|
11
|
-
/** The url for the user’s image. Its
|
|
11
|
+
/** The url for the user’s image. Its centre will be displayed. Should be square and scaled down. */
|
|
12
12
|
imageSrc?: string;
|
|
13
13
|
/** The text content. Should be the user’s initials. The first two characters will be displayed. */
|
|
14
14
|
label: string;
|
|
@@ -19,7 +19,7 @@ export type AvatarProps = {
|
|
|
19
19
|
export declare const Avatar: import("react").ForwardRefExoticComponent<{
|
|
20
20
|
/** The background colour. */
|
|
21
21
|
color?: AvatarColor;
|
|
22
|
-
/** The url for the user’s image. Its
|
|
22
|
+
/** The url for the user’s image. Its centre will be displayed. Should be square and scaled down. */
|
|
23
23
|
imageSrc?: string;
|
|
24
24
|
/** The text content. Should be the user’s initials. The first two characters will be displayed. */
|
|
25
25
|
label: string;
|
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -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 =
|
|
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<
|
|
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 =
|
|
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<
|
|
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 =
|
|
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 {};
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -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 =
|
|
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
|
|
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?:
|
|
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
|
*/
|
package/dist/Button/Button.js
CHANGED
|
@@ -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
|
*/
|
package/dist/Card/Card.d.ts
CHANGED
|
@@ -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<
|
|
14
|
-
children?: import("react").ReactNode | undefined;
|
|
15
|
-
} & {
|
|
13
|
+
Heading: import("react").ForwardRefExoticComponent<{
|
|
16
14
|
color?: "inverse";
|
|
17
15
|
level: 1 | 2 | 3 | 4;
|
|
18
16
|
size?: "level-1" | "level-2" | "level-3" | "level-4" | "level-5" | "level-6";
|
|
19
|
-
} &
|
|
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<
|
|
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<
|
|
6
|
-
children?: import("react").ReactNode | undefined;
|
|
7
|
-
} & {
|
|
5
|
+
export declare const CardHeading: import("react").ForwardRefExoticComponent<{
|
|
8
6
|
color?: "inverse";
|
|
9
7
|
level: 1 | 2 | 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 =
|
|
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<
|
|
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>>;
|
package/dist/Card/CardImage.d.ts
CHANGED
|
@@ -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<
|
|
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 =
|
|
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<
|
|
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>, "aria-invalid" | "type"> & {
|
|
31
|
+
children?: ReactNode | undefined;
|
|
32
32
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
package/dist/Column/Column.d.ts
CHANGED
|
@@ -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 =
|
|
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<
|
|
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 =
|
|
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<
|
|
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>, "aria-invalid" | "type"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
23
23
|
export {};
|
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
6
|
export declare const descriptionListTermsWidths: readonly ["narrow", "medium", "wide"];
|
|
7
7
|
type DescriptionListTermsWidth = (typeof descriptionListTermsWidths)[number];
|
|
8
|
-
export type DescriptionListProps =
|
|
8
|
+
export type DescriptionListProps = {
|
|
9
9
|
/** Changes the text colour for readability on a dark background. */
|
|
10
10
|
color?: 'inverse';
|
|
11
11
|
termsWidth?: DescriptionListTermsWidth;
|
|
12
|
-
}
|
|
12
|
+
} & PropsWithChildren<HTMLAttributes<HTMLDListElement>>;
|
|
13
13
|
/**
|
|
14
14
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-text-description-list--docs Description List docs at Amsterdam Design System}
|
|
15
15
|
*/
|
|
16
|
-
export declare const DescriptionList: import("react").ForwardRefExoticComponent<
|
|
17
|
-
children?: import("react").ReactNode | undefined;
|
|
18
|
-
} & {
|
|
16
|
+
export declare const DescriptionList: import("react").ForwardRefExoticComponent<{
|
|
19
17
|
/** Changes the text colour for readability on a dark background. */
|
|
20
18
|
color?: "inverse";
|
|
21
19
|
termsWidth?: DescriptionListTermsWidth;
|
|
20
|
+
} & HTMLAttributes<HTMLDListElement> & {
|
|
21
|
+
children?: import("react").ReactNode | undefined;
|
|
22
22
|
} & import("react").RefAttributes<HTMLDListElement>> & {
|
|
23
23
|
Description: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
|
|
24
24
|
children?: import("react").ReactNode | undefined;
|
package/dist/Dialog/Dialog.d.ts
CHANGED
|
@@ -2,28 +2,27 @@
|
|
|
2
2
|
* @license EUPL-1.2+
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
|
-
import type { DialogHTMLAttributes, PropsWithChildren, ReactNode } from 'react';
|
|
6
|
-
|
|
7
|
-
export type DialogProps = PropsWithChildren<DialogHTMLAttributes<HTMLDialogElement>> & {
|
|
5
|
+
import type { DialogHTMLAttributes, MouseEvent, PropsWithChildren, ReactNode } from 'react';
|
|
6
|
+
export type DialogProps = {
|
|
8
7
|
/** The label for the button that dismisses the Dialog. */
|
|
9
8
|
closeButtonLabel?: string;
|
|
10
9
|
/** Content for the footer, often one Button or an Action Group containing more of them. */
|
|
11
10
|
footer?: ReactNode;
|
|
12
11
|
/** The text for the Heading. */
|
|
13
12
|
heading: string;
|
|
14
|
-
}
|
|
13
|
+
} & PropsWithChildren<DialogHTMLAttributes<HTMLDialogElement>>;
|
|
15
14
|
/**
|
|
16
15
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-containers-dialog--docs Dialog docs at Amsterdam Design System}
|
|
17
16
|
*/
|
|
18
|
-
export declare const Dialog: import("react").ForwardRefExoticComponent<
|
|
19
|
-
children?: ReactNode | undefined;
|
|
20
|
-
} & {
|
|
17
|
+
export declare const Dialog: import("react").ForwardRefExoticComponent<{
|
|
21
18
|
/** The label for the button that dismisses the Dialog. */
|
|
22
19
|
closeButtonLabel?: string;
|
|
23
20
|
/** Content for the footer, often one Button or an Action Group containing more of them. */
|
|
24
21
|
footer?: ReactNode;
|
|
25
22
|
/** The text for the Heading. */
|
|
26
23
|
heading: string;
|
|
24
|
+
} & DialogHTMLAttributes<HTMLDialogElement> & {
|
|
25
|
+
children?: ReactNode | undefined;
|
|
27
26
|
} & import("react").RefAttributes<HTMLDialogElement>> & {
|
|
28
27
|
close: (event: MouseEvent<HTMLButtonElement>) => void | undefined;
|
|
29
28
|
open: (id: string) => void;
|
package/dist/Field/Field.d.ts
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
-
export type FieldProps =
|
|
6
|
+
export type FieldProps = {
|
|
7
7
|
/** Whether the field has an input with a validation error */
|
|
8
8
|
invalid?: boolean;
|
|
9
|
-
}
|
|
9
|
+
} & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
|
|
10
10
|
/**
|
|
11
11
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-field--docs Field docs at Amsterdam Design System}
|
|
12
12
|
*/
|
|
13
|
-
export declare const Field: import("react").ForwardRefExoticComponent<
|
|
14
|
-
children?: import("react").ReactNode | undefined;
|
|
15
|
-
} & {
|
|
13
|
+
export declare const Field: import("react").ForwardRefExoticComponent<{
|
|
16
14
|
/** Whether the field has an input with a validation error */
|
|
17
15
|
invalid?: boolean;
|
|
16
|
+
} & HTMLAttributes<HTMLDivElement> & {
|
|
17
|
+
children?: import("react").ReactNode | undefined;
|
|
18
18
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -3,24 +3,45 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
-
import { HintProps } from '../Hint';
|
|
7
|
-
export type FieldSetProps =
|
|
8
|
-
/**
|
|
6
|
+
import type { HintProps } from '../Hint';
|
|
7
|
+
export type FieldSetProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Whether the fieldset is nested inside another fieldset.
|
|
10
|
+
* This will show the legend in a lighter style.
|
|
11
|
+
*/
|
|
12
|
+
inFieldSet?: boolean;
|
|
13
|
+
/** Whether the field set has an input with a validation error. */
|
|
9
14
|
invalid?: boolean;
|
|
10
15
|
/** The text for the caption. */
|
|
11
16
|
legend: string;
|
|
12
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Render a level 1 heading in the legend.
|
|
19
|
+
* Set this if the Field Set is the only content of the page.
|
|
20
|
+
*/
|
|
21
|
+
legendIsPageHeading?: boolean;
|
|
22
|
+
} & HintProps & PropsWithChildren<HTMLAttributes<HTMLFieldSetElement>>;
|
|
13
23
|
/**
|
|
14
24
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-field-set--docs Field Set docs at Amsterdam Design System}
|
|
15
25
|
*/
|
|
16
26
|
export declare const FieldSet: import("react").ForwardRefExoticComponent<{
|
|
27
|
+
/**
|
|
28
|
+
* Whether the fieldset is nested inside another fieldset.
|
|
29
|
+
* This will show the legend in a lighter style.
|
|
30
|
+
*/
|
|
31
|
+
inFieldSet?: boolean;
|
|
32
|
+
/** Whether the field set has an input with a validation error. */
|
|
33
|
+
invalid?: boolean;
|
|
34
|
+
/** The text for the caption. */
|
|
35
|
+
legend: string;
|
|
36
|
+
/**
|
|
37
|
+
* Render a level 1 heading in the legend.
|
|
38
|
+
* Set this if the Field Set is the only content of the page.
|
|
39
|
+
*/
|
|
40
|
+
legendIsPageHeading?: boolean;
|
|
41
|
+
} & {
|
|
17
42
|
hint?: string;
|
|
43
|
+
inFieldSet?: boolean;
|
|
18
44
|
optional?: boolean;
|
|
19
45
|
} & HTMLAttributes<HTMLElement> & {
|
|
20
46
|
children?: import("react").ReactNode | undefined;
|
|
21
|
-
} & HTMLAttributes<HTMLFieldSetElement> &
|
|
22
|
-
/** Whether the field set has an input with a validation error */
|
|
23
|
-
invalid?: boolean;
|
|
24
|
-
/** The text for the caption. */
|
|
25
|
-
legend: string;
|
|
26
|
-
} & import("react").RefAttributes<HTMLFieldSetElement>>;
|
|
47
|
+
} & HTMLAttributes<HTMLFieldSetElement> & import("react").RefAttributes<HTMLFieldSetElement>>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Hint } from '../Hint';
|
|
5
5
|
/**
|
|
6
6
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-field-set--docs Field Set docs at Amsterdam Design System}
|
|
7
7
|
*/
|
|
8
|
-
export const FieldSet = forwardRef(({ children, className, hint, invalid, legend, optional, ...restProps }, ref) => {
|
|
9
|
-
|
|
8
|
+
export const FieldSet = forwardRef(({ children, className, hint, inFieldSet, invalid, legend, legendIsPageHeading, optional, ...restProps }, ref) => {
|
|
9
|
+
const legendContent = (_jsxs(_Fragment, { children: [legend, " ", _jsx(Hint, { hint: hint, inFieldSet: inFieldSet, optional: optional })] }));
|
|
10
|
+
return (_jsxs("fieldset", { ...restProps, className: clsx('ams-field-set', invalid && 'ams-field-set--invalid', className), ref: ref, children: [_jsx("legend", { className: clsx('ams-field-set__legend', inFieldSet && 'ams-field-set__legend--in-fieldset'), children: legendIsPageHeading ? _jsx("h1", { className: "ams-field-set__heading", children: legendContent }) : legendContent }), children] }));
|
|
10
11
|
});
|
|
11
12
|
FieldSet.displayName = 'FieldSet';
|
package/dist/Figure/Figure.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ export type FigureProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
|
10
10
|
export declare const Figure: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
|
|
11
11
|
children?: import("react").ReactNode | undefined;
|
|
12
12
|
} & import("react").RefAttributes<HTMLElement>> & {
|
|
13
|
-
Caption: import("react").ForwardRefExoticComponent<
|
|
14
|
-
children?: import("react").ReactNode | undefined;
|
|
15
|
-
} & {
|
|
13
|
+
Caption: import("react").ForwardRefExoticComponent<{
|
|
16
14
|
color?: "inverse";
|
|
15
|
+
} & HTMLAttributes<HTMLElement> & {
|
|
16
|
+
children?: import("react").ReactNode | undefined;
|
|
17
17
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
18
18
|
};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
-
export type FigureCaptionProps =
|
|
6
|
+
export type FigureCaptionProps = {
|
|
7
7
|
/** Changes the text colour for readability on a dark background. */
|
|
8
8
|
color?: 'inverse';
|
|
9
|
-
}
|
|
10
|
-
export declare const FigureCaption: import("react").ForwardRefExoticComponent<
|
|
11
|
-
children?: import("react").ReactNode | undefined;
|
|
12
|
-
} & {
|
|
9
|
+
} & PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
10
|
+
export declare const FigureCaption: import("react").ForwardRefExoticComponent<{
|
|
13
11
|
/** Changes the text colour for readability on a dark background. */
|
|
14
12
|
color?: "inverse";
|
|
13
|
+
} & HTMLAttributes<HTMLElement> & {
|
|
14
|
+
children?: import("react").ReactNode | undefined;
|
|
15
15
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -13,8 +13,8 @@ export declare const FileListRoot: import("react").ForwardRefExoticComponent<HTM
|
|
|
13
13
|
export declare const FileList: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & {
|
|
14
14
|
children?: import("react").ReactNode | undefined;
|
|
15
15
|
} & import("react").RefAttributes<HTMLOListElement>> & {
|
|
16
|
-
Item: import("react").ForwardRefExoticComponent<
|
|
16
|
+
Item: import("react").ForwardRefExoticComponent<{
|
|
17
17
|
file: File;
|
|
18
18
|
onDelete?: () => void;
|
|
19
|
-
} & import("react").RefAttributes<HTMLLIElement>>;
|
|
19
|
+
} & HTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement>>;
|
|
20
20
|
};
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { HTMLAttributes } from 'react';
|
|
6
|
-
export type FileListItemProps =
|
|
6
|
+
export type FileListItemProps = {
|
|
7
7
|
file: File;
|
|
8
8
|
onDelete?: () => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const FileListItem: import("react").ForwardRefExoticComponent<
|
|
9
|
+
} & HTMLAttributes<HTMLLIElement>;
|
|
10
|
+
export declare const FileListItem: import("react").ForwardRefExoticComponent<{
|
|
11
11
|
file: File;
|
|
12
12
|
onDelete?: () => void;
|
|
13
|
-
} & import("react").RefAttributes<HTMLLIElement>>;
|
|
13
|
+
} & HTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement>>;
|
package/dist/Grid/Grid.d.ts
CHANGED
|
@@ -28,12 +28,12 @@ type GridPaddingTopAndBottomProps = {
|
|
|
28
28
|
paddingTop?: GridPadding;
|
|
29
29
|
paddingVertical?: never;
|
|
30
30
|
};
|
|
31
|
-
export type GridProps =
|
|
31
|
+
export type GridProps = {
|
|
32
32
|
/** The HTML tag to use. */
|
|
33
33
|
as?: GridTag;
|
|
34
34
|
/** The amount of space between rows. */
|
|
35
35
|
gapVertical?: GridGap;
|
|
36
|
-
};
|
|
36
|
+
} & PropsWithChildren<HTMLAttributes<HTMLDivElement>> & (GridPaddingVerticalProp | GridPaddingTopAndBottomProps);
|
|
37
37
|
/**
|
|
38
38
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-layout-grid--docs Grid docs at Amsterdam Design System}
|
|
39
39
|
*/
|
package/dist/Grid/GridCell.d.ts
CHANGED
|
@@ -17,9 +17,9 @@ type GridCellSpanAndStartProps = {
|
|
|
17
17
|
/** The index of the grid column the cell starts at. */
|
|
18
18
|
start?: GridColumnNumber | GridColumnNumbers;
|
|
19
19
|
};
|
|
20
|
-
export type GridCellProps =
|
|
20
|
+
export type GridCellProps = {
|
|
21
21
|
/** The HTML tag to use. */
|
|
22
22
|
as?: GridCellTag;
|
|
23
|
-
};
|
|
23
|
+
} & PropsWithChildren<HTMLAttributes<HTMLElement>> & (GridCellSpanAllProp | GridCellSpanAndStartProps);
|
|
24
24
|
export declare const GridCell: import("react").ForwardRefExoticComponent<GridCellProps & import("react").RefAttributes<unknown>>;
|
|
25
25
|
export {};
|
|
@@ -1,37 +1,36 @@
|
|
|
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
|
|
7
|
+
export declare const headingSizes: readonly [1, 2, 3, 4];
|
|
8
|
+
type HeadingSize = (typeof headingSizes)[number];
|
|
9
|
+
export type HeadingProps = {
|
|
12
10
|
/** Changes the text colour for readability on a dark background. */
|
|
13
11
|
color?: 'inverse';
|
|
14
12
|
/** The hierarchical level within the document. */
|
|
15
|
-
level:
|
|
13
|
+
level: HeadingSize;
|
|
16
14
|
/**
|
|
17
15
|
* Uses larger or smaller text without changing its position in the heading hierarchy.
|
|
18
16
|
* The value ‘level-6’ is deprecated. Use level 5 instead.
|
|
19
17
|
*/
|
|
20
18
|
size?: 'level-1' | 'level-2' | 'level-3' | 'level-4' | 'level-5' | 'level-6';
|
|
21
|
-
}
|
|
19
|
+
} & PropsWithChildren<HTMLAttributes<HTMLHeadingElement>>;
|
|
22
20
|
/**
|
|
23
21
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-text-heading--docs Heading docs at Amsterdam Design System}
|
|
24
22
|
*/
|
|
25
|
-
export declare const Heading: import("react").ForwardRefExoticComponent<
|
|
26
|
-
children?: import("react").ReactNode | undefined;
|
|
27
|
-
} & {
|
|
23
|
+
export declare const Heading: import("react").ForwardRefExoticComponent<{
|
|
28
24
|
/** Changes the text colour for readability on a dark background. */
|
|
29
25
|
color?: "inverse";
|
|
30
26
|
/** The hierarchical level within the document. */
|
|
31
|
-
level:
|
|
27
|
+
level: HeadingSize;
|
|
32
28
|
/**
|
|
33
29
|
* Uses larger or smaller text without changing its position in the heading hierarchy.
|
|
34
30
|
* The value ‘level-6’ is deprecated. Use level 5 instead.
|
|
35
31
|
*/
|
|
36
32
|
size?: "level-1" | "level-2" | "level-3" | "level-4" | "level-5" | "level-6";
|
|
33
|
+
} & HTMLAttributes<HTMLHeadingElement> & {
|
|
34
|
+
children?: import("react").ReactNode | undefined;
|
|
37
35
|
} & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
36
|
+
export {};
|