@amsterdam/design-system-react 0.16.0 → 1.0.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 -0
- package/dist/Accordion/Accordion.js +3 -0
- package/dist/Accordion/Accordion.test.d.ts +4 -0
- package/dist/Accordion/Accordion.test.js +4 -0
- package/dist/Accordion/AccordionSection.test.d.ts +4 -0
- package/dist/Accordion/AccordionSection.test.js +4 -0
- package/dist/Accordion/index.d.ts +4 -0
- package/dist/Accordion/index.js +4 -0
- package/dist/ActionGroup/ActionGroup.d.ts +3 -0
- package/dist/ActionGroup/ActionGroup.js +3 -0
- package/dist/ActionGroup/ActionGroup.test.d.ts +4 -0
- package/dist/ActionGroup/ActionGroup.test.js +4 -0
- package/dist/ActionGroup/index.d.ts +4 -0
- package/dist/ActionGroup/index.js +4 -0
- package/dist/Alert/Alert.d.ts +3 -0
- package/dist/Alert/Alert.js +8 -5
- package/dist/Alert/Alert.test.d.ts +4 -0
- package/dist/Alert/Alert.test.js +4 -0
- package/dist/Alert/index.d.ts +4 -0
- package/dist/Alert/index.js +4 -0
- package/dist/Avatar/Avatar.d.ts +3 -0
- package/dist/Avatar/Avatar.js +5 -2
- package/dist/Avatar/Avatar.test.d.ts +4 -0
- package/dist/Avatar/Avatar.test.js +4 -0
- package/dist/Avatar/index.d.ts +4 -0
- package/dist/Avatar/index.js +4 -0
- package/dist/Badge/Badge.d.ts +3 -0
- package/dist/Badge/Badge.js +3 -0
- package/dist/Badge/Badge.test.d.ts +4 -0
- package/dist/Badge/Badge.test.js +4 -0
- package/dist/Badge/index.d.ts +4 -0
- package/dist/Badge/index.js +4 -0
- package/dist/Blockquote/Blockquote.d.ts +3 -0
- package/dist/Blockquote/Blockquote.js +3 -0
- package/dist/Blockquote/Blockquote.test.d.ts +4 -0
- package/dist/Blockquote/Blockquote.test.js +4 -0
- package/dist/Blockquote/index.d.ts +4 -0
- package/dist/Blockquote/index.js +4 -0
- package/dist/Breadcrumb/Breadcrumb.d.ts +3 -0
- package/dist/Breadcrumb/Breadcrumb.js +3 -0
- package/dist/Breadcrumb/Breadcrumb.test.d.ts +4 -0
- package/dist/Breadcrumb/Breadcrumb.test.js +4 -0
- package/dist/Breadcrumb/BreadcrumbLink.test.d.ts +4 -0
- package/dist/Breadcrumb/BreadcrumbLink.test.js +4 -0
- package/dist/Breadcrumb/index.d.ts +4 -0
- package/dist/Breadcrumb/index.js +4 -0
- package/dist/Breakout/Breakout.d.ts +3 -0
- package/dist/Breakout/Breakout.js +3 -0
- package/dist/Breakout/Breakout.test.d.ts +4 -0
- package/dist/Breakout/Breakout.test.js +4 -0
- package/dist/Breakout/BreakoutCell.test.d.ts +4 -0
- package/dist/Breakout/BreakoutCell.test.js +4 -0
- package/dist/Breakout/index.d.ts +4 -0
- package/dist/Breakout/index.js +4 -0
- package/dist/Button/Button.d.ts +3 -0
- package/dist/Button/Button.js +3 -0
- package/dist/Button/Button.test.d.ts +4 -0
- package/dist/Button/Button.test.js +4 -0
- package/dist/Button/index.d.ts +4 -0
- package/dist/Button/index.js +4 -0
- package/dist/Card/Card.d.ts +3 -0
- package/dist/Card/Card.js +3 -0
- package/dist/Card/Card.test.d.ts +4 -0
- package/dist/Card/Card.test.js +4 -0
- package/dist/Card/CardHeading.test.d.ts +4 -0
- package/dist/Card/CardHeading.test.js +4 -0
- package/dist/Card/CardHeadingGroup.test.d.ts +4 -0
- package/dist/Card/CardHeadingGroup.test.js +4 -0
- package/dist/Card/CardImage.test.d.ts +4 -0
- package/dist/Card/CardImage.test.js +4 -0
- package/dist/Card/CardLink.test.d.ts +4 -0
- package/dist/Card/CardLink.test.js +4 -0
- package/dist/Card/index.d.ts +4 -0
- package/dist/Card/index.js +4 -0
- package/dist/CharacterCount/CharacterCount.d.ts +3 -0
- package/dist/CharacterCount/CharacterCount.js +3 -0
- package/dist/CharacterCount/CharacterCount.test.d.ts +4 -0
- package/dist/CharacterCount/CharacterCount.test.js +4 -0
- package/dist/CharacterCount/index.d.ts +4 -0
- package/dist/CharacterCount/index.js +4 -0
- package/dist/Checkbox/Checkbox.d.ts +9 -2
- package/dist/Checkbox/Checkbox.js +6 -2
- package/dist/Checkbox/Checkbox.test.d.ts +4 -0
- package/dist/Checkbox/Checkbox.test.js +10 -0
- package/dist/Checkbox/CheckboxIcon.d.ts +7 -0
- package/dist/Checkbox/CheckboxIcon.js +3 -0
- package/dist/Checkbox/index.d.ts +4 -0
- package/dist/Checkbox/index.js +4 -0
- package/dist/Column/Column.d.ts +3 -0
- package/dist/Column/Column.js +3 -0
- package/dist/Column/Column.test.d.ts +4 -0
- package/dist/Column/Column.test.js +4 -0
- package/dist/Column/index.d.ts +4 -0
- package/dist/Column/index.js +4 -0
- package/dist/DateInput/DateInput.d.ts +3 -0
- package/dist/DateInput/DateInput.js +3 -0
- package/dist/DateInput/DateInput.test.d.ts +4 -0
- package/dist/DateInput/DateInput.test.js +4 -0
- package/dist/DateInput/index.d.ts +4 -0
- package/dist/DateInput/index.js +4 -0
- package/dist/DescriptionList/DescriptionList.d.ts +3 -0
- package/dist/DescriptionList/DescriptionList.js +3 -0
- package/dist/DescriptionList/DescriptionList.test.d.ts +4 -0
- package/dist/DescriptionList/DescriptionList.test.js +4 -0
- package/dist/DescriptionList/DescriptionListDescription.test.d.ts +4 -0
- package/dist/DescriptionList/DescriptionListDescription.test.js +4 -0
- package/dist/DescriptionList/DescriptionListSection.test.d.ts +4 -0
- package/dist/DescriptionList/DescriptionListSection.test.js +4 -0
- package/dist/DescriptionList/DescriptionListTerm.test.d.ts +4 -0
- package/dist/DescriptionList/DescriptionListTerm.test.js +4 -0
- package/dist/DescriptionList/index.d.ts +4 -0
- package/dist/DescriptionList/index.js +4 -0
- package/dist/Dialog/Dialog.d.ts +3 -0
- package/dist/Dialog/Dialog.js +3 -0
- package/dist/Dialog/Dialog.test.d.ts +4 -0
- package/dist/Dialog/Dialog.test.js +4 -0
- package/dist/Dialog/index.d.ts +4 -0
- package/dist/Dialog/index.js +4 -0
- package/dist/ErrorMessage/ErrorMessage.d.ts +3 -0
- package/dist/ErrorMessage/ErrorMessage.js +5 -2
- package/dist/ErrorMessage/ErrorMessage.test.d.ts +4 -0
- package/dist/ErrorMessage/ErrorMessage.test.js +4 -0
- package/dist/ErrorMessage/index.d.ts +4 -0
- package/dist/ErrorMessage/index.js +4 -0
- package/dist/Field/Field.d.ts +3 -0
- package/dist/Field/Field.js +3 -0
- package/dist/Field/Field.test.d.ts +4 -0
- package/dist/Field/Field.test.js +4 -0
- package/dist/Field/index.d.ts +4 -0
- package/dist/Field/index.js +4 -0
- package/dist/FieldSet/FieldSet.d.ts +3 -0
- package/dist/FieldSet/FieldSet.js +3 -0
- package/dist/FieldSet/FieldSet.test.d.ts +4 -0
- package/dist/FieldSet/FieldSet.test.js +4 -0
- package/dist/FieldSet/index.d.ts +4 -0
- package/dist/FieldSet/index.js +4 -0
- package/dist/Figure/Figure.d.ts +3 -0
- package/dist/Figure/Figure.js +3 -0
- package/dist/Figure/Figure.test.d.ts +4 -0
- package/dist/Figure/Figure.test.js +4 -0
- package/dist/Figure/FigureCaption.test.d.ts +4 -0
- package/dist/Figure/FigureCaption.test.js +4 -0
- package/dist/Figure/index.d.ts +4 -0
- package/dist/Figure/index.js +4 -0
- package/dist/FileInput/FileInput.d.ts +3 -0
- package/dist/FileInput/FileInput.js +3 -0
- package/dist/FileInput/FileInput.test.d.ts +4 -0
- package/dist/FileInput/FileInput.test.js +4 -0
- package/dist/FileInput/index.d.ts +4 -0
- package/dist/FileInput/index.js +4 -0
- package/dist/FileList/FileList.d.ts +3 -0
- package/dist/FileList/FileList.js +3 -0
- package/dist/FileList/FileList.test.d.ts +4 -0
- package/dist/FileList/FileList.test.js +4 -0
- package/dist/FileList/FileListItem.test.d.ts +4 -0
- package/dist/FileList/FileListItem.test.js +4 -0
- package/dist/FileList/index.d.ts +4 -0
- package/dist/FileList/index.js +4 -0
- package/dist/Grid/Grid.d.ts +3 -0
- package/dist/Grid/Grid.js +3 -0
- package/dist/Grid/Grid.test.d.ts +4 -0
- package/dist/Grid/Grid.test.js +4 -0
- package/dist/Grid/GridCell.test.d.ts +4 -0
- package/dist/Grid/GridCell.test.js +4 -0
- package/dist/Grid/index.d.ts +4 -0
- package/dist/Grid/index.js +4 -0
- package/dist/Grid/paddingClasses.d.ts +4 -0
- package/dist/Grid/paddingClasses.js +4 -0
- package/dist/Heading/Heading.d.ts +3 -1
- package/dist/Heading/Heading.js +7 -0
- package/dist/Heading/Heading.test.d.ts +4 -0
- package/dist/Heading/Heading.test.js +4 -0
- package/dist/Heading/getHeadingTag.d.ts +4 -0
- package/dist/Heading/getHeadingTag.js +4 -0
- package/dist/Heading/index.d.ts +4 -0
- package/dist/Heading/index.js +4 -0
- package/dist/Hint/Hint.test.d.ts +4 -0
- package/dist/Hint/Hint.test.js +4 -0
- package/dist/Hint/index.d.ts +4 -0
- package/dist/Hint/index.js +4 -0
- package/dist/Icon/Icon.d.ts +4 -2
- package/dist/Icon/Icon.js +8 -0
- package/dist/Icon/Icon.test.d.ts +4 -0
- package/dist/Icon/Icon.test.js +13 -9
- package/dist/Icon/index.d.ts +4 -0
- package/dist/Icon/index.js +4 -0
- package/dist/IconButton/IconButton.d.ts +5 -2
- package/dist/IconButton/IconButton.js +3 -0
- package/dist/IconButton/IconButton.test.d.ts +4 -0
- package/dist/IconButton/IconButton.test.js +4 -0
- package/dist/IconButton/index.d.ts +4 -0
- package/dist/IconButton/index.js +4 -0
- package/dist/Image/Image.d.ts +3 -0
- package/dist/Image/Image.js +3 -0
- package/dist/Image/Image.test.d.ts +4 -0
- package/dist/Image/Image.test.js +4 -0
- package/dist/Image/generateAspectRatioClass.d.ts +4 -0
- package/dist/Image/generateAspectRatioClass.js +4 -0
- package/dist/Image/index.d.ts +4 -0
- package/dist/Image/index.js +4 -0
- package/dist/ImageSlider/ImageSlider.d.ts +3 -0
- package/dist/ImageSlider/ImageSlider.js +3 -0
- package/dist/ImageSlider/ImageSlider.test.d.ts +4 -0
- package/dist/ImageSlider/ImageSlider.test.js +4 -0
- package/dist/ImageSlider/ImageSliderControls.js +3 -3
- package/dist/ImageSlider/ImageSliderControls.test.d.ts +4 -0
- package/dist/ImageSlider/ImageSliderControls.test.js +4 -0
- package/dist/ImageSlider/ImageSliderItem.test.d.ts +4 -0
- package/dist/ImageSlider/ImageSliderItem.test.js +4 -0
- package/dist/ImageSlider/ImageSliderScroller.test.d.ts +4 -0
- package/dist/ImageSlider/ImageSliderScroller.test.js +4 -0
- package/dist/ImageSlider/ImageSliderThumbnails.test.d.ts +4 -0
- package/dist/ImageSlider/ImageSliderThumbnails.test.js +4 -0
- package/dist/ImageSlider/index.d.ts +4 -0
- package/dist/ImageSlider/index.js +4 -0
- package/dist/InvalidFormAlert/InvalidFormAlert.d.ts +3 -0
- package/dist/InvalidFormAlert/InvalidFormAlert.js +3 -0
- package/dist/InvalidFormAlert/InvalidFormAlert.test.d.ts +4 -0
- package/dist/InvalidFormAlert/InvalidFormAlert.test.js +4 -0
- package/dist/InvalidFormAlert/index.d.ts +4 -0
- package/dist/InvalidFormAlert/index.js +4 -0
- package/dist/InvalidFormAlert/useAddErrorCountToDocumentTitle.d.ts +4 -0
- package/dist/InvalidFormAlert/useAddErrorCountToDocumentTitle.js +4 -0
- package/dist/Label/Label.d.ts +3 -1
- package/dist/Label/Label.js +7 -0
- package/dist/Label/Label.test.d.ts +4 -0
- package/dist/Label/Label.test.js +4 -0
- package/dist/Label/index.d.ts +4 -0
- package/dist/Label/index.js +4 -0
- package/dist/Link/Link.d.ts +3 -0
- package/dist/Link/Link.js +3 -0
- package/dist/Link/Link.test.d.ts +4 -0
- package/dist/Link/Link.test.js +4 -0
- package/dist/Link/index.d.ts +4 -0
- package/dist/Link/index.js +4 -0
- package/dist/LinkList/LinkList.d.ts +3 -0
- package/dist/LinkList/LinkList.js +3 -0
- package/dist/LinkList/LinkList.test.d.ts +4 -0
- package/dist/LinkList/LinkList.test.js +4 -0
- package/dist/LinkList/LinkListLink.js +2 -2
- package/dist/LinkList/LinkListLink.test.d.ts +4 -0
- package/dist/LinkList/LinkListLink.test.js +4 -0
- package/dist/LinkList/index.d.ts +4 -0
- package/dist/LinkList/index.js +4 -0
- package/dist/Logo/Logo.d.ts +3 -0
- package/dist/Logo/Logo.js +3 -0
- package/dist/Logo/Logo.test.d.ts +4 -0
- package/dist/Logo/Logo.test.js +4 -0
- package/dist/Logo/brand/LogoAmsterdam.d.ts +4 -0
- package/dist/Logo/brand/LogoAmsterdam.js +4 -0
- package/dist/Logo/brand/LogoGgdAmsterdam.d.ts +4 -0
- package/dist/Logo/brand/LogoGgdAmsterdam.js +4 -0
- package/dist/Logo/brand/LogoMuseumWeesp.d.ts +4 -0
- package/dist/Logo/brand/LogoMuseumWeesp.js +4 -0
- package/dist/Logo/brand/LogoStadsarchief.d.ts +4 -0
- package/dist/Logo/brand/LogoStadsarchief.js +4 -0
- package/dist/Logo/brand/LogoStadsbankVanLening.d.ts +4 -0
- package/dist/Logo/brand/LogoStadsbankVanLening.js +4 -0
- package/dist/Logo/brand/LogoVgaVerzekeringen.d.ts +4 -0
- package/dist/Logo/brand/LogoVgaVerzekeringen.js +4 -0
- package/dist/Logo/brand/index.d.ts +4 -0
- package/dist/Logo/brand/index.js +4 -0
- package/dist/Logo/index.d.ts +4 -0
- package/dist/Logo/index.js +4 -0
- package/dist/Mark/Mark.d.ts +3 -0
- package/dist/Mark/Mark.js +3 -0
- package/dist/Mark/Mark.test.d.ts +4 -0
- package/dist/Mark/Mark.test.js +4 -0
- package/dist/Mark/index.d.ts +4 -0
- package/dist/Mark/index.js +4 -0
- package/dist/OrderedList/OrderedList.d.ts +3 -0
- package/dist/OrderedList/OrderedList.js +3 -0
- package/dist/OrderedList/OrderedList.test.d.ts +4 -0
- package/dist/OrderedList/OrderedList.test.js +4 -0
- package/dist/OrderedList/OrderedListItem.test.d.ts +4 -0
- package/dist/OrderedList/OrderedListItem.test.js +4 -0
- package/dist/OrderedList/index.d.ts +4 -0
- package/dist/OrderedList/index.js +4 -0
- package/dist/Overlap/Overlap.d.ts +3 -0
- package/dist/Overlap/Overlap.js +3 -0
- package/dist/Overlap/Overlap.test.d.ts +4 -0
- package/dist/Overlap/Overlap.test.js +4 -0
- package/dist/Overlap/index.d.ts +4 -0
- package/dist/Overlap/index.js +4 -0
- package/dist/Page/Page.d.ts +3 -0
- package/dist/Page/Page.js +3 -0
- package/dist/Page/Page.test.d.ts +4 -0
- package/dist/Page/Page.test.js +4 -0
- package/dist/Page/index.d.ts +4 -0
- package/dist/Page/index.js +4 -0
- package/dist/PageFooter/PageFooter.d.ts +3 -0
- package/dist/PageFooter/PageFooter.js +3 -0
- package/dist/PageFooter/PageFooter.test.d.ts +4 -0
- package/dist/PageFooter/PageFooter.test.js +4 -0
- package/dist/PageFooter/PageFooterMenu.test.d.ts +4 -0
- package/dist/PageFooter/PageFooterMenu.test.js +4 -0
- package/dist/PageFooter/PageFooterMenuLink.test.d.ts +4 -0
- package/dist/PageFooter/PageFooterMenuLink.test.js +4 -0
- package/dist/PageFooter/PageFooterSpotlight.test.d.ts +4 -0
- package/dist/PageFooter/PageFooterSpotlight.test.js +4 -0
- package/dist/PageFooter/index.d.ts +4 -0
- package/dist/PageFooter/index.js +4 -0
- package/dist/PageHeader/PageHeader.d.ts +9 -2
- package/dist/PageHeader/PageHeader.js +6 -2
- package/dist/PageHeader/PageHeader.test.d.ts +4 -0
- package/dist/PageHeader/PageHeader.test.js +10 -0
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.d.ts +4 -0
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.js +4 -0
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.test.d.ts +4 -0
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.test.js +4 -0
- package/dist/PageHeader/PageHeaderMenuIcon.d.ts +4 -0
- package/dist/PageHeader/PageHeaderMenuLink.d.ts +4 -0
- package/dist/PageHeader/PageHeaderMenuLink.js +4 -0
- package/dist/PageHeader/PageHeaderMenuLink.test.d.ts +4 -0
- package/dist/PageHeader/PageHeaderMenuLink.test.js +4 -0
- package/dist/PageHeader/index.d.ts +4 -0
- package/dist/PageHeader/index.js +4 -0
- package/dist/PageHeader/matchMedia.mock.d.ts +4 -0
- package/dist/PageHeader/matchMedia.mock.js +4 -0
- package/dist/PageHeading/PageHeading.d.ts +3 -0
- package/dist/PageHeading/PageHeading.js +3 -0
- package/dist/PageHeading/PageHeading.test.d.ts +4 -0
- package/dist/PageHeading/PageHeading.test.js +4 -0
- package/dist/PageHeading/index.d.ts +4 -0
- package/dist/PageHeading/index.js +4 -0
- package/dist/Pagination/LinkItem.d.ts +4 -0
- package/dist/Pagination/Pagination.d.ts +3 -0
- package/dist/Pagination/Pagination.js +5 -2
- package/dist/Pagination/Pagination.test.d.ts +4 -0
- package/dist/Pagination/Pagination.test.js +4 -0
- package/dist/Pagination/Spacer.d.ts +4 -0
- package/dist/Pagination/Spacer.js +4 -0
- package/dist/Pagination/getRange.d.ts +4 -0
- package/dist/Pagination/getRange.js +4 -0
- package/dist/Pagination/index.d.ts +4 -0
- package/dist/Pagination/index.js +4 -0
- package/dist/Paragraph/Paragraph.d.ts +3 -1
- package/dist/Paragraph/Paragraph.js +7 -0
- package/dist/Paragraph/Paragraph.test.d.ts +4 -0
- package/dist/Paragraph/Paragraph.test.js +4 -0
- package/dist/Paragraph/index.d.ts +4 -0
- package/dist/Paragraph/index.js +4 -0
- package/dist/PasswordInput/PasswordInput.d.ts +3 -0
- package/dist/PasswordInput/PasswordInput.js +3 -0
- package/dist/PasswordInput/PasswordInput.test.d.ts +4 -0
- package/dist/PasswordInput/PasswordInput.test.js +4 -0
- package/dist/PasswordInput/index.d.ts +4 -0
- package/dist/PasswordInput/index.js +4 -0
- package/dist/Radio/Radio.d.ts +3 -0
- package/dist/Radio/Radio.js +3 -0
- package/dist/Radio/Radio.test.d.ts +4 -0
- package/dist/Radio/Radio.test.js +6 -2
- package/dist/Radio/RadioIcon.d.ts +4 -0
- package/dist/Radio/RadioIcon.js +1 -1
- package/dist/Radio/index.d.ts +4 -0
- package/dist/Radio/index.js +4 -0
- package/dist/Row/Row.d.ts +3 -0
- package/dist/Row/Row.js +3 -0
- package/dist/Row/Row.test.d.ts +4 -0
- package/dist/Row/Row.test.js +4 -0
- package/dist/Row/index.d.ts +4 -0
- package/dist/Row/index.js +4 -0
- package/dist/SearchField/SearchField.d.ts +3 -0
- package/dist/SearchField/SearchField.js +3 -0
- package/dist/SearchField/SearchField.test.d.ts +4 -0
- package/dist/SearchField/SearchField.test.js +4 -0
- package/dist/SearchField/SearchFieldInput.test.d.ts +4 -0
- package/dist/SearchField/SearchFieldInput.test.js +4 -0
- package/dist/SearchField/index.d.ts +4 -0
- package/dist/SearchField/index.js +4 -0
- package/dist/Select/Select.d.ts +3 -0
- package/dist/Select/Select.js +3 -0
- package/dist/Select/Select.test.d.ts +4 -0
- package/dist/Select/Select.test.js +4 -0
- package/dist/Select/SelectOption.test.d.ts +4 -0
- package/dist/Select/SelectOption.test.js +4 -0
- package/dist/Select/SelectOptionGroup.test.d.ts +4 -0
- package/dist/Select/SelectOptionGroup.test.js +4 -0
- package/dist/Select/index.d.ts +4 -0
- package/dist/Select/index.js +4 -0
- package/dist/SkipLink/SkipLink.d.ts +3 -0
- package/dist/SkipLink/SkipLink.js +3 -0
- package/dist/SkipLink/SkipLink.test.d.ts +4 -0
- package/dist/SkipLink/SkipLink.test.js +4 -0
- package/dist/SkipLink/index.d.ts +4 -0
- package/dist/SkipLink/index.js +4 -0
- package/dist/Spotlight/Spotlight.d.ts +3 -0
- package/dist/Spotlight/Spotlight.js +3 -0
- package/dist/Spotlight/Spotlight.test.d.ts +4 -0
- package/dist/Spotlight/Spotlight.test.js +4 -0
- package/dist/Spotlight/index.d.ts +4 -0
- package/dist/Spotlight/index.js +4 -0
- package/dist/StandaloneLink/StandaloneLink.d.ts +3 -0
- package/dist/StandaloneLink/StandaloneLink.js +3 -0
- package/dist/StandaloneLink/StandaloneLink.test.d.ts +4 -0
- package/dist/StandaloneLink/StandaloneLink.test.js +4 -0
- package/dist/StandaloneLink/index.d.ts +4 -0
- package/dist/StandaloneLink/index.js +4 -0
- package/dist/Switch/Switch.d.ts +3 -0
- package/dist/Switch/Switch.js +3 -0
- package/dist/Switch/Switch.test.d.ts +4 -0
- package/dist/Switch/Switch.test.js +4 -0
- package/dist/Switch/index.d.ts +4 -0
- package/dist/Switch/index.js +4 -0
- package/dist/Table/Table.d.ts +3 -0
- package/dist/Table/Table.js +3 -0
- package/dist/Table/Table.test.d.ts +4 -0
- package/dist/Table/Table.test.js +4 -0
- package/dist/Table/TableBody.test.d.ts +4 -0
- package/dist/Table/TableBody.test.js +4 -0
- package/dist/Table/TableCaption.d.ts +1 -2
- package/dist/Table/TableCaption.js +4 -0
- package/dist/Table/TableCaption.test.d.ts +4 -0
- package/dist/Table/TableCaption.test.js +4 -0
- package/dist/Table/TableCell.test.d.ts +4 -0
- package/dist/Table/TableCell.test.js +4 -0
- package/dist/Table/TableFooter.test.d.ts +4 -0
- package/dist/Table/TableFooter.test.js +4 -0
- package/dist/Table/TableHeader.test.d.ts +4 -0
- package/dist/Table/TableHeader.test.js +4 -0
- package/dist/Table/TableHeaderCell.test.d.ts +4 -0
- package/dist/Table/TableHeaderCell.test.js +4 -0
- package/dist/Table/TableRow.test.d.ts +4 -0
- package/dist/Table/TableRow.test.js +4 -0
- package/dist/Table/index.d.ts +4 -0
- package/dist/Table/index.js +4 -0
- package/dist/TableOfContents/TableOfContents.d.ts +3 -0
- package/dist/TableOfContents/TableOfContents.js +3 -0
- package/dist/TableOfContents/TableOfContents.test.d.ts +4 -0
- package/dist/TableOfContents/TableOfContents.test.js +4 -0
- package/dist/TableOfContents/TableOfContentsLink.test.d.ts +4 -0
- package/dist/TableOfContents/TableOfContentsLink.test.js +4 -0
- package/dist/TableOfContents/TableOfContentsList.test.d.ts +4 -0
- package/dist/TableOfContents/TableOfContentsList.test.js +4 -0
- package/dist/TableOfContents/index.d.ts +4 -0
- package/dist/TableOfContents/index.js +4 -0
- package/dist/Tabs/Tabs.d.ts +3 -0
- package/dist/Tabs/Tabs.js +5 -1
- package/dist/Tabs/Tabs.test.d.ts +4 -0
- package/dist/Tabs/Tabs.test.js +4 -0
- package/dist/Tabs/TabsButton.js +3 -0
- package/dist/Tabs/TabsButton.test.d.ts +4 -0
- package/dist/Tabs/TabsButton.test.js +14 -0
- package/dist/Tabs/TabsList.test.d.ts +4 -0
- package/dist/Tabs/TabsList.test.js +4 -0
- package/dist/Tabs/TabsPanel.test.d.ts +4 -0
- package/dist/Tabs/TabsPanel.test.js +4 -0
- package/dist/Tabs/index.d.ts +4 -0
- package/dist/Tabs/index.js +4 -0
- package/dist/TextArea/TextArea.d.ts +3 -0
- package/dist/TextArea/TextArea.js +3 -0
- package/dist/TextArea/TextArea.test.d.ts +4 -0
- package/dist/TextArea/TextArea.test.js +4 -0
- package/dist/TextArea/index.d.ts +4 -0
- package/dist/TextArea/index.js +4 -0
- package/dist/TextInput/TextInput.d.ts +3 -0
- package/dist/TextInput/TextInput.js +3 -0
- package/dist/TextInput/TextInput.test.d.ts +4 -0
- package/dist/TextInput/TextInput.test.js +4 -0
- package/dist/TextInput/index.d.ts +4 -0
- package/dist/TextInput/index.js +4 -0
- package/dist/TimeInput/TimeInput.d.ts +3 -0
- package/dist/TimeInput/TimeInput.js +3 -0
- package/dist/TimeInput/TimeInput.test.d.ts +4 -0
- package/dist/TimeInput/TimeInput.test.js +4 -0
- package/dist/TimeInput/index.d.ts +4 -0
- package/dist/TimeInput/index.js +4 -0
- package/dist/UnorderedList/UnorderedList.d.ts +3 -0
- package/dist/UnorderedList/UnorderedList.js +3 -0
- package/dist/UnorderedList/UnorderedList.test.d.ts +4 -0
- package/dist/UnorderedList/UnorderedList.test.js +4 -0
- package/dist/UnorderedList/UnorderedListItem.test.d.ts +4 -0
- package/dist/UnorderedList/UnorderedListItem.test.js +4 -0
- package/dist/UnorderedList/index.d.ts +4 -0
- package/dist/UnorderedList/index.js +4 -0
- package/dist/common/formatFileSize.test.d.ts +4 -0
- package/dist/common/formatFileSize.test.js +4 -0
- package/dist/common/formatFileType.test.d.ts +4 -0
- package/dist/common/formatFileType.test.js +4 -0
- package/dist/common/types.d.ts +4 -0
- package/dist/common/types.js +4 -0
- package/dist/common/useIsAfterBreakpoint.d.ts +4 -0
- package/dist/common/useIsAfterBreakpoint.js +4 -0
- package/dist/common/useKeyboardFocus.test.d.ts +4 -0
- package/dist/common/useKeyboardFocus.test.js +4 -0
- package/dist/index.cjs.js +350 -91
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +195 -4
- package/dist/index.esm.js +351 -92
- package/dist/index.esm.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
|
@@ -10,6 +10,9 @@ export type FieldSetProps = PropsWithChildren<HTMLAttributes<HTMLFieldSetElement
|
|
|
10
10
|
/** The text for the caption. */
|
|
11
11
|
legend: string;
|
|
12
12
|
} & HintProps;
|
|
13
|
+
/**
|
|
14
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-field-set--docs Field Set docs at Amsterdam Design System}
|
|
15
|
+
*/
|
|
13
16
|
export declare const FieldSet: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLFieldSetElement> & {
|
|
14
17
|
children?: import("react").ReactNode | undefined;
|
|
15
18
|
} & {
|
|
@@ -6,6 +6,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
8
|
import { Hint } from '../Hint';
|
|
9
|
+
/**
|
|
10
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-field-set--docs Field Set docs at Amsterdam Design System}
|
|
11
|
+
*/
|
|
9
12
|
export const FieldSet = forwardRef(({ children, className, hint, invalid, legend, optional, ...restProps }, ref) => {
|
|
10
13
|
return (_jsxs("fieldset", { ...restProps, className: clsx('ams-field-set', invalid && 'ams-field-set--invalid', className), ref: ref, children: [_jsxs("legend", { className: "ams-field-set__legend", children: [legend, " ", _jsx(Hint, { hint: hint, optional: optional })] }), children] }));
|
|
11
14
|
});
|
package/dist/FieldSet/index.d.ts
CHANGED
package/dist/FieldSet/index.js
CHANGED
package/dist/Figure/Figure.d.ts
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
6
|
export type FigureProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
7
|
+
/**
|
|
8
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-media-figure--docs Figure docs at Amsterdam Design System}
|
|
9
|
+
*/
|
|
7
10
|
export declare const Figure: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
|
|
8
11
|
children?: import("react").ReactNode | undefined;
|
|
9
12
|
} & import("react").RefAttributes<HTMLElement>> & {
|
package/dist/Figure/Figure.js
CHANGED
|
@@ -8,4 +8,7 @@ import { forwardRef } from 'react';
|
|
|
8
8
|
import { FigureCaption } from './FigureCaption';
|
|
9
9
|
const FigureRoot = forwardRef(({ children, className, ...restProps }, ref) => (_jsx("figure", { ...restProps, className: clsx('ams-figure', className), ref: ref, children: children })));
|
|
10
10
|
FigureRoot.displayName = 'Figure';
|
|
11
|
+
/**
|
|
12
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-media-figure--docs Figure docs at Amsterdam Design System}
|
|
13
|
+
*/
|
|
11
14
|
export const Figure = Object.assign(FigureRoot, { Caption: FigureCaption });
|
package/dist/Figure/index.d.ts
CHANGED
package/dist/Figure/index.js
CHANGED
|
@@ -4,4 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { InputHTMLAttributes } from 'react';
|
|
6
6
|
export type FileInputProps = InputHTMLAttributes<HTMLInputElement>;
|
|
7
|
+
/**
|
|
8
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-file-input--docs File Input docs at Amsterdam Design System}
|
|
9
|
+
*/
|
|
7
10
|
export declare const FileInput: import("react").ForwardRefExoticComponent<FileInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -5,5 +5,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
*/
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-file-input--docs File Input docs at Amsterdam Design System}
|
|
10
|
+
*/
|
|
8
11
|
export const FileInput = forwardRef(({ className, ...restProps }, ref) => (_jsx("input", { ...restProps, className: clsx('ams-file-input', className), ref: ref, type: "file" })));
|
|
9
12
|
FileInput.displayName = 'FileInput';
|
package/dist/FileInput/index.js
CHANGED
|
@@ -7,6 +7,9 @@ export type FileListProps = {} & PropsWithChildren<HTMLAttributes<HTMLUListEleme
|
|
|
7
7
|
export declare const FileListRoot: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & {
|
|
8
8
|
children?: import("react").ReactNode | undefined;
|
|
9
9
|
} & import("react").RefAttributes<HTMLOListElement>>;
|
|
10
|
+
/**
|
|
11
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-file-list--docs File List docs at Amsterdam Design System}
|
|
12
|
+
*/
|
|
10
13
|
export declare const FileList: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & {
|
|
11
14
|
children?: import("react").ReactNode | undefined;
|
|
12
15
|
} & import("react").RefAttributes<HTMLOListElement>> & {
|
|
@@ -8,6 +8,9 @@ import { forwardRef } from 'react';
|
|
|
8
8
|
import { FileListItem } from './FileListItem';
|
|
9
9
|
export const FileListRoot = forwardRef(({ children, className, ...restProps }, ref) => (_jsx("ul", { ...restProps, className: clsx('ams-file-list', className), ref: ref, children: children })));
|
|
10
10
|
FileListRoot.displayName = 'FileList';
|
|
11
|
+
/**
|
|
12
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-file-list--docs File List docs at Amsterdam Design System}
|
|
13
|
+
*/
|
|
11
14
|
export const FileList = Object.assign(FileListRoot, {
|
|
12
15
|
Item: FileListItem,
|
|
13
16
|
});
|
package/dist/FileList/index.d.ts
CHANGED
package/dist/FileList/index.js
CHANGED
package/dist/Grid/Grid.d.ts
CHANGED
|
@@ -34,6 +34,9 @@ export type GridProps = {
|
|
|
34
34
|
/** The amount of space between rows. */
|
|
35
35
|
gapVertical?: GridGap;
|
|
36
36
|
} & (GridPaddingVerticalProp | GridPaddingTopAndBottomProps) & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
|
|
37
|
+
/**
|
|
38
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-layout-grid--docs Grid docs at Amsterdam Design System}
|
|
39
|
+
*/
|
|
37
40
|
export declare const Grid: import("react").ForwardRefExoticComponent<GridProps & import("react").RefAttributes<any>> & {
|
|
38
41
|
Cell: import("react").ForwardRefExoticComponent<import("./GridCell").GridCellProps & import("react").RefAttributes<unknown>>;
|
|
39
42
|
};
|
package/dist/Grid/Grid.js
CHANGED
|
@@ -12,4 +12,7 @@ export const gridPaddings = ['large', 'x-large', '2x-large'];
|
|
|
12
12
|
export const gridTags = ['article', 'aside', 'div', 'footer', 'header', 'main', 'nav', 'section'];
|
|
13
13
|
const GridRoot = forwardRef(({ as: Tag = 'div', children, className, gapVertical, paddingBottom, paddingTop, paddingVertical, ...restProps }, ref) => (_jsx(Tag, { ...restProps, className: clsx('ams-grid', gapVertical && `ams-grid--gap-vertical--${gapVertical}`, paddingClasses('grid', paddingBottom, paddingTop, paddingVertical), className), ref: ref, children: children })));
|
|
14
14
|
GridRoot.displayName = 'Grid';
|
|
15
|
+
/**
|
|
16
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-layout-grid--docs Grid docs at Amsterdam Design System}
|
|
17
|
+
*/
|
|
15
18
|
export const Grid = Object.assign(GridRoot, { Cell: GridCell });
|
package/dist/Grid/Grid.test.d.ts
CHANGED
package/dist/Grid/Grid.test.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license EUPL-1.2+
|
|
4
|
+
* Copyright Gemeente Amsterdam
|
|
5
|
+
*/
|
|
2
6
|
import { render, screen } from '@testing-library/react';
|
|
3
7
|
import { createRef } from 'react';
|
|
4
8
|
import { Grid, gridGaps, gridPaddings, gridTags } from './Grid';
|
package/dist/Grid/index.d.ts
CHANGED
package/dist/Grid/index.js
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
1
5
|
import type { GridPadding } from './Grid';
|
|
2
6
|
export declare const paddingClasses: (componentName: string, paddingBottom?: GridPadding, paddingTop?: GridPadding, paddingVertical?: GridPadding) => string[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license EUPL-1.2+
|
|
3
|
-
* Copyright (c) 2021 Robbert Broersma
|
|
4
3
|
* Copyright Gemeente Amsterdam
|
|
5
4
|
*/
|
|
6
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
@@ -12,6 +11,9 @@ export type HeadingProps = {
|
|
|
12
11
|
/** Uses larger or smaller text without changing its position in the heading hierarchy. */
|
|
13
12
|
size?: 'level-1' | 'level-2' | 'level-3' | 'level-4' | 'level-5' | 'level-6';
|
|
14
13
|
} & PropsWithChildren<HTMLAttributes<HTMLHeadingElement>>;
|
|
14
|
+
/**
|
|
15
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-text-heading--docs Heading docs at Amsterdam Design System}
|
|
16
|
+
*/
|
|
15
17
|
export declare const Heading: import("react").ForwardRefExoticComponent<{
|
|
16
18
|
/** Changes the text colour for readability on a dark background. */
|
|
17
19
|
color?: "inverse";
|
package/dist/Heading/Heading.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license EUPL-1.2+
|
|
4
|
+
* Copyright Gemeente Amsterdam
|
|
5
|
+
*/
|
|
2
6
|
/**
|
|
3
7
|
* @license EUPL-1.2+
|
|
4
8
|
* Copyright (c) 2021 Robbert Broersma
|
|
@@ -7,6 +11,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
11
|
import clsx from 'clsx';
|
|
8
12
|
import { forwardRef } from 'react';
|
|
9
13
|
import { getHeadingTag } from './getHeadingTag';
|
|
14
|
+
/**
|
|
15
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-text-heading--docs Heading docs at Amsterdam Design System}
|
|
16
|
+
*/
|
|
10
17
|
export const Heading = forwardRef(({ children, className, color, level, size, ...restProps }, ref) => {
|
|
11
18
|
const Tag = getHeadingTag(level);
|
|
12
19
|
const visualLevel = size ? size.slice(-1) : level;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license EUPL-1.2+
|
|
4
|
+
* Copyright Gemeente Amsterdam
|
|
5
|
+
*/
|
|
2
6
|
import { render, screen } from '@testing-library/react';
|
|
3
7
|
import { createRef } from 'react';
|
|
4
8
|
import { Heading } from './Heading';
|
package/dist/Heading/index.d.ts
CHANGED
package/dist/Heading/index.js
CHANGED
package/dist/Hint/Hint.test.d.ts
CHANGED
package/dist/Hint/Hint.test.js
CHANGED
package/dist/Hint/index.d.ts
CHANGED
package/dist/Hint/index.js
CHANGED
package/dist/Icon/Icon.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license EUPL-1.2+
|
|
3
|
-
* Copyright (c) 2021 Gemeente Utrecht
|
|
4
|
-
* Copyright (c) 2021 Robbert Broersma
|
|
5
3
|
* Copyright Gemeente Amsterdam
|
|
6
4
|
*/
|
|
7
5
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
@@ -17,6 +15,10 @@ export type IconProps = {
|
|
|
17
15
|
/** The component rendering the icon’s markup. */
|
|
18
16
|
svg: Function | ReactNode;
|
|
19
17
|
} & HTMLAttributes<HTMLSpanElement>;
|
|
18
|
+
/**
|
|
19
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-media-icon--docs Icon docs at Amsterdam Design System}
|
|
20
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/brand-assets-icons--docs Icons overview at Amsterdam Design System}
|
|
21
|
+
*/
|
|
20
22
|
export declare const Icon: import("react").ForwardRefExoticComponent<{
|
|
21
23
|
/** Changes the icon colour for readability on a dark background. */
|
|
22
24
|
color?: "inverse";
|
package/dist/Icon/Icon.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license EUPL-1.2+
|
|
4
|
+
* Copyright Gemeente Amsterdam
|
|
5
|
+
*/
|
|
2
6
|
/**
|
|
3
7
|
* @license EUPL-1.2+
|
|
4
8
|
* Copyright (c) 2021 Gemeente Utrecht
|
|
@@ -8,5 +12,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
8
12
|
import clsx from 'clsx';
|
|
9
13
|
import { forwardRef } from 'react';
|
|
10
14
|
export const iconSizes = ['small', 'large', 'heading-3', 'heading-4', 'heading-5', 'heading-6'];
|
|
15
|
+
/**
|
|
16
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-media-icon--docs Icon docs at Amsterdam Design System}
|
|
17
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/brand-assets-icons--docs Icons overview at Amsterdam Design System}
|
|
18
|
+
*/
|
|
11
19
|
export const Icon = forwardRef(({ className, color, size, square, svg, ...restProps }, ref) => (_jsx("span", { className: clsx('ams-icon', color && `ams-icon--${color}`, size && `ams-icon--${size}`, square && 'ams-icon--square', className), ref: ref, ...restProps, children: typeof svg === 'function' ? svg() : svg })));
|
|
12
20
|
Icon.displayName = 'Icon';
|
package/dist/Icon/Icon.test.d.ts
CHANGED
package/dist/Icon/Icon.test.js
CHANGED
|
@@ -1,50 +1,54 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @license EUPL-1.2+
|
|
4
|
+
* Copyright Gemeente Amsterdam
|
|
5
|
+
*/
|
|
6
|
+
import { WarningIcon } from '@amsterdam/design-system-react-icons';
|
|
3
7
|
import { render } from '@testing-library/react';
|
|
4
8
|
import { createRef } from 'react';
|
|
5
9
|
import { Icon, iconSizes } from './Icon';
|
|
6
10
|
import '@testing-library/jest-dom';
|
|
7
11
|
describe('Icon', () => {
|
|
8
12
|
it('renders a span element', () => {
|
|
9
|
-
const { container } = render(_jsx(Icon, { svg:
|
|
13
|
+
const { container } = render(_jsx(Icon, { svg: WarningIcon }));
|
|
10
14
|
const icon = container.querySelector('span:only-child');
|
|
11
15
|
expect(icon).toBeInTheDocument();
|
|
12
16
|
});
|
|
13
17
|
it('renders a design system BEM class name', () => {
|
|
14
|
-
const { container } = render(_jsx(Icon, { svg:
|
|
18
|
+
const { container } = render(_jsx(Icon, { svg: WarningIcon }));
|
|
15
19
|
const icon = container.querySelector(':only-child');
|
|
16
20
|
expect(icon).toHaveClass('ams-icon');
|
|
17
21
|
});
|
|
18
22
|
it('renders an svg child', () => {
|
|
19
|
-
const { container } = render(_jsx(Icon, { svg:
|
|
23
|
+
const { container } = render(_jsx(Icon, { svg: WarningIcon }));
|
|
20
24
|
const svg = container.querySelector(':only-child svg');
|
|
21
25
|
expect(svg).toBeInTheDocument();
|
|
22
26
|
});
|
|
23
27
|
iconSizes.forEach((size) => {
|
|
24
28
|
it(`renders the correct class name for a ‘${size}’ icon`, () => {
|
|
25
|
-
const { container } = render(_jsx(Icon, { size: size, svg:
|
|
29
|
+
const { container } = render(_jsx(Icon, { size: size, svg: WarningIcon }));
|
|
26
30
|
const icon = container.querySelector(':only-child');
|
|
27
31
|
expect(icon).toHaveClass(`ams-icon--${size}`);
|
|
28
32
|
});
|
|
29
33
|
});
|
|
30
34
|
it('renders the right square class', () => {
|
|
31
|
-
const { container } = render(_jsx(Icon, { square: true, svg:
|
|
35
|
+
const { container } = render(_jsx(Icon, { square: true, svg: WarningIcon }));
|
|
32
36
|
const icon = container.querySelector('span:only-child');
|
|
33
37
|
expect(icon).toHaveClass('ams-icon--square');
|
|
34
38
|
});
|
|
35
39
|
it('renders the class name for inverse color', () => {
|
|
36
|
-
const { container } = render(_jsx(Icon, { color: "inverse", svg:
|
|
40
|
+
const { container } = render(_jsx(Icon, { color: "inverse", svg: WarningIcon }));
|
|
37
41
|
const icon = container.querySelector('span:only-child');
|
|
38
42
|
expect(icon).toHaveClass('ams-icon--inverse');
|
|
39
43
|
});
|
|
40
44
|
it('renders an extra class name', () => {
|
|
41
|
-
const { container } = render(_jsx(Icon, { className: "extra", svg:
|
|
45
|
+
const { container } = render(_jsx(Icon, { className: "extra", svg: WarningIcon }));
|
|
42
46
|
const icon = container.querySelector(':only-child');
|
|
43
47
|
expect(icon).toHaveClass('ams-icon extra');
|
|
44
48
|
});
|
|
45
49
|
it('supports ForwardRef in React', () => {
|
|
46
50
|
const ref = createRef();
|
|
47
|
-
const { container } = render(_jsx(Icon, { ref: ref, svg:
|
|
51
|
+
const { container } = render(_jsx(Icon, { ref: ref, svg: WarningIcon }));
|
|
48
52
|
const icon = container.querySelector(':only-child');
|
|
49
53
|
expect(ref.current).toBe(icon);
|
|
50
54
|
});
|
package/dist/Icon/index.d.ts
CHANGED
package/dist/Icon/index.js
CHANGED
|
@@ -9,17 +9,20 @@ export type IconButtonProps = {
|
|
|
9
9
|
color?: 'contrast' | 'inverse';
|
|
10
10
|
/** The accessible text for the button. Will be announced by screen readers. Should describe the button’s action. */
|
|
11
11
|
label: string;
|
|
12
|
-
/** The size of the icon. */
|
|
12
|
+
/** The size of the icon. Match it to the text that the Icon Buttons aligns with. */
|
|
13
13
|
size?: IconProps['size'];
|
|
14
14
|
/** The component rendering the icon’s markup. */
|
|
15
15
|
svg?: IconProps['svg'];
|
|
16
16
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
17
|
+
/**
|
|
18
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-buttons-icon-button--docs Icon Button docs at Amsterdam Design System}
|
|
19
|
+
*/
|
|
17
20
|
export declare const IconButton: import("react").ForwardRefExoticComponent<{
|
|
18
21
|
/** Changes the text colour for readability on a light or dark background. */
|
|
19
22
|
color?: "contrast" | "inverse";
|
|
20
23
|
/** The accessible text for the button. Will be announced by screen readers. Should describe the button’s action. */
|
|
21
24
|
label: string;
|
|
22
|
-
/** The size of the icon. */
|
|
25
|
+
/** The size of the icon. Match it to the text that the Icon Buttons aligns with. */
|
|
23
26
|
size?: IconProps["size"];
|
|
24
27
|
/** The component rendering the icon’s markup. */
|
|
25
28
|
svg?: IconProps["svg"];
|
|
@@ -7,5 +7,8 @@ import { CloseIcon } from '@amsterdam/design-system-react-icons';
|
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { forwardRef } from 'react';
|
|
9
9
|
import { Icon } from '../Icon';
|
|
10
|
+
/**
|
|
11
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-buttons-icon-button--docs Icon Button docs at Amsterdam Design System}
|
|
12
|
+
*/
|
|
10
13
|
export const IconButton = forwardRef(({ className, color, label, size, svg = CloseIcon, type, ...restProps }, ref) => (_jsxs("button", { ...restProps, className: clsx('ams-icon-button', color && `ams-icon-button--${color}`, className), ref: ref, type: type || 'button', children: [_jsx("span", { className: "ams-visually-hidden", children: label }), _jsx(Icon, { size: size, square: true, svg: svg })] })));
|
|
11
14
|
IconButton.displayName = 'IconButton';
|