@amsterdam/design-system-react 0.15.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/README.md +1 -1
- package/dist/Accordion/Accordion.d.ts +3 -0
- package/dist/Accordion/Accordion.js +7 -1
- package/dist/Accordion/Accordion.test.d.ts +4 -0
- package/dist/Accordion/Accordion.test.js +23 -3
- package/dist/Accordion/AccordionSection.test.d.ts +4 -0
- package/dist/Accordion/AccordionSection.test.js +5 -1
- 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 +5 -1
- 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 +5 -1
- 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 +5 -1
- 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 +5 -1
- 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 +7 -4
- 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 +5 -1
- package/dist/Breadcrumb/BreadcrumbLink.test.d.ts +4 -0
- package/dist/Breadcrumb/BreadcrumbLink.test.js +5 -1
- 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 +15 -19
- package/dist/Breakout/BreakoutCell.d.ts +3 -1
- package/dist/Breakout/BreakoutCell.js +1 -0
- package/dist/Breakout/BreakoutCell.test.d.ts +4 -0
- package/dist/Breakout/BreakoutCell.test.js +24 -16
- 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 +12 -1
- package/dist/Button/index.d.ts +4 -0
- package/dist/Button/index.js +4 -0
- package/dist/Card/Card.d.ts +13 -0
- package/dist/Card/Card.js +11 -1
- package/dist/Card/Card.test.d.ts +4 -0
- package/dist/Card/Card.test.js +5 -1
- package/dist/Card/CardHeading.d.ts +11 -0
- package/dist/Card/CardHeading.js +10 -0
- package/dist/Card/CardHeading.test.d.ts +5 -0
- package/dist/Card/CardHeading.test.js +38 -0
- package/dist/Card/CardHeadingGroup.test.d.ts +4 -0
- package/dist/Card/CardHeadingGroup.test.js +5 -1
- package/dist/Card/CardImage.d.ts +7 -0
- package/dist/Card/CardImage.js +10 -0
- package/dist/Card/CardImage.test.d.ts +5 -0
- package/dist/{Footer/FooterSpotlight.test.js → Card/CardImage.test.js} +13 -9
- package/dist/Card/CardLink.test.d.ts +4 -0
- package/dist/Card/CardLink.test.js +5 -1
- 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 +5 -1
- 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 +12 -3
- 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 +7 -3
- package/dist/Column/Column.js +5 -1
- package/dist/Column/Column.test.d.ts +4 -0
- package/dist/Column/Column.test.js +14 -12
- 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 +5 -1
- 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 +5 -1
- package/dist/DescriptionList/DescriptionListDescription.test.d.ts +4 -0
- package/dist/DescriptionList/DescriptionListDescription.test.js +5 -1
- package/dist/DescriptionList/DescriptionListSection.test.d.ts +4 -0
- package/dist/DescriptionList/DescriptionListSection.test.js +5 -1
- package/dist/DescriptionList/DescriptionListTerm.test.d.ts +4 -0
- package/dist/DescriptionList/DescriptionListTerm.test.js +5 -1
- 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 +5 -1
- 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 +5 -1
- 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 +5 -1
- 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 +5 -1
- 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 +5 -1
- package/dist/Figure/FigureCaption.test.d.ts +4 -0
- package/dist/Figure/FigureCaption.test.js +5 -1
- 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 +5 -1
- 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 +5 -1
- package/dist/FileList/FileListItem.test.d.ts +4 -0
- package/dist/FileList/FileListItem.test.js +5 -1
- package/dist/FileList/index.d.ts +4 -0
- package/dist/FileList/index.js +4 -0
- package/dist/Grid/Grid.d.ts +11 -5
- package/dist/Grid/Grid.js +5 -0
- package/dist/Grid/Grid.test.d.ts +4 -0
- package/dist/Grid/Grid.test.js +17 -29
- package/dist/Grid/GridCell.test.d.ts +4 -0
- package/dist/Grid/GridCell.test.js +6 -8
- package/dist/Grid/index.d.ts +4 -0
- package/dist/Grid/index.js +4 -0
- package/dist/Grid/paddingClasses.d.ts +6 -2
- 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 +21 -11
- 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 +5 -1
- package/dist/Hint/index.d.ts +4 -0
- package/dist/Hint/index.js +4 -0
- package/dist/Icon/Icon.d.ts +5 -3
- package/dist/Icon/Icon.js +8 -0
- package/dist/Icon/Icon.test.d.ts +4 -0
- package/dist/Icon/Icon.test.js +15 -12
- 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 +4 -1
- package/dist/IconButton/IconButton.test.d.ts +4 -0
- package/dist/IconButton/IconButton.test.js +5 -1
- package/dist/IconButton/index.d.ts +4 -0
- package/dist/IconButton/index.js +4 -0
- package/dist/Image/Image.d.ts +7 -8
- package/dist/Image/Image.js +3 -0
- package/dist/Image/Image.test.d.ts +4 -0
- package/dist/Image/Image.test.js +5 -1
- 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 +5 -1
- 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 +5 -1
- package/dist/ImageSlider/ImageSliderScroller.test.d.ts +4 -0
- package/dist/ImageSlider/ImageSliderScroller.test.js +5 -1
- package/dist/ImageSlider/ImageSliderThumbnails.js +1 -1
- package/dist/ImageSlider/ImageSliderThumbnails.test.d.ts +4 -0
- package/dist/ImageSlider/ImageSliderThumbnails.test.js +5 -1
- 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 +5 -1
- 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 +7 -4
- package/dist/Label/index.d.ts +4 -0
- package/dist/Label/index.js +4 -0
- package/dist/Link/Link.d.ts +3 -6
- package/dist/Link/Link.js +4 -1
- package/dist/Link/Link.test.d.ts +4 -0
- package/dist/Link/Link.test.js +26 -29
- 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 +5 -1
- package/dist/LinkList/LinkListLink.js +2 -2
- package/dist/LinkList/LinkListLink.test.d.ts +4 -0
- package/dist/LinkList/LinkListLink.test.js +5 -1
- 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 +6 -3
- 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 +5 -1
- 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 +5 -1
- package/dist/OrderedList/OrderedListItem.test.d.ts +4 -0
- package/dist/OrderedList/OrderedListItem.test.js +5 -1
- 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 +5 -1
- package/dist/Overlap/index.d.ts +4 -0
- package/dist/Overlap/index.js +4 -0
- package/dist/Page/Page.d.ts +12 -0
- package/dist/Page/Page.js +12 -0
- package/dist/Page/Page.test.d.ts +5 -0
- package/dist/{MegaMenu/MegaMenu.test.js → Page/Page.test.js} +13 -9
- package/dist/Page/index.d.ts +6 -0
- package/dist/Page/index.js +5 -0
- package/dist/{Footer/Footer.d.ts → PageFooter/PageFooter.d.ts} +5 -2
- package/dist/PageFooter/PageFooter.js +20 -0
- package/dist/PageFooter/PageFooter.test.d.ts +5 -0
- package/dist/{Footer/Footer.test.js → PageFooter/PageFooter.test.js} +13 -9
- package/dist/{Footer/FooterMenu.d.ts → PageFooter/PageFooterMenu.d.ts} +2 -2
- package/dist/PageFooter/PageFooterMenu.js +9 -0
- package/dist/PageFooter/PageFooterMenu.test.d.ts +5 -0
- package/dist/{Footer/FooterMenu.test.js → PageFooter/PageFooterMenu.test.js} +13 -9
- package/dist/{Footer/FooterMenuLink.d.ts → PageFooter/PageFooterMenuLink.d.ts} +2 -2
- package/dist/PageFooter/PageFooterMenuLink.js +9 -0
- package/dist/PageFooter/PageFooterMenuLink.test.d.ts +5 -0
- package/dist/{Footer/FooterMenuLink.test.js → PageFooter/PageFooterMenuLink.test.js} +13 -9
- package/dist/{Footer/FooterSpotlight.d.ts → PageFooter/PageFooterSpotlight.d.ts} +2 -2
- package/dist/PageFooter/PageFooterSpotlight.js +9 -0
- package/dist/PageFooter/PageFooterSpotlight.test.d.ts +5 -0
- package/dist/{MegaMenu/MegaMenuListCategory.test.js → PageFooter/PageFooterSpotlight.test.js} +13 -9
- package/dist/PageFooter/index.d.ts +9 -0
- package/dist/PageFooter/index.js +5 -0
- package/dist/{Header/Header.d.ts → PageHeader/PageHeader.d.ts} +13 -6
- package/dist/PageHeader/PageHeader.js +35 -0
- package/dist/{Header/Header.test.d.ts → PageHeader/PageHeader.test.d.ts} +4 -0
- package/dist/{Header/Header.test.js → PageHeader/PageHeader.test.js} +47 -38
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.d.ts +6 -0
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.js +10 -0
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.test.d.ts +5 -0
- package/dist/{Header/HeaderGridCellNarrowWindowOnly.test.js → PageHeader/PageHeaderGridCellNarrowWindowOnly.test.js} +14 -10
- package/dist/PageHeader/PageHeaderMenuIcon.d.ts +6 -0
- package/dist/PageHeader/PageHeaderMenuIcon.js +2 -0
- package/dist/{Header/HeaderMenuLink.d.ts → PageHeader/PageHeaderMenuLink.d.ts} +6 -2
- package/dist/PageHeader/PageHeaderMenuLink.js +9 -0
- package/dist/PageHeader/PageHeaderMenuLink.test.d.ts +5 -0
- package/dist/{Header/HeaderMenuLink.test.js → PageHeader/PageHeaderMenuLink.test.js} +17 -13
- package/dist/PageHeader/index.d.ts +7 -0
- package/dist/PageHeader/index.js +5 -0
- package/dist/PageHeader/matchMedia.mock.d.ts +4 -0
- package/dist/{Header → 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 +6 -3
- 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 +5 -1
- 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 +5 -1
- 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 +5 -1
- 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 +7 -3
- 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 +7 -3
- package/dist/Row/Row.js +5 -1
- package/dist/Row/Row.test.d.ts +4 -0
- package/dist/Row/Row.test.js +14 -12
- package/dist/Row/index.d.ts +4 -0
- package/dist/Row/index.js +4 -0
- package/dist/SearchField/SearchField.d.ts +5 -0
- package/dist/SearchField/SearchField.js +3 -0
- package/dist/SearchField/SearchField.test.d.ts +4 -0
- package/dist/SearchField/SearchField.test.js +6 -3
- package/dist/SearchField/SearchFieldInput.test.d.ts +4 -0
- package/dist/SearchField/SearchFieldInput.test.js +6 -3
- 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 +5 -1
- package/dist/Select/SelectOption.test.d.ts +4 -0
- package/dist/Select/SelectOption.test.js +5 -1
- package/dist/Select/SelectOptionGroup.test.d.ts +4 -0
- package/dist/Select/SelectOptionGroup.test.js +5 -1
- 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 +5 -1
- package/dist/SkipLink/index.d.ts +4 -0
- package/dist/SkipLink/index.js +4 -0
- package/dist/Spotlight/Spotlight.d.ts +7 -2
- package/dist/Spotlight/Spotlight.js +4 -0
- package/dist/Spotlight/Spotlight.test.d.ts +4 -0
- package/dist/Spotlight/Spotlight.test.js +15 -9
- package/dist/Spotlight/index.d.ts +4 -0
- package/dist/Spotlight/index.js +4 -0
- package/dist/StandaloneLink/StandaloneLink.d.ts +20 -0
- package/dist/StandaloneLink/StandaloneLink.js +13 -0
- package/dist/StandaloneLink/StandaloneLink.test.d.ts +5 -0
- package/dist/StandaloneLink/StandaloneLink.test.js +44 -0
- package/dist/StandaloneLink/index.d.ts +6 -0
- package/dist/StandaloneLink/index.js +5 -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 +5 -1
- 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 +5 -1
- package/dist/Table/TableBody.test.d.ts +4 -0
- package/dist/Table/TableBody.test.js +5 -1
- 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 +5 -1
- package/dist/Table/TableCell.test.d.ts +4 -0
- package/dist/Table/TableCell.test.js +5 -1
- package/dist/Table/TableFooter.test.d.ts +4 -0
- package/dist/Table/TableFooter.test.js +5 -1
- package/dist/Table/TableHeader.test.d.ts +4 -0
- package/dist/Table/TableHeader.test.js +5 -1
- package/dist/Table/TableHeaderCell.test.d.ts +4 -0
- package/dist/Table/TableHeaderCell.test.js +5 -1
- package/dist/Table/TableRow.test.d.ts +4 -0
- package/dist/Table/TableRow.test.js +5 -1
- 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 +5 -1
- package/dist/TableOfContents/TableOfContentsLink.test.d.ts +4 -0
- package/dist/TableOfContents/TableOfContentsLink.test.js +5 -1
- package/dist/TableOfContents/TableOfContentsList.test.d.ts +4 -0
- package/dist/TableOfContents/TableOfContentsList.test.js +5 -1
- package/dist/TableOfContents/index.d.ts +4 -0
- package/dist/TableOfContents/index.js +4 -0
- package/dist/Tabs/Tabs.d.ts +9 -6
- package/dist/Tabs/Tabs.js +9 -6
- package/dist/Tabs/Tabs.test.d.ts +4 -0
- package/dist/Tabs/Tabs.test.js +25 -6
- package/dist/Tabs/TabsButton.d.ts +4 -4
- package/dist/Tabs/TabsButton.js +7 -4
- package/dist/Tabs/TabsButton.test.d.ts +4 -0
- package/dist/Tabs/TabsButton.test.js +24 -10
- package/dist/Tabs/TabsContext.d.ts +2 -7
- package/dist/Tabs/TabsContext.js +0 -1
- package/dist/Tabs/TabsList.js +1 -1
- package/dist/Tabs/TabsList.test.d.ts +4 -0
- package/dist/Tabs/TabsList.test.js +5 -1
- package/dist/Tabs/TabsPanel.d.ts +4 -4
- package/dist/Tabs/TabsPanel.js +4 -4
- package/dist/Tabs/TabsPanel.test.d.ts +4 -0
- package/dist/Tabs/TabsPanel.test.js +14 -12
- 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 +5 -1
- 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 +6 -3
- 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 +5 -1
- 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 +5 -1
- package/dist/UnorderedList/UnorderedListItem.test.d.ts +4 -0
- package/dist/UnorderedList/UnorderedListItem.test.js +5 -1
- package/dist/UnorderedList/index.d.ts +4 -0
- package/dist/UnorderedList/index.js +4 -0
- package/dist/common/accessibility.d.ts +9 -1
- 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 +1307 -1105
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +358 -197
- package/dist/index.esm.js +1306 -1102
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -15
- package/dist/Footer/Footer.js +0 -17
- package/dist/Footer/Footer.test.d.ts +0 -1
- package/dist/Footer/FooterMenu.js +0 -9
- package/dist/Footer/FooterMenu.test.d.ts +0 -1
- package/dist/Footer/FooterMenuLink.js +0 -9
- package/dist/Footer/FooterMenuLink.test.d.ts +0 -1
- package/dist/Footer/FooterSpotlight.js +0 -9
- package/dist/Footer/FooterSpotlight.test.d.ts +0 -1
- package/dist/Footer/index.d.ts +0 -5
- package/dist/Footer/index.js +0 -1
- package/dist/Header/Header.js +0 -31
- package/dist/Header/HeaderGridCellNarrowWindowOnly.d.ts +0 -2
- package/dist/Header/HeaderGridCellNarrowWindowOnly.js +0 -6
- package/dist/Header/HeaderGridCellNarrowWindowOnly.test.d.ts +0 -1
- package/dist/Header/HeaderMenuIcon.d.ts +0 -2
- package/dist/Header/HeaderMenuIcon.js +0 -2
- package/dist/Header/HeaderMenuLink.js +0 -5
- package/dist/Header/HeaderMenuLink.test.d.ts +0 -1
- package/dist/Header/index.d.ts +0 -3
- package/dist/Header/index.js +0 -1
- package/dist/Header/matchMedia.mock.d.ts +0 -0
- package/dist/MegaMenu/MegaMenu.d.ts +0 -14
- package/dist/MegaMenu/MegaMenu.js +0 -12
- package/dist/MegaMenu/MegaMenu.test.d.ts +0 -1
- package/dist/MegaMenu/MegaMenuListCategory.d.ts +0 -9
- package/dist/MegaMenu/MegaMenuListCategory.js +0 -9
- package/dist/MegaMenu/MegaMenuListCategory.test.d.ts +0 -1
- package/dist/MegaMenu/index.d.ts +0 -3
- package/dist/MegaMenu/index.js +0 -1
- package/dist/PageMenu/PageMenu.d.ts +0 -25
- package/dist/PageMenu/PageMenu.js +0 -12
- package/dist/PageMenu/PageMenu.test.d.ts +0 -1
- package/dist/PageMenu/PageMenu.test.js +0 -45
- package/dist/PageMenu/PageMenuLink.d.ts +0 -13
- package/dist/PageMenu/PageMenuLink.js +0 -10
- package/dist/PageMenu/PageMenuLink.test.d.ts +0 -1
- package/dist/PageMenu/PageMenuLink.test.js +0 -40
- package/dist/PageMenu/index.d.ts +0 -3
- package/dist/PageMenu/index.js +0 -1
- package/dist/Screen/Screen.d.ts +0 -21
- package/dist/Screen/Screen.js +0 -9
- package/dist/Screen/Screen.test.d.ts +0 -1
- package/dist/Screen/Screen.test.js +0 -40
- package/dist/Screen/index.d.ts +0 -2
- package/dist/Screen/index.js +0 -1
- package/dist/TopTaskLink/TopTaskLink.d.ts +0 -17
- package/dist/TopTaskLink/TopTaskLink.js +0 -9
- package/dist/TopTaskLink/TopTaskLink.test.d.ts +0 -1
- package/dist/TopTaskLink/TopTaskLink.test.js +0 -42
- package/dist/TopTaskLink/index.d.ts +0 -1
- package/dist/TopTaskLink/index.js +0 -1
|
@@ -1,9 +1,13 @@
|
|
|
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 } from '@testing-library/react';
|
|
3
7
|
import { createRef } from 'react';
|
|
4
8
|
import { Breakout } from './Breakout';
|
|
9
|
+
import { gridGaps, gridPaddings } from '../Grid/Grid';
|
|
5
10
|
import '@testing-library/jest-dom';
|
|
6
|
-
const paddingSizes = ['small', 'medium', 'large'];
|
|
7
11
|
describe('Breakout', () => {
|
|
8
12
|
it('renders', () => {
|
|
9
13
|
const { container } = render(_jsx(Breakout, {}));
|
|
@@ -16,41 +20,33 @@ describe('Breakout', () => {
|
|
|
16
20
|
const component = container.querySelector(':only-child');
|
|
17
21
|
expect(component).toHaveClass('ams-breakout');
|
|
18
22
|
});
|
|
19
|
-
it('renders an
|
|
23
|
+
it('renders an extra class name', () => {
|
|
20
24
|
const { container } = render(_jsx(Breakout, { className: "extra" }));
|
|
21
25
|
const component = container.querySelector(':only-child');
|
|
22
26
|
expect(component).toHaveClass('ams-breakout extra');
|
|
23
27
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const { container } = render(_jsx(Breakout, { gapVertical: "small" }));
|
|
31
|
-
const component = container.querySelector(':only-child');
|
|
32
|
-
expect(component).toHaveClass('ams-breakout--gap-vertical--small');
|
|
33
|
-
});
|
|
34
|
-
it(`renders the correct class name for a large gap`, () => {
|
|
35
|
-
const { container } = render(_jsx(Breakout, { gapVertical: "large" }));
|
|
36
|
-
const component = container.querySelector(':only-child');
|
|
37
|
-
expect(component).toHaveClass('ams-breakout--gap-vertical--large');
|
|
28
|
+
gridGaps.forEach((size) => {
|
|
29
|
+
it(`renders the correct class name for a ${size} vertical gap`, () => {
|
|
30
|
+
const { container } = render(_jsx(Breakout, { gapVertical: size }));
|
|
31
|
+
const component = container.querySelector(':only-child');
|
|
32
|
+
expect(component).toHaveClass(`ams-breakout--gap-vertical--${size}`);
|
|
33
|
+
});
|
|
38
34
|
});
|
|
39
|
-
|
|
35
|
+
gridPaddings.forEach((size) => {
|
|
40
36
|
it(`renders the correct class name for a ${size} bottom padding`, () => {
|
|
41
37
|
const { container } = render(_jsx(Breakout, { paddingBottom: size }));
|
|
42
38
|
const component = container.querySelector(':only-child');
|
|
43
39
|
expect(component).toHaveClass(`ams-breakout--padding-bottom--${size}`);
|
|
44
40
|
});
|
|
45
41
|
});
|
|
46
|
-
|
|
42
|
+
gridPaddings.forEach((size) => {
|
|
47
43
|
it(`renders the correct class name for a ${size} top padding`, () => {
|
|
48
44
|
const { container } = render(_jsx(Breakout, { paddingTop: size }));
|
|
49
45
|
const component = container.querySelector(':only-child');
|
|
50
46
|
expect(component).toHaveClass(`ams-breakout--padding-top--${size}`);
|
|
51
47
|
});
|
|
52
48
|
});
|
|
53
|
-
|
|
49
|
+
gridPaddings.forEach((size) => {
|
|
54
50
|
it(`renders the correct class name for a ${size} vertical padding`, () => {
|
|
55
51
|
const { container } = render(_jsx(Breakout, { paddingVertical: size }));
|
|
56
52
|
const component = container.querySelector(':only-child');
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
6
|
import type { BreakoutRowNumber, BreakoutRowNumbers } from './Breakout';
|
|
7
7
|
import type { GridColumnNumber, GridColumnNumbers } from '../Grid/Grid';
|
|
8
|
+
export declare const breakoutCellTags: readonly ["article", "div", "section"];
|
|
9
|
+
type BreakoutCellTag = (typeof breakoutCellTags)[number];
|
|
8
10
|
type BreakoutCellSpanAllProp = {
|
|
9
11
|
/** Lets the cell span the full width of all grid variants. */
|
|
10
12
|
colSpan: 'all';
|
|
@@ -29,7 +31,7 @@ type BreakoutCellRowSpanAndStartProps = {
|
|
|
29
31
|
};
|
|
30
32
|
export type BreakoutCellProps = {
|
|
31
33
|
/** The HTML element to use. */
|
|
32
|
-
as?:
|
|
34
|
+
as?: BreakoutCellTag;
|
|
33
35
|
} & (BreakoutCellSpanAllProp | BreakoutCellSpanAndStartProps) & BreakoutCellRowSpanAndStartProps & PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
34
36
|
export declare const BreakoutCell: import("react").ForwardRefExoticComponent<BreakoutCellProps & import("react").RefAttributes<any>>;
|
|
35
37
|
export {};
|
|
@@ -6,5 +6,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
8
|
import { breakoutCellClasses } from './breakoutCellClasses';
|
|
9
|
+
export const breakoutCellTags = ['article', 'div', 'section'];
|
|
9
10
|
export const BreakoutCell = forwardRef(({ as: Tag = 'div', children, className, colSpan, colStart, has, rowSpan, rowStart, ...restProps }, ref) => (_jsx(Tag, { ...restProps, className: clsx('ams-breakout__cell', breakoutCellClasses(colSpan, colStart, rowSpan, rowStart), has && `ams-breakout__cell--has-${has}`, className), ref: ref, children: children })));
|
|
10
11
|
BreakoutCell.displayName = 'Breakout.Cell';
|
|
@@ -1,8 +1,14 @@
|
|
|
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 { Breakout } from './Breakout';
|
|
5
9
|
import '@testing-library/jest-dom';
|
|
10
|
+
import { breakoutCellTags } from './BreakoutCell';
|
|
11
|
+
import { ariaRoleForTag } from '../common/accessibility';
|
|
6
12
|
describe('Breakout cell', () => {
|
|
7
13
|
it('renders', () => {
|
|
8
14
|
const { container } = render(_jsx(Breakout.Cell, {}));
|
|
@@ -15,11 +21,18 @@ describe('Breakout cell', () => {
|
|
|
15
21
|
const component = container.querySelector(':only-child');
|
|
16
22
|
expect(component).toHaveClass('ams-breakout__cell');
|
|
17
23
|
});
|
|
18
|
-
it('renders an
|
|
24
|
+
it('renders an extra class name', () => {
|
|
19
25
|
const { container } = render(_jsx(Breakout.Cell, { className: "extra" }));
|
|
20
26
|
const component = container.querySelector(':only-child');
|
|
21
27
|
expect(component).toHaveClass('ams-breakout__cell extra');
|
|
22
28
|
});
|
|
29
|
+
breakoutCellTags.forEach((tag) => {
|
|
30
|
+
it(`renders with a custom ${tag} tag`, () => {
|
|
31
|
+
const { container } = render(_jsx(Breakout.Cell, { "aria-label": tag === 'section' ? 'Accessible name' : undefined, as: tag }));
|
|
32
|
+
const component = tag === 'div' ? container.querySelector(tag) : screen.getByRole(ariaRoleForTag[tag]);
|
|
33
|
+
expect(component).toBeInTheDocument();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
23
36
|
it('supports ForwardRef in React', () => {
|
|
24
37
|
const ref = createRef();
|
|
25
38
|
const { container } = render(_jsx(Breakout.Cell, { ref: ref }));
|
|
@@ -102,19 +115,14 @@ describe('Breakout cell', () => {
|
|
|
102
115
|
const component = container.querySelector(':only-child');
|
|
103
116
|
expect(component).toHaveClass('ams-breakout__cell--row-span-2 ams-breakout__cell--row-span-3-medium ams-breakout__cell--row-span-4-wide ams-breakout__cell--row-start-1 ams-breakout__cell--row-start-2-medium ams-breakout__cell--row-start-3-wide');
|
|
104
117
|
});
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
116
|
-
it('renders a custom tag', () => {
|
|
117
|
-
render(_jsx(Breakout.Cell, { as: "article" }));
|
|
118
|
-
const cell = screen.getByRole('article');
|
|
119
|
-
expect(cell).toBeInTheDocument();
|
|
118
|
+
it(`renders the correct class if it has a Figure`, () => {
|
|
119
|
+
const { container } = render(_jsx(Breakout.Cell, { has: "figure" }));
|
|
120
|
+
const component = container.querySelector(':only-child');
|
|
121
|
+
expect(component).toHaveClass(`ams-breakout__cell--has-figure`);
|
|
122
|
+
});
|
|
123
|
+
it(`renders the correct class if it has a Spotlight`, () => {
|
|
124
|
+
const { container } = render(_jsx(Breakout.Cell, { colSpan: "all", has: "spotlight" }));
|
|
125
|
+
const component = container.querySelector(':only-child');
|
|
126
|
+
expect(component).toHaveClass(`ams-breakout__cell--has-spotlight`);
|
|
127
|
+
});
|
|
120
128
|
});
|
package/dist/Breakout/index.d.ts
CHANGED
package/dist/Breakout/index.js
CHANGED
package/dist/Button/Button.d.ts
CHANGED
|
@@ -27,5 +27,8 @@ export type ButtonProps = {
|
|
|
27
27
|
/** The level of prominence. Use a primary button only once per page or section. */
|
|
28
28
|
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
29
29
|
} & (IconButtonProps | TextButtonProps) & PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
30
|
+
/**
|
|
31
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-buttons-button--docs Button docs at Amsterdam Design System}
|
|
32
|
+
*/
|
|
30
33
|
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
31
34
|
export {};
|
package/dist/Button/Button.js
CHANGED
|
@@ -6,5 +6,8 @@ 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 { Icon } from '../Icon';
|
|
9
|
+
/**
|
|
10
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-buttons-button--docs Button docs at Amsterdam Design System}
|
|
11
|
+
*/
|
|
9
12
|
export const Button = forwardRef(({ children, className, disabled, icon, iconBefore, iconOnly, type, variant = 'primary', ...restProps }, ref) => (_jsxs("button", { ...restProps, className: clsx('ams-button', `ams-button--${variant}`, icon && iconOnly && `ams-button--icon-only`, className), disabled: disabled, ref: ref, type: type || 'button', children: [icon && (iconBefore || iconOnly) && _jsx(Icon, { square: iconOnly, svg: icon }), icon && iconOnly ? _jsx("span", { className: "ams-visually-hidden", children: children }) : children, icon && !iconBefore && !iconOnly && _jsx(Icon, { svg: icon })] })));
|
|
10
13
|
Button.displayName = 'Button';
|
|
@@ -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 { CloseIcon } from '@amsterdam/design-system-react-icons';
|
|
3
7
|
import { render, screen } from '@testing-library/react';
|
|
4
8
|
import '@testing-library/jest-dom';
|
|
@@ -13,7 +17,14 @@ describe('Button', () => {
|
|
|
13
17
|
expect(button).toBeInTheDocument();
|
|
14
18
|
expect(button).toBeVisible();
|
|
15
19
|
});
|
|
16
|
-
it('renders
|
|
20
|
+
it('renders a design system BEM class name', () => {
|
|
21
|
+
render(_jsx(Button, { children: "Click me!" }));
|
|
22
|
+
const button = screen.getByRole('button', {
|
|
23
|
+
name: 'Click me!',
|
|
24
|
+
});
|
|
25
|
+
expect(button).toHaveClass('ams-button');
|
|
26
|
+
});
|
|
27
|
+
it('renders an extra class name', () => {
|
|
17
28
|
render(_jsx(Button, { className: "extra", children: "Click me!" }));
|
|
18
29
|
const button = screen.getByRole('button', {
|
|
19
30
|
name: 'Click me!',
|
package/dist/Button/index.d.ts
CHANGED
package/dist/Button/index.js
CHANGED
package/dist/Card/Card.d.ts
CHANGED
|
@@ -4,14 +4,27 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
6
|
export type CardProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
7
|
+
/**
|
|
8
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-navigation-card--docs Card docs at Amsterdam Design System}
|
|
9
|
+
*/
|
|
7
10
|
export declare const Card: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
|
|
8
11
|
children?: import("react").ReactNode | undefined;
|
|
9
12
|
} & import("react").RefAttributes<HTMLElement>> & {
|
|
13
|
+
Heading: import("react").ForwardRefExoticComponent<{
|
|
14
|
+
color?: "inverse";
|
|
15
|
+
level: 1 | 2 | 3 | 4;
|
|
16
|
+
size?: "level-1" | "level-2" | "level-3" | "level-4" | "level-5" | "level-6";
|
|
17
|
+
} & HTMLAttributes<HTMLHeadingElement> & {
|
|
18
|
+
children?: import("react").ReactNode | undefined;
|
|
19
|
+
} & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
10
20
|
HeadingGroup: import("react").ForwardRefExoticComponent<{
|
|
11
21
|
tagline: string;
|
|
12
22
|
} & HTMLAttributes<HTMLElement> & {
|
|
13
23
|
children?: import("react").ReactNode | undefined;
|
|
14
24
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
25
|
+
Image: import("react").ForwardRefExoticComponent<{
|
|
26
|
+
alt: string;
|
|
27
|
+
} & import("../common/types").AspectRatioProps & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "children"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
15
28
|
Link: import("react").ForwardRefExoticComponent<import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
16
29
|
children?: import("react").ReactNode | undefined;
|
|
17
30
|
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
package/dist/Card/Card.js
CHANGED
|
@@ -5,8 +5,18 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
*/
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
|
+
import { CardHeading } from './CardHeading';
|
|
8
9
|
import { CardHeadingGroup } from './CardHeadingGroup';
|
|
10
|
+
import { CardImage } from './CardImage';
|
|
9
11
|
import { CardLink } from './CardLink';
|
|
10
12
|
const CardRoot = forwardRef(({ children, className, ...restProps }, ref) => (_jsx("article", { ...restProps, className: clsx('ams-card', className), ref: ref, children: children })));
|
|
11
13
|
CardRoot.displayName = 'Card';
|
|
12
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-navigation-card--docs Card docs at Amsterdam Design System}
|
|
16
|
+
*/
|
|
17
|
+
export const Card = Object.assign(CardRoot, {
|
|
18
|
+
Heading: CardHeading,
|
|
19
|
+
HeadingGroup: CardHeadingGroup,
|
|
20
|
+
Image: CardImage,
|
|
21
|
+
Link: CardLink,
|
|
22
|
+
});
|
package/dist/Card/Card.test.d.ts
CHANGED
package/dist/Card/Card.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 { Card } from './Card';
|
|
@@ -15,7 +19,7 @@ describe('Card', () => {
|
|
|
15
19
|
const component = screen.getByRole('article');
|
|
16
20
|
expect(component).toHaveClass('ams-card');
|
|
17
21
|
});
|
|
18
|
-
it('renders an
|
|
22
|
+
it('renders an extra class name', () => {
|
|
19
23
|
render(_jsx(Card, { className: "extra" }));
|
|
20
24
|
const component = screen.getByRole('article');
|
|
21
25
|
expect(component).toHaveClass('ams-card extra');
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
export declare const CardHeading: import("react").ForwardRefExoticComponent<{
|
|
6
|
+
color?: "inverse";
|
|
7
|
+
level: 1 | 2 | 3 | 4;
|
|
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
|
+
} & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license EUPL-1.2+
|
|
4
|
+
* Copyright Gemeente Amsterdam
|
|
5
|
+
*/
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import { forwardRef } from 'react';
|
|
8
|
+
import { Heading } from '../Heading';
|
|
9
|
+
export const CardHeading = forwardRef(({ children, className, size = 'level-4', ...restProps }, ref) => (_jsx(Heading, { ...restProps, className: clsx('ams-card__heading', className), ref: ref, size: size, children: children })));
|
|
10
|
+
CardHeading.displayName = 'Card.Heading';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license EUPL-1.2+
|
|
4
|
+
* Copyright Gemeente Amsterdam
|
|
5
|
+
*/
|
|
6
|
+
import { render, screen } from '@testing-library/react';
|
|
7
|
+
import { createRef } from 'react';
|
|
8
|
+
import { CardHeading } from './CardHeading';
|
|
9
|
+
import '@testing-library/jest-dom';
|
|
10
|
+
describe('Card Heading', () => {
|
|
11
|
+
it('renders', () => {
|
|
12
|
+
render(_jsx(CardHeading, { level: 1 }));
|
|
13
|
+
const component = screen.getByRole('heading');
|
|
14
|
+
expect(component).toBeInTheDocument();
|
|
15
|
+
expect(component).toBeVisible();
|
|
16
|
+
});
|
|
17
|
+
it('renders a design system BEM class name', () => {
|
|
18
|
+
render(_jsx(CardHeading, { level: 2 }));
|
|
19
|
+
const component = screen.getByRole('heading');
|
|
20
|
+
expect(component).toHaveClass('ams-card__heading');
|
|
21
|
+
});
|
|
22
|
+
it('renders an extra class name', () => {
|
|
23
|
+
render(_jsx(CardHeading, { className: "extra", level: 3 }));
|
|
24
|
+
const component = screen.getByRole('heading');
|
|
25
|
+
expect(component).toHaveClass('ams-card__heading extra');
|
|
26
|
+
});
|
|
27
|
+
it('renders the correct size level class', () => {
|
|
28
|
+
render(_jsx(CardHeading, { level: 4, size: "level-1", children: "Size level 1" }));
|
|
29
|
+
const component = screen.getByRole('heading');
|
|
30
|
+
expect(component).toHaveClass('ams-heading--1');
|
|
31
|
+
});
|
|
32
|
+
it('supports ForwardRef in React', () => {
|
|
33
|
+
const ref = createRef();
|
|
34
|
+
render(_jsx(CardHeading, { level: 4, ref: ref }));
|
|
35
|
+
const component = screen.getByRole('heading');
|
|
36
|
+
expect(ref.current).toBe(component);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -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 { CardHeadingGroup } from './CardHeadingGroup';
|
|
@@ -15,7 +19,7 @@ describe('Card heading group', () => {
|
|
|
15
19
|
const component = container.querySelector(':only-child');
|
|
16
20
|
expect(component).toHaveClass('ams-card__heading-group');
|
|
17
21
|
});
|
|
18
|
-
it('renders an
|
|
22
|
+
it('renders an extra class name', () => {
|
|
19
23
|
const { container } = render(_jsx(CardHeadingGroup, { className: "extra", tagline: "test" }));
|
|
20
24
|
const component = container.querySelector(':only-child');
|
|
21
25
|
expect(component).toHaveClass('ams-card__heading-group extra');
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
export declare const CardImage: import("react").ForwardRefExoticComponent<{
|
|
6
|
+
alt: string;
|
|
7
|
+
} & import("../common/types").AspectRatioProps & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "children"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license EUPL-1.2+
|
|
4
|
+
* Copyright Gemeente Amsterdam
|
|
5
|
+
*/
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import { forwardRef } from 'react';
|
|
8
|
+
import { Image } from '../Image';
|
|
9
|
+
export const CardImage = forwardRef(({ className, ...restProps }, ref) => (_jsx(Image, { ...restProps, className: clsx('ams-card__image', className), ref: ref })));
|
|
10
|
+
CardImage.displayName = 'Card.Image';
|
|
@@ -1,28 +1,32 @@
|
|
|
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 } from '@testing-library/react';
|
|
3
7
|
import { createRef } from 'react';
|
|
4
|
-
import {
|
|
8
|
+
import { CardImage } from './CardImage';
|
|
5
9
|
import '@testing-library/jest-dom';
|
|
6
|
-
describe('
|
|
10
|
+
describe('Card Image', () => {
|
|
7
11
|
it('renders', () => {
|
|
8
|
-
const { container } = render(_jsx(
|
|
12
|
+
const { container } = render(_jsx(CardImage, { alt: "" }));
|
|
9
13
|
const component = container.querySelector(':only-child');
|
|
10
14
|
expect(component).toBeInTheDocument();
|
|
11
15
|
expect(component).toBeVisible();
|
|
12
16
|
});
|
|
13
17
|
it('renders a design system BEM class name', () => {
|
|
14
|
-
const { container } = render(_jsx(
|
|
18
|
+
const { container } = render(_jsx(CardImage, { alt: "" }));
|
|
15
19
|
const component = container.querySelector(':only-child');
|
|
16
|
-
expect(component).toHaveClass('ams-
|
|
20
|
+
expect(component).toHaveClass('ams-card__image');
|
|
17
21
|
});
|
|
18
|
-
it('renders an
|
|
19
|
-
const { container } = render(_jsx(
|
|
22
|
+
it('renders an extra class name', () => {
|
|
23
|
+
const { container } = render(_jsx(CardImage, { alt: "", className: "extra" }));
|
|
20
24
|
const component = container.querySelector(':only-child');
|
|
21
|
-
expect(component).toHaveClass('ams-
|
|
25
|
+
expect(component).toHaveClass('ams-card__image extra');
|
|
22
26
|
});
|
|
23
27
|
it('supports ForwardRef in React', () => {
|
|
24
28
|
const ref = createRef();
|
|
25
|
-
const { container } = render(_jsx(
|
|
29
|
+
const { container } = render(_jsx(CardImage, { alt: "", ref: ref }));
|
|
26
30
|
const component = container.querySelector(':only-child');
|
|
27
31
|
expect(ref.current).toBe(component);
|
|
28
32
|
});
|
|
@@ -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 { CardLink } from './CardLink';
|
|
@@ -15,7 +19,7 @@ describe('Card link', () => {
|
|
|
15
19
|
const component = screen.getByRole('link');
|
|
16
20
|
expect(component).toHaveClass('ams-card__link');
|
|
17
21
|
});
|
|
18
|
-
it('renders an
|
|
22
|
+
it('renders an extra class name', () => {
|
|
19
23
|
render(_jsx(CardLink, { className: "extra", href: "/" }));
|
|
20
24
|
const component = screen.getByRole('link');
|
|
21
25
|
expect(component).toHaveClass('ams-card__link extra');
|
package/dist/Card/index.d.ts
CHANGED
package/dist/Card/index.js
CHANGED
|
@@ -9,6 +9,9 @@ export type CharacterCountProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
9
9
|
/** The maximum length of the field’s value. */
|
|
10
10
|
maxLength: number;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-character-count--docs Character Count docs at Amsterdam Design System}
|
|
14
|
+
*/
|
|
12
15
|
export declare const CharacterCount: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
13
16
|
/** The current length of the field’s value. */
|
|
14
17
|
length: number;
|
|
@@ -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-character-count--docs Character Count docs at Amsterdam Design System}
|
|
10
|
+
*/
|
|
8
11
|
export const CharacterCount = forwardRef(({ className, length, maxLength, ...restProps }, ref) => (_jsx("div", { ...restProps, className: clsx('ams-character-count', length > maxLength && 'ams-character-count--error', className), ref: ref, role: "status", children: `${length} van ${maxLength} tekens` })));
|
|
9
12
|
CharacterCount.displayName = 'CharacterCount';
|
|
@@ -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 { CharacterCount } from './CharacterCount';
|
|
@@ -15,7 +19,7 @@ describe('Character count', () => {
|
|
|
15
19
|
const component = screen.getByRole('status');
|
|
16
20
|
expect(component).toHaveClass('ams-character-count');
|
|
17
21
|
});
|
|
18
|
-
it('renders an
|
|
22
|
+
it('renders an extra class name', () => {
|
|
19
23
|
render(_jsx(CharacterCount, { className: "extra", length: 10, maxLength: 100 }));
|
|
20
24
|
const component = screen.getByRole('status');
|
|
21
25
|
expect(component).toHaveClass('ams-character-count extra');
|
|
@@ -2,18 +2,25 @@
|
|
|
2
2
|
* @license EUPL-1.2+
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
|
-
import type { InputHTMLAttributes, PropsWithChildren } from 'react';
|
|
5
|
+
import type { InputHTMLAttributes, PropsWithChildren, ReactNode } from 'react';
|
|
6
6
|
export type CheckboxProps = {
|
|
7
|
+
/** An icon to display instead of the default icon. */
|
|
8
|
+
icon?: ReactNode;
|
|
7
9
|
/** Allows being neither checked nor unchecked. */
|
|
8
10
|
indeterminate?: boolean;
|
|
9
11
|
/** Whether the value fails a validation rule. */
|
|
10
12
|
invalid?: boolean;
|
|
11
13
|
} & PropsWithChildren<Omit<InputHTMLAttributes<HTMLInputElement>, 'aria-invalid' | 'type'>>;
|
|
14
|
+
/**
|
|
15
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-checkbox--docs Checkbox docs at Amsterdam Design System}
|
|
16
|
+
*/
|
|
12
17
|
export declare const Checkbox: import("react").ForwardRefExoticComponent<{
|
|
18
|
+
/** An icon to display instead of the default icon. */
|
|
19
|
+
icon?: ReactNode;
|
|
13
20
|
/** Allows being neither checked nor unchecked. */
|
|
14
21
|
indeterminate?: boolean;
|
|
15
22
|
/** Whether the value fails a validation rule. */
|
|
16
23
|
invalid?: boolean;
|
|
17
24
|
} & Omit<InputHTMLAttributes<HTMLInputElement>, "aria-invalid" | "type"> & {
|
|
18
|
-
children?:
|
|
25
|
+
children?: ReactNode | undefined;
|
|
19
26
|
} & import("react").RefAttributes<HTMLInputElement>>;
|