@amsterdam/design-system-react 1.1.0 → 2.0.1
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 +7 -7
- package/dist/Accordion/Accordion.js +2 -6
- package/dist/Accordion/Accordion.test.js +4 -4
- package/dist/Accordion/AccordionContext.d.ts +1 -2
- package/dist/Accordion/AccordionContext.js +3 -2
- package/dist/Accordion/AccordionSection.d.ts +5 -5
- package/dist/Accordion/AccordionSection.js +6 -9
- package/dist/Accordion/AccordionSection.test.js +18 -5
- package/dist/ActionGroup/ActionGroup.js +1 -5
- package/dist/Alert/Alert.d.ts +16 -4
- package/dist/Alert/Alert.js +3 -7
- package/dist/Alert/Alert.test.js +24 -13
- package/dist/Avatar/Avatar.js +1 -5
- package/dist/Avatar/Avatar.test.js +2 -1
- package/dist/Badge/Badge.d.ts +4 -4
- package/dist/Badge/Badge.js +1 -5
- package/dist/Blockquote/Blockquote.d.ts +5 -5
- package/dist/Blockquote/Blockquote.js +1 -5
- package/dist/Breadcrumb/Breadcrumb.js +0 -4
- package/dist/Breadcrumb/Breadcrumb.test.js +1 -1
- package/dist/Breadcrumb/BreadcrumbLink.js +0 -4
- package/dist/Breakout/Breakout.js +2 -6
- package/dist/Breakout/Breakout.test.js +1 -1
- package/dist/Breakout/BreakoutCell.d.ts +3 -3
- package/dist/Breakout/BreakoutCell.js +1 -5
- package/dist/Breakout/BreakoutCell.test.js +2 -2
- package/dist/Button/Button.d.ts +4 -4
- package/dist/Button/Button.js +1 -5
- package/dist/CallToActionLink/CallToActionLink.d.ts +12 -0
- package/dist/CallToActionLink/CallToActionLink.js +8 -0
- package/dist/CallToActionLink/CallToActionLink.test.d.ts +5 -0
- package/dist/CallToActionLink/CallToActionLink.test.js +33 -0
- package/dist/CallToActionLink/index.d.ts +6 -0
- package/dist/CallToActionLink/index.js +5 -0
- package/dist/Card/Card.d.ts +8 -8
- package/dist/Card/Card.js +1 -5
- package/dist/Card/CardHeading.d.ts +3 -3
- package/dist/Card/CardHeading.js +2 -6
- package/dist/Card/CardHeading.test.js +1 -1
- package/dist/Card/CardHeadingGroup.d.ts +5 -5
- package/dist/Card/CardHeadingGroup.js +1 -5
- package/dist/Card/CardImage.d.ts +2 -2
- package/dist/Card/CardImage.js +1 -5
- package/dist/Card/CardLink.js +1 -5
- package/dist/CharacterCount/CharacterCount.d.ts +4 -4
- package/dist/CharacterCount/CharacterCount.js +1 -5
- package/dist/Checkbox/Checkbox.d.ts +15 -9
- package/dist/Checkbox/Checkbox.js +4 -8
- package/dist/Checkbox/Checkbox.test.js +9 -0
- package/dist/Column/Column.d.ts +5 -5
- package/dist/Column/Column.js +1 -5
- package/dist/Column/Column.test.js +1 -1
- package/dist/DateInput/DateInput.d.ts +4 -4
- package/dist/DateInput/DateInput.js +1 -5
- package/dist/DescriptionList/DescriptionList.d.ts +5 -5
- package/dist/DescriptionList/DescriptionList.js +1 -5
- package/dist/DescriptionList/DescriptionListDescription.js +1 -5
- package/dist/DescriptionList/DescriptionListSection.js +1 -5
- package/dist/DescriptionList/DescriptionListTerm.js +1 -5
- package/dist/DescriptionList/index.d.ts +1 -1
- package/dist/Dialog/Dialog.d.ts +6 -6
- package/dist/Dialog/Dialog.js +2 -6
- package/dist/ErrorMessage/ErrorMessage.d.ts +11 -4
- package/dist/ErrorMessage/ErrorMessage.js +2 -6
- package/dist/Field/Field.d.ts +5 -5
- package/dist/Field/Field.js +1 -5
- package/dist/FieldSet/FieldSet.d.ts +7 -7
- package/dist/FieldSet/FieldSet.js +1 -5
- package/dist/Figure/Figure.d.ts +3 -3
- package/dist/Figure/Figure.js +1 -5
- package/dist/Figure/FigureCaption.d.ts +5 -5
- package/dist/Figure/FigureCaption.js +1 -5
- package/dist/FileInput/FileInput.js +1 -5
- package/dist/FileList/FileList.d.ts +3 -3
- package/dist/FileList/FileList.js +1 -5
- package/dist/FileList/FileListItem.d.ts +4 -4
- package/dist/FileList/FileListItem.js +2 -6
- package/dist/Grid/Grid.d.ts +2 -2
- package/dist/Grid/Grid.js +1 -5
- package/dist/Grid/Grid.test.js +1 -1
- package/dist/Grid/GridCell.d.ts +2 -2
- package/dist/Grid/GridCell.js +1 -5
- package/dist/Grid/GridCell.test.js +1 -1
- package/dist/Heading/Heading.d.ts +18 -7
- package/dist/Heading/Heading.js +1 -10
- package/dist/Heading/Heading.test.js +1 -3
- package/dist/Hint/Hint.d.ts +3 -3
- package/dist/Hint/Hint.js +1 -5
- package/dist/Icon/Icon.d.ts +15 -3
- package/dist/Icon/Icon.js +14 -13
- package/dist/Icon/Icon.test.js +5 -0
- package/dist/IconButton/IconButton.js +1 -5
- package/dist/Image/Image.d.ts +4 -4
- package/dist/Image/Image.js +2 -6
- package/dist/Image/Image.test.js +2 -2
- package/dist/Image/index.d.ts +1 -1
- package/dist/Image/index.js +1 -1
- package/dist/ImageSlider/ImageSlider.d.ts +3 -3
- package/dist/ImageSlider/ImageSlider.js +2 -6
- package/dist/ImageSlider/ImageSliderControls.js +2 -6
- package/dist/ImageSlider/ImageSliderItem.d.ts +5 -5
- package/dist/ImageSlider/ImageSliderItem.js +1 -5
- package/dist/ImageSlider/ImageSliderScroller.js +1 -5
- package/dist/ImageSlider/ImageSliderThumbnails.d.ts +4 -4
- package/dist/ImageSlider/ImageSliderThumbnails.js +2 -6
- package/dist/InvalidFormAlert/InvalidFormAlert.d.ts +4 -4
- package/dist/InvalidFormAlert/InvalidFormAlert.js +0 -4
- package/dist/InvalidFormAlert/InvalidFormAlertWithErrors.js +5 -6
- package/dist/Label/Label.d.ts +10 -5
- package/dist/Label/Label.js +1 -10
- package/dist/Link/Link.d.ts +4 -4
- package/dist/Link/Link.js +1 -5
- package/dist/LinkList/LinkList.d.ts +1 -1
- package/dist/LinkList/LinkList.js +1 -5
- package/dist/LinkList/LinkListLink.d.ts +13 -4
- package/dist/LinkList/LinkListLink.js +3 -7
- package/dist/LinkList/LinkListLink.test.js +1 -1
- package/dist/Logo/Logo.d.ts +2 -2
- package/dist/Logo/Logo.js +1 -5
- package/dist/Logo/brand/LogoAmsterdam.js +2 -5
- package/dist/Logo/brand/LogoGgdAmsterdam.js +2 -5
- package/dist/Logo/brand/LogoMuseumWeesp.js +2 -5
- package/dist/Logo/brand/LogoStadsarchief.js +2 -5
- package/dist/Logo/brand/LogoStadsbankVanLening.js +2 -5
- package/dist/Logo/brand/LogoVgaVerzekeringen.js +2 -5
- package/dist/Logo/index.d.ts +1 -1
- package/dist/Mark/Mark.js +1 -5
- package/dist/Menu/Menu.d.ts +28 -0
- package/dist/Menu/Menu.js +10 -0
- package/dist/Menu/Menu.test.d.ts +5 -0
- package/dist/Menu/Menu.test.js +38 -0
- package/dist/Menu/MenuLink.d.ts +20 -0
- package/dist/Menu/MenuLink.js +8 -0
- package/dist/Menu/MenuLink.test.d.ts +5 -0
- package/dist/Menu/MenuLink.test.js +56 -0
- package/dist/Menu/index.d.ts +7 -0
- package/dist/Menu/index.js +5 -0
- package/dist/OrderedList/OrderedList.d.ts +5 -5
- package/dist/OrderedList/OrderedList.js +1 -5
- package/dist/OrderedList/OrderedList.test.js +1 -1
- package/dist/OrderedList/OrderedListItem.js +1 -5
- package/dist/Overlap/Overlap.js +1 -5
- package/dist/Page/Page.js +1 -5
- package/dist/PageFooter/PageFooter.js +1 -5
- package/dist/PageFooter/PageFooterMenu.js +1 -5
- package/dist/PageFooter/PageFooterMenuLink.js +1 -5
- package/dist/PageFooter/PageFooterSpotlight.js +1 -5
- package/dist/PageHeader/PageHeader.d.ts +7 -7
- package/dist/PageHeader/PageHeader.js +3 -7
- package/dist/PageHeader/PageHeader.test.js +1 -1
- package/dist/PageHeader/PageHeaderGridCellNarrowWindowOnly.js +1 -1
- package/dist/PageHeader/PageHeaderMenuLink.d.ts +5 -5
- package/dist/PageHeader/PageHeaderMenuLink.js +1 -1
- package/dist/PageHeading/PageHeading.d.ts +6 -5
- package/dist/PageHeading/PageHeading.js +2 -5
- package/dist/Pagination/Pagination.d.ts +52 -10
- package/dist/Pagination/Pagination.js +5 -9
- package/dist/Pagination/Pagination.test.js +23 -10
- package/dist/Pagination/getRange.js +4 -2
- package/dist/Paragraph/Paragraph.d.ts +10 -5
- package/dist/Paragraph/Paragraph.js +1 -10
- package/dist/PasswordInput/PasswordInput.d.ts +4 -4
- package/dist/PasswordInput/PasswordInput.js +1 -5
- package/dist/PasswordInput/PasswordInput.test.js +1 -1
- package/dist/Radio/Radio.d.ts +15 -9
- package/dist/Radio/Radio.js +4 -8
- package/dist/Radio/Radio.test.js +9 -0
- package/dist/Row/Row.d.ts +5 -5
- package/dist/Row/Row.js +1 -5
- package/dist/Row/Row.test.js +1 -1
- package/dist/SearchField/SearchField.d.ts +3 -5
- package/dist/SearchField/SearchField.js +1 -5
- package/dist/SearchField/SearchFieldButton.js +0 -4
- package/dist/SearchField/SearchFieldInput.d.ts +2 -2
- package/dist/SearchField/SearchFieldInput.js +1 -5
- package/dist/Select/Select.d.ts +5 -5
- package/dist/Select/Select.js +1 -5
- package/dist/Select/SelectOption.js +1 -5
- package/dist/Select/SelectOptionGroup.js +1 -5
- package/dist/SkipLink/SkipLink.js +1 -5
- package/dist/Spotlight/Spotlight.d.ts +5 -5
- package/dist/Spotlight/Spotlight.js +1 -1
- package/dist/Spotlight/Spotlight.test.js +1 -1
- package/dist/StandaloneLink/StandaloneLink.d.ts +15 -8
- package/dist/StandaloneLink/StandaloneLink.js +4 -6
- package/dist/StandaloneLink/StandaloneLink.test.js +6 -4
- package/dist/Switch/Switch.js +1 -5
- package/dist/Table/Table.js +1 -5
- package/dist/Table/TableBody.js +1 -5
- package/dist/Table/TableCaption.d.ts +5 -0
- package/dist/Table/TableCaption.js +1 -10
- package/dist/Table/TableCell.js +1 -5
- package/dist/Table/TableFooter.js +1 -5
- package/dist/Table/TableHeader.js +1 -5
- package/dist/Table/TableHeaderCell.js +1 -5
- package/dist/Table/TableRow.js +1 -5
- package/dist/TableOfContents/TableOfContents.d.ts +9 -9
- package/dist/TableOfContents/TableOfContents.js +4 -7
- package/dist/TableOfContents/TableOfContentsLink.d.ts +4 -4
- package/dist/TableOfContents/TableOfContentsLink.js +0 -4
- package/dist/TableOfContents/TableOfContentsList.js +1 -5
- package/dist/TableOfContents/TableOfContentsList.test.js +1 -1
- package/dist/Tabs/Tabs.d.ts +11 -11
- package/dist/Tabs/Tabs.js +1 -5
- package/dist/Tabs/TabsButton.d.ts +5 -5
- package/dist/Tabs/TabsButton.js +1 -5
- package/dist/Tabs/TabsList.js +1 -5
- package/dist/Tabs/TabsPanel.d.ts +5 -5
- package/dist/Tabs/TabsPanel.js +1 -5
- package/dist/Tabs/index.d.ts +2 -2
- package/dist/TextArea/TextArea.d.ts +4 -4
- package/dist/TextArea/TextArea.js +1 -5
- package/dist/TextInput/TextInput.d.ts +4 -4
- package/dist/TextInput/TextInput.js +1 -5
- package/dist/TimeInput/TimeInput.d.ts +4 -4
- package/dist/TimeInput/TimeInput.js +1 -5
- package/dist/UnorderedList/UnorderedList.d.ts +5 -5
- package/dist/UnorderedList/UnorderedList.js +1 -5
- package/dist/UnorderedList/UnorderedList.test.js +1 -1
- package/dist/UnorderedList/UnorderedListItem.js +1 -5
- package/dist/common/formatFileType.d.ts +1 -1
- package/dist/common/formatFileType.js +10 -10
- package/dist/common/useKeyboardFocus.js +6 -6
- package/dist/common/useKeyboardFocus.test.js +2 -6
- package/dist/index.cjs.js +731 -619
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +394 -267
- package/dist/index.esm.js +633 -523
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +23 -23
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* @license EUPL-1.2+
|
|
4
|
-
* Copyright Gemeente Amsterdam
|
|
5
|
-
*/
|
|
6
2
|
import { forwardRef } from 'react';
|
|
7
|
-
const LogoVgaVerzekeringen = forwardRef((props, ref) => (_jsxs("svg", { className: "ams-logo", focusable: "false",
|
|
3
|
+
const LogoVgaVerzekeringen = forwardRef((props, ref) => (_jsxs("svg", { className: "ams-logo", focusable: "false", height: "2.5rem" // Height for when CSS does not load, gets overridden when it does
|
|
4
|
+
, ref: ref, role: "img", viewBox: "0 0 145 43", xmlns: "http://www.w3.org/2000/svg", ...props, children: [_jsx("path", { className: "ams-logo__emblem", d: "m0 38.2 3.53-3.53L0 31.14l2.35-2.35 3.53 3.53 3.53-3.53 2.35 2.35-3.53 3.53 3.53 3.53-2.35 2.35-3.53-3.53-3.53 3.53L0 38.2ZM0 9.96l3.53-3.53L0 2.9 2.35.55l3.53 3.53L9.41.55l2.35 2.35-3.53 3.53 3.53 3.53-2.35 2.35-3.53-3.53-3.53 3.53L0 9.96ZM0 24.09l3.53-3.53L0 17.03l2.35-2.35 3.53 3.53 3.53-3.53 2.35 2.35-3.53 3.53 3.53 3.53-2.35 2.35-3.53-3.53-3.53 3.53L0 24.09Z", fill: "#EC0000" }), _jsx("path", { className: "ams-logo__text-secondary", d: "M17.13 29.86h2.07l2.39 7.22h.03l2.42-7.22h1.98l-3.36 9.4h-2.17l-3.36-9.4ZM26.5 34.55c0-2.85 2-4.86 4.82-4.86 1.43 0 2.63.46 3.49 1.39l-1.24 1.19c-.54-.59-1.3-.94-2.21-.94-1.71 0-2.89 1.33-2.89 3.23s1.16 3.28 2.82 3.28c1.52 0 2.57-.87 2.57-2.13v-.25h-2.27v-1.58h4.18v1.46c0 2.4-1.87 4.09-4.54 4.09s-4.71-2.02-4.71-4.89l-.02.01ZM40.43 29.86h2.17l3.76 9.4h-2.01l-.78-2.07h-4.18l-.78 2.07h-1.94l3.76-9.4Zm-.48 5.77h3.04l-1.5-3.96h-.03l-1.5 3.96h-.01ZM50.38 29.86h2.07l2.39 7.22h.03l2.42-7.22h1.98l-3.36 9.4h-2.17l-3.36-9.4ZM59.42 35.69c0-2.21 1.49-3.75 3.62-3.75s3.6 1.52 3.6 3.7c0 .17-.03.45-.06.64h-5.35c.13.97.95 1.62 2.01 1.62.78 0 1.46-.29 1.91-.81l1.08 1.06c-.65.84-1.78 1.29-3.08 1.29-2.2 0-3.73-1.55-3.73-3.75Zm1.81-.72h3.6c-.12-.94-.84-1.58-1.81-1.58-.97 0-1.69.64-1.79 1.58ZM68.13 32.12h1.69v1.19h.03c.35-.81.98-1.24 1.82-1.24.22 0 .52.03.64.07v1.71c-.2-.06-.59-.1-.88-.1-.91 0-1.5.69-1.5 1.76v3.76h-1.79v-7.14l-.01-.01ZM73.01 38.06l3.4-4.45h-3.3v-1.49h5.73v1.2l-3.4 4.45h3.5v1.49h-5.93v-1.2ZM79.88 35.69c0-2.21 1.49-3.75 3.62-3.75s3.6 1.52 3.6 3.7c0 .17-.03.45-.06.64h-5.35c.13.97.95 1.62 2.01 1.62.78 0 1.46-.29 1.91-.81l1.08 1.06c-.65.84-1.78 1.29-3.08 1.29-2.2 0-3.73-1.55-3.73-3.75Zm1.81-.72h3.6c-.12-.94-.84-1.58-1.81-1.58-.97 0-1.69.64-1.79 1.58ZM90.38 39.26h-1.79V28.77h1.79v6.57h.03l2.66-3.23h2.17l-2.76 3.17 2.89 3.98H93.2l-1.98-2.81-.84.97v1.84ZM95.68 35.69c0-2.21 1.49-3.75 3.62-3.75s3.6 1.52 3.6 3.7c0 .17-.03.45-.06.64h-5.35c.13.97.95 1.62 2.01 1.62.78 0 1.46-.29 1.91-.81l1.08 1.06c-.65.84-1.78 1.29-3.08 1.29-2.2 0-3.73-1.55-3.73-3.75Zm1.81-.72h3.6c-.12-.94-.84-1.58-1.81-1.58-.97 0-1.69.64-1.79 1.58ZM104.38 32.12h1.69v1.19h.03c.35-.81.98-1.24 1.82-1.24.22 0 .52.03.64.07v1.71c-.2-.06-.59-.1-.88-.1-.91 0-1.5.69-1.5 1.76v3.76h-1.79v-7.14l-.01-.01ZM110.65 31.21c-.62 0-1.07-.43-1.07-1.04 0-.61.45-1.04 1.07-1.04.62 0 1.07.43 1.07 1.04 0 .61-.45 1.04-1.07 1.04Zm-.9.91h1.79v7.14h-1.79v-7.14ZM113.48 32.12h1.69v.97h.03c.33-.71 1.06-1.14 1.89-1.14 1.79 0 2.72 1.03 2.72 2.99v4.32h-1.79v-3.98c0-1.21-.43-1.78-1.35-1.78-.92 0-1.4.64-1.4 1.82v3.93h-1.79v-7.14.01ZM121.55 40.97l1.16-1.13c.39.45 1.1.72 1.87.72 1.3 0 2.02-.59 2.02-1.63v-1.1h-.03c-.4.75-1.16 1.17-2.1 1.17-2.01 0-3.34-1.42-3.34-3.53s1.37-3.51 3.34-3.51c1.01 0 1.81.45 2.2 1.21h.03v-1.06h1.69v6.88c0 1.91-1.46 3.11-3.79 3.11-1.33 0-2.43-.42-3.05-1.14v.01Zm5.06-5.5c0-1.19-.74-2.01-1.82-2.01s-1.82.82-1.82 2.01.75 2 1.82 2 1.82-.82 1.82-2ZM129.88 35.69c0-2.21 1.49-3.75 3.62-3.75s3.6 1.52 3.6 3.7c0 .17-.03.45-.06.64h-5.35c.13.97.95 1.62 2.01 1.62.78 0 1.46-.29 1.91-.81l1.08 1.06c-.65.84-1.78 1.29-3.08 1.29-2.2 0-3.73-1.55-3.73-3.75Zm1.81-.72h3.6c-.12-.94-.84-1.58-1.81-1.58-.97 0-1.69.64-1.79 1.58ZM138.59 32.12h1.69v.97h.03c.33-.71 1.06-1.14 1.89-1.14 1.79 0 2.72 1.03 2.72 2.99v4.32h-1.79v-3.98c0-1.21-.43-1.78-1.35-1.78-.92 0-1.4.64-1.4 1.82v3.93h-1.79v-7.14.01Z", fill: "#000" }), _jsx("path", { className: "ams-logo__text-primary", d: "M20.94 15.88h2.17l3.76 9.4h-2.01l-.78-2.07H19.9l-.78 2.07h-1.94l3.76-9.4Zm-.48 5.77h3.04L22 17.69h-.03l-1.5 3.96h-.01ZM28.05 18.14h1.68v.97h.03c.36-.74 1-1.14 1.82-1.14.93 0 1.62.4 2.05 1.21.43-.78 1.23-1.21 2.24-1.21 1.76 0 2.62.98 2.62 2.99v4.32H36.7v-4.02c0-1.17-.4-1.74-1.24-1.74s-1.29.62-1.29 1.79v3.96h-1.79v-4.02c0-1.19-.39-1.74-1.24-1.74s-1.29.64-1.29 1.79v3.96h-1.79v-7.14l-.01.02ZM41.79 22.29c-.97-.29-1.91-.81-1.91-2.11 0-1.3 1.1-2.21 2.73-2.21 1.1 0 1.95.39 2.43 1.11l-1.03 1.03c-.36-.45-.85-.69-1.39-.69-.61 0-.98.27-.98.71 0 .58.61.68 1.49.95.97.29 1.91.81 1.91 2.11 0 1.3-1.16 2.27-2.86 2.27-1.11 0-2.01-.39-2.53-1.13l1.03-1.03c.39.46.91.71 1.49.71.69 0 1.11-.29 1.11-.77 0-.58-.61-.68-1.49-.95ZM46.94 22.72v-3.09h-1.23v-1.49h.65c.59 0 .82-.23.82-.82v-1.11h1.53v1.94h1.74v1.49h-1.74v3.09c0 .69.36 1.08 1.03 1.08.2 0 .45-.03.59-.07v1.5c-.22.06-.62.1-.94.1-1.62 0-2.46-.9-2.46-2.62h.01ZM51.34 21.71c0-2.21 1.49-3.75 3.62-3.75s3.6 1.52 3.6 3.7c0 .17-.03.45-.06.64h-5.35c.13.97.95 1.62 2.01 1.62.78 0 1.46-.29 1.91-.81l1.08 1.06c-.65.84-1.78 1.29-3.08 1.29-2.2 0-3.73-1.55-3.73-3.75Zm1.81-.72h3.6c-.12-.94-.84-1.58-1.81-1.58-.97 0-1.69.64-1.79 1.58ZM60.04 18.14h1.69v1.19h.03c.35-.81.98-1.24 1.82-1.24.22 0 .52.03.64.07v1.71c-.2-.06-.59-.1-.88-.1-.91 0-1.5.69-1.5 1.76v3.76h-1.79v-7.14l-.01-.01ZM64.73 21.74c0-2.21 1.46-3.77 3.53-3.77.95 0 1.74.42 2.23 1.19h.03v-4.35h1.79V25.3h-1.69v-1.11h-.03c-.46.81-1.33 1.29-2.33 1.29-2.07 0-3.53-1.55-3.53-3.72v-.02Zm5.79-.03c0-1.29-.8-2.14-1.97-2.14s-1.98.87-1.98 2.14.8 2.14 1.98 2.14 1.97-.85 1.97-2.14ZM73.68 23.25c0-1.37 1.14-2.2 3.05-2.21h1.39v-.25c0-.84-.54-1.27-1.5-1.27-.64 0-1.2.25-1.59.69l-1.08-1.06c.62-.77 1.62-1.19 2.85-1.19 1.91 0 3.12 1.04 3.12 2.7v2.83c0 .26.12.38.4.38h.13v1.4h-.84c-.68 0-1.14-.32-1.29-.84h-.03c-.45.65-1.19 1.01-2.08 1.01-1.5 0-2.53-.9-2.53-2.21v.02Zm4.44-.62v-.4h-1.19c-.94.03-1.45.36-1.45.98 0 .55.43.94 1.04.94.94 0 1.59-.62 1.59-1.52h.01ZM81.85 18.14h1.68v.97h.03c.36-.74 1-1.14 1.82-1.14.93 0 1.62.4 2.05 1.21.43-.78 1.23-1.21 2.24-1.21 1.76 0 2.62.98 2.62 2.99v4.32H90.5v-4.02c0-1.17-.4-1.74-1.24-1.74s-1.29.62-1.29 1.79v3.96h-1.79v-4.02c0-1.19-.39-1.74-1.24-1.74s-1.29.64-1.29 1.79v3.96h-1.79v-7.14l-.01.02ZM17.58 6.41c0-2.85 2-4.86 4.82-4.86 1.43 0 2.63.46 3.49 1.39l-1.24 1.19c-.54-.59-1.3-.94-2.21-.94-1.71 0-2.89 1.33-2.89 3.23s1.16 3.28 2.82 3.28c1.52 0 2.57-.87 2.57-2.13v-.25h-2.27V5.74h4.18V7.2c0 2.4-1.87 4.09-4.54 4.09S17.6 9.27 17.6 6.4l-.02.01ZM28.05 7.55c0-2.21 1.49-3.75 3.62-3.75s3.6 1.52 3.6 3.7c0 .17-.03.45-.06.64h-5.35c.13.97.95 1.62 2.01 1.62.78 0 1.46-.29 1.91-.81l1.08 1.06c-.65.84-1.78 1.29-3.08 1.29-2.2 0-3.73-1.55-3.73-3.75Zm1.81-.72h3.6c-.12-.94-.84-1.58-1.81-1.58-.97 0-1.69.64-1.79 1.58ZM36.75 3.98h1.68v.97h.03c.36-.74 1-1.14 1.82-1.14.93 0 1.62.4 2.05 1.21.43-.78 1.23-1.21 2.24-1.21 1.76 0 2.62.98 2.62 2.99v4.32H45.4V7.1c0-1.17-.4-1.74-1.24-1.74s-1.29.62-1.29 1.79v3.96h-1.79V7.1c0-1.19-.39-1.74-1.24-1.74s-1.29.64-1.29 1.79v3.96h-1.79V3.98h-.01ZM48.61 7.55c0-2.21 1.49-3.75 3.62-3.75s3.6 1.52 3.6 3.7c0 .17-.03.45-.06.64h-5.35c.13.97.95 1.62 2.01 1.62.78 0 1.46-.29 1.91-.81l1.08 1.06c-.65.84-1.78 1.29-3.08 1.29-2.2 0-3.73-1.55-3.73-3.75Zm1.81-.72h3.6c-.12-.94-.84-1.58-1.81-1.58-.97 0-1.69.64-1.79 1.58ZM56.87 7.55c0-2.21 1.49-3.75 3.62-3.75s3.6 1.52 3.6 3.7c0 .17-.03.45-.06.64h-5.35c.13.97.95 1.62 2.01 1.62.78 0 1.46-.29 1.91-.81l1.08 1.06c-.65.84-1.78 1.29-3.08 1.29-2.2 0-3.73-1.55-3.73-3.75Zm1.81-.72h3.6c-.12-.94-.84-1.58-1.81-1.58-.97 0-1.69.64-1.79 1.58ZM65.58 3.98h1.69v.97h.03c.33-.71 1.06-1.14 1.89-1.14 1.79 0 2.72 1.03 2.72 2.99v4.32h-1.79V7.14c0-1.21-.43-1.78-1.34-1.78-.91 0-1.4.64-1.4 1.82v3.93h-1.79V3.98h-.01ZM74.21 8.56V5.47h-1.23V3.98h.65c.59 0 .82-.23.82-.82V2.04h1.53v1.94h1.74v1.49h-1.74v3.09c0 .69.36 1.08 1.03 1.08.2 0 .45-.03.59-.07v1.5c-.22.06-.62.1-.94.1-1.62 0-2.46-.9-2.46-2.62l.01.01ZM78.61 7.55c0-2.21 1.49-3.75 3.62-3.75s3.6 1.52 3.6 3.7c0 .17-.03.45-.06.64h-5.35c.13.97.95 1.62 2.01 1.62.78 0 1.46-.29 1.91-.81l1.08 1.06c-.65.84-1.78 1.29-3.08 1.29-2.2 0-3.73-1.55-3.73-3.75Zm1.81-.72h3.6c-.12-.94-.84-1.58-1.81-1.58-.97 0-1.69.64-1.79 1.58Z", fill: "#EC0000" })] })));
|
|
8
5
|
LogoVgaVerzekeringen.displayName = 'LogoVgaVerzekeringen';
|
|
9
6
|
export default LogoVgaVerzekeringen;
|
package/dist/Logo/index.d.ts
CHANGED
package/dist/Mark/Mark.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
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';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
7
3
|
import { forwardRef } from 'react';
|
|
8
4
|
/**
|
|
9
5
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-text-mark--docs Mark docs at Amsterdam Design System}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
+
export type MenuProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {
|
|
7
|
+
accessibleName?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const MenuRoot: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
|
|
10
|
+
children?: import("react").ReactNode | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
accessibleName?: string;
|
|
13
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
14
|
+
/**
|
|
15
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-navigation-menu--docs Menu docs at Amsterdam Design System}
|
|
16
|
+
*/
|
|
17
|
+
export declare const Menu: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
|
|
18
|
+
children?: import("react").ReactNode | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
accessibleName?: string;
|
|
21
|
+
} & import("react").RefAttributes<HTMLElement>> & {
|
|
22
|
+
Link: import("react").ForwardRefExoticComponent<{
|
|
23
|
+
color?: "contrast" | "inverse";
|
|
24
|
+
icon: import("..").IconProps["svg"];
|
|
25
|
+
} & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
26
|
+
children?: import("react").ReactNode | undefined;
|
|
27
|
+
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
28
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { MenuLink } from './MenuLink';
|
|
5
|
+
export const MenuRoot = forwardRef(({ accessibleName = 'Hoofdnavigatie', children, className, ...restProps }, ref) => (_jsxs("nav", { ...restProps, "aria-labelledby": "primary-navigation", className: clsx('ams-menu', className), ref: ref, children: [_jsx("h2", { className: "ams-visually-hidden", id: "primary-navigation", children: accessibleName }), _jsx("ul", { className: "ams-menu__list", children: children })] })));
|
|
6
|
+
MenuRoot.displayName = 'Menu';
|
|
7
|
+
/**
|
|
8
|
+
* @see {@link https://designsystem.amsterdam/?path=/docs/components-navigation-menu--docs Menu docs at Amsterdam Design System}
|
|
9
|
+
*/
|
|
10
|
+
export const Menu = Object.assign(MenuRoot, { Link: MenuLink });
|
|
@@ -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 { Menu } from './Menu';
|
|
9
|
+
import '@testing-library/jest-dom';
|
|
10
|
+
describe('Menu', () => {
|
|
11
|
+
it('renders', () => {
|
|
12
|
+
render(_jsx(Menu, {}));
|
|
13
|
+
const component = screen.getByRole('navigation');
|
|
14
|
+
expect(component).toBeInTheDocument();
|
|
15
|
+
expect(component).toBeVisible();
|
|
16
|
+
});
|
|
17
|
+
it('renders a design system BEM class name', () => {
|
|
18
|
+
render(_jsx(Menu, {}));
|
|
19
|
+
const component = screen.getByRole('navigation');
|
|
20
|
+
expect(component).toHaveClass('ams-menu');
|
|
21
|
+
});
|
|
22
|
+
it('renders an extra class name', () => {
|
|
23
|
+
render(_jsx(Menu, { className: "extra" }));
|
|
24
|
+
const component = screen.getByRole('navigation');
|
|
25
|
+
expect(component).toHaveClass('ams-menu extra');
|
|
26
|
+
});
|
|
27
|
+
it('supports ForwardRef in React', () => {
|
|
28
|
+
const ref = createRef();
|
|
29
|
+
render(_jsx(Menu, { ref: ref }));
|
|
30
|
+
const component = screen.getByRole('navigation');
|
|
31
|
+
expect(ref.current).toBe(component);
|
|
32
|
+
});
|
|
33
|
+
it('renders a custom accessible name for the logo', () => {
|
|
34
|
+
render(_jsx(Menu, { accessibleName: "Custom accessible name" }));
|
|
35
|
+
const component = screen.getByRole('heading', { name: 'Custom accessible name' });
|
|
36
|
+
expect(component).toBeInTheDocument();
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2+
|
|
3
|
+
* Copyright Gemeente Amsterdam
|
|
4
|
+
*/
|
|
5
|
+
import type { AnchorHTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
+
import type { IconProps } from '../Icon';
|
|
7
|
+
export type MenuLinkProps = {
|
|
8
|
+
/** Changes the text colour for readability on a light or dark background. */
|
|
9
|
+
color?: 'contrast' | 'inverse';
|
|
10
|
+
/** An icon to display instead of the default chevron. Don’t mix custom icons with chevrons in one list. */
|
|
11
|
+
icon: IconProps['svg'];
|
|
12
|
+
} & PropsWithChildren<AnchorHTMLAttributes<HTMLAnchorElement>>;
|
|
13
|
+
export declare const MenuLink: import("react").ForwardRefExoticComponent<{
|
|
14
|
+
/** Changes the text colour for readability on a light or dark background. */
|
|
15
|
+
color?: "contrast" | "inverse";
|
|
16
|
+
/** An icon to display instead of the default chevron. Don’t mix custom icons with chevrons in one list. */
|
|
17
|
+
icon: IconProps["svg"];
|
|
18
|
+
} & AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
19
|
+
children?: import("react").ReactNode | undefined;
|
|
20
|
+
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
export const MenuLink = forwardRef(({ children, className, color, icon, ...restProps }, ref) => {
|
|
6
|
+
return (_jsx("li", { children: _jsxs("a", { ...restProps, className: clsx('ams-menu__link', color && `ams-menu__link--${color}`, className), ref: ref, children: [_jsx(Icon, { className: "ams-menu__icon", svg: icon }), children] }) }));
|
|
7
|
+
});
|
|
8
|
+
MenuLink.displayName = 'Menu.Link';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license EUPL-1.2+
|
|
4
|
+
* Copyright Gemeente Amsterdam
|
|
5
|
+
*/
|
|
6
|
+
import '@testing-library/jest-dom';
|
|
7
|
+
import { DocumentIcon, StarIcon } from '@amsterdam/design-system-react-icons';
|
|
8
|
+
import { render, screen } from '@testing-library/react';
|
|
9
|
+
import { createRef } from 'react';
|
|
10
|
+
import { Menu } from './Menu';
|
|
11
|
+
describe('Menu link', () => {
|
|
12
|
+
it('renders', () => {
|
|
13
|
+
const { container } = render(_jsx(Menu.Link, { href: "#", icon: DocumentIcon }));
|
|
14
|
+
const listItem = screen.getByRole('listitem');
|
|
15
|
+
const link = screen.getByRole('link');
|
|
16
|
+
const icon = container.querySelector('svg');
|
|
17
|
+
expect(listItem).toBeInTheDocument();
|
|
18
|
+
expect(listItem).toBeVisible();
|
|
19
|
+
expect(link).toBeInTheDocument();
|
|
20
|
+
expect(link).toBeVisible();
|
|
21
|
+
expect(icon).toBeInTheDocument();
|
|
22
|
+
expect(icon).not.toBeVisible(); // The icon is hidden by default, and only shown when the CSS loads.
|
|
23
|
+
});
|
|
24
|
+
it('renders a design system BEM class name', () => {
|
|
25
|
+
render(_jsx(Menu.Link, { href: "#", icon: DocumentIcon }));
|
|
26
|
+
const component = screen.getByRole('link');
|
|
27
|
+
expect(component).toHaveClass('ams-menu__link');
|
|
28
|
+
});
|
|
29
|
+
it('renders an extra class name', () => {
|
|
30
|
+
render(_jsx(Menu.Link, { className: "extra", href: "#", icon: DocumentIcon }));
|
|
31
|
+
const component = screen.getByRole('link');
|
|
32
|
+
expect(component).toHaveClass('ams-menu__link extra');
|
|
33
|
+
});
|
|
34
|
+
it('renders the class name for contrast color', () => {
|
|
35
|
+
render(_jsx(Menu.Link, { color: "contrast", href: "#", icon: DocumentIcon }));
|
|
36
|
+
const component = screen.getByRole('link');
|
|
37
|
+
expect(component).toHaveClass('ams-menu__link--contrast');
|
|
38
|
+
});
|
|
39
|
+
it('renders the class name for inverse color', () => {
|
|
40
|
+
render(_jsx(Menu.Link, { color: "inverse", href: "#", icon: DocumentIcon }));
|
|
41
|
+
const component = screen.getByRole('link');
|
|
42
|
+
expect(component).toHaveClass('ams-menu__link--inverse');
|
|
43
|
+
});
|
|
44
|
+
it('supports ForwardRef in React', () => {
|
|
45
|
+
const ref = createRef();
|
|
46
|
+
render(_jsx(Menu.Link, { href: "#", icon: DocumentIcon, ref: ref }));
|
|
47
|
+
const component = screen.getByRole('link');
|
|
48
|
+
expect(ref.current).toBe(component);
|
|
49
|
+
});
|
|
50
|
+
it('shows a custom icon', () => {
|
|
51
|
+
render(_jsx(Menu.Link, { href: "#", icon: _jsx(StarIcon, { className: "test-class" }) }));
|
|
52
|
+
const component = screen.getByRole('link');
|
|
53
|
+
const icon = component.querySelector('.test-class');
|
|
54
|
+
expect(icon).toBeInTheDocument();
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { OlHTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
-
export type OrderedListProps = {
|
|
6
|
+
export type OrderedListProps = PropsWithChildren<OlHTMLAttributes<HTMLOListElement>> & {
|
|
7
7
|
/** Changes the text colour for readability on a dark background. */
|
|
8
8
|
color?: 'inverse';
|
|
9
9
|
/** Whether the list items show a marker. */
|
|
10
10
|
markers?: boolean;
|
|
11
11
|
/** The size of the text. */
|
|
12
12
|
size?: 'small';
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
/**
|
|
15
15
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-text-ordered-list--docs Ordered List docs at Amsterdam Design System}
|
|
16
16
|
*/
|
|
17
|
-
export declare const OrderedList: import("react").ForwardRefExoticComponent<{
|
|
17
|
+
export declare const OrderedList: import("react").ForwardRefExoticComponent<OlHTMLAttributes<HTMLOListElement> & {
|
|
18
|
+
children?: import("react").ReactNode | undefined;
|
|
19
|
+
} & {
|
|
18
20
|
/** Changes the text colour for readability on a dark background. */
|
|
19
21
|
color?: "inverse";
|
|
20
22
|
/** Whether the list items show a marker. */
|
|
21
23
|
markers?: boolean;
|
|
22
24
|
/** The size of the text. */
|
|
23
25
|
size?: "small";
|
|
24
|
-
} & OlHTMLAttributes<HTMLOListElement> & {
|
|
25
|
-
children?: import("react").ReactNode | undefined;
|
|
26
26
|
} & import("react").RefAttributes<HTMLOListElement>> & {
|
|
27
27
|
Item: import("react").ForwardRefExoticComponent<import("react").LiHTMLAttributes<HTMLLIElement> & {
|
|
28
28
|
children?: import("react").ReactNode | undefined;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
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';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
7
3
|
import { forwardRef } from 'react';
|
|
8
4
|
import { OrderedListItem } from './OrderedListItem';
|
|
9
5
|
const OrderedListRoot = forwardRef(({ children, className, color, markers = true, size, ...restProps }, ref) => (_jsx("ol", { className: clsx('ams-ordered-list', color && `ams-ordered-list--${color}`, !markers && 'ams-ordered-list--no-markers', size && `ams-ordered-list--${size}`, className), ref: ref, ...restProps, children: children })));
|
|
@@ -35,7 +35,7 @@ describe('Ordered list', () => {
|
|
|
35
35
|
});
|
|
36
36
|
it('renders its subcomponent', () => {
|
|
37
37
|
const listItems = ['Item 1', 'Item 2', 'Item 3'];
|
|
38
|
-
const { container } = render(_jsx(OrderedList, { children: listItems.map((item
|
|
38
|
+
const { container } = render(_jsx(OrderedList, { children: listItems.map((item) => (_jsx(OrderedList.Item, { children: item }, item))) }));
|
|
39
39
|
const list = screen.getByRole('list');
|
|
40
40
|
const items = container.querySelectorAll('.ams-ordered-list__item');
|
|
41
41
|
expect(list).toBeInTheDocument();
|
|
@@ -1,9 +1,5 @@
|
|
|
1
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';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
7
3
|
import { forwardRef } from 'react';
|
|
8
4
|
export const OrderedListItem = forwardRef(({ children, className, ...restProps }, ref) => (_jsx("li", { className: clsx('ams-ordered-list__item', className), ref: ref, ...restProps, children: children })));
|
|
9
5
|
OrderedListItem.displayName = 'OrderedList.Item';
|
package/dist/Overlap/Overlap.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
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';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
7
3
|
import { forwardRef } from 'react';
|
|
8
4
|
/**
|
|
9
5
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-layout-overlap--docs Overlap docs at Amsterdam Design System}
|
package/dist/Page/Page.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
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';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
7
3
|
import { forwardRef } from 'react';
|
|
8
4
|
/**
|
|
9
5
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-containers-page--docs Page docs at Amsterdam Design System}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
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';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
7
3
|
import { forwardRef } from 'react';
|
|
8
4
|
import { PageFooterMenu } from './PageFooterMenu';
|
|
9
5
|
import { PageFooterMenuLink } from './PageFooterMenuLink';
|
|
@@ -1,9 +1,5 @@
|
|
|
1
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';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
7
3
|
import { forwardRef } from 'react';
|
|
8
4
|
export const PageFooterMenu = forwardRef(({ children, className, ...restProps }, ref) => (_jsx("ul", { ...restProps, className: clsx('ams-page-footer__menu', className), ref: ref, children: children })));
|
|
9
5
|
PageFooterMenu.displayName = 'PageFooter.Menu';
|
|
@@ -1,9 +1,5 @@
|
|
|
1
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';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
7
3
|
import { forwardRef } from 'react';
|
|
8
4
|
export const PageFooterMenuLink = forwardRef(({ children, className, ...restProps }, ref) => (_jsx("li", { className: "ams-page-footer__menu-item", children: _jsx("a", { ...restProps, className: clsx('ams-page-footer__menu-link', className), ref: ref, children: children }) })));
|
|
9
5
|
PageFooterMenuLink.displayName = 'PageFooter.MenuLink';
|
|
@@ -1,9 +1,5 @@
|
|
|
1
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';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
7
3
|
import { forwardRef } from 'react';
|
|
8
4
|
export const PageFooterSpotlight = forwardRef(({ children, className, ...restProps }, ref) => (_jsx("div", { ...restProps, className: clsx('ams-page-footer__spotlight', className), ref: ref, children: children })));
|
|
9
5
|
PageFooterSpotlight.displayName = 'PageFooter.Spotlight';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { AnchorHTMLAttributes, ComponentType, HTMLAttributes, ReactNode } from 'react';
|
|
6
6
|
import type { LogoBrand } from '../Logo';
|
|
7
|
-
export type PageHeaderProps = {
|
|
7
|
+
export type PageHeaderProps = HTMLAttributes<HTMLElement> & {
|
|
8
8
|
/** The name of the application. */
|
|
9
9
|
brandName?: string;
|
|
10
10
|
/** The accessible name of the logo. */
|
|
@@ -25,11 +25,11 @@ export type PageHeaderProps = {
|
|
|
25
25
|
navigationLabel?: string;
|
|
26
26
|
/** Whether the menu button is visible on wide screens. */
|
|
27
27
|
noMenuButtonOnWideWindow?: boolean;
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
/**
|
|
30
30
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-containers-page-header--docs Page Header docs at Amsterdam Design System}
|
|
31
31
|
*/
|
|
32
|
-
export declare const PageHeader: import("react").ForwardRefExoticComponent<{
|
|
32
|
+
export declare const PageHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
|
|
33
33
|
/** The name of the application. */
|
|
34
34
|
brandName?: string;
|
|
35
35
|
/** The accessible name of the logo. */
|
|
@@ -50,11 +50,11 @@ export declare const PageHeader: import("react").ForwardRefExoticComponent<{
|
|
|
50
50
|
navigationLabel?: string;
|
|
51
51
|
/** Whether the menu button is visible on wide screens. */
|
|
52
52
|
noMenuButtonOnWideWindow?: boolean;
|
|
53
|
-
} &
|
|
53
|
+
} & import("react").RefAttributes<HTMLElement>> & {
|
|
54
54
|
GridCellNarrowWindowOnly: import("react").ForwardRefExoticComponent<import("..").GridCellProps & import("react").RefAttributes<HTMLElement>>;
|
|
55
|
-
MenuLink: import("react").ForwardRefExoticComponent<{
|
|
56
|
-
fixed?: boolean;
|
|
57
|
-
} & AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
55
|
+
MenuLink: import("react").ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
58
56
|
children?: ReactNode | undefined;
|
|
57
|
+
} & {
|
|
58
|
+
fixed?: boolean;
|
|
59
59
|
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
60
60
|
};
|
|
@@ -1,16 +1,12 @@
|
|
|
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
|
-
*/
|
|
6
|
-
import clsx from 'clsx';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
7
3
|
import { forwardRef, useEffect, useState } from 'react';
|
|
4
|
+
import useIsAfterBreakpoint from '../common/useIsAfterBreakpoint';
|
|
8
5
|
import { Icon } from '../Icon';
|
|
9
6
|
import { Logo } from '../Logo';
|
|
10
7
|
import { PageHeaderGridCellNarrowWindowOnly } from './PageHeaderGridCellNarrowWindowOnly';
|
|
11
8
|
import { PageHeaderMenuIcon } from './PageHeaderMenuIcon';
|
|
12
9
|
import { PageHeaderMenuLink } from './PageHeaderMenuLink';
|
|
13
|
-
import useIsAfterBreakpoint from '../common/useIsAfterBreakpoint';
|
|
14
10
|
const LogoLinkContent = ({ brandName, logoAccessibleName, logoBrand, }) => (_jsxs(_Fragment, { children: [_jsx("span", { className: clsx(logoBrand === 'amsterdam' && Boolean(brandName) && 'ams-page-header__logo-container'), children: _jsx(Logo, { "aria-label": logoAccessibleName, brand: logoBrand }) }), brandName && (_jsx("span", { "aria-hidden": "true", className: "ams-page-header__brand-name", children: brandName }))] }));
|
|
15
11
|
const PageHeaderRoot = forwardRef(({ brandName, children, className, logoAccessibleName, logoBrand = 'amsterdam', logoLink = '/', logoLinkComponent = (props) => _jsx("a", { ...props }), logoLinkTitle = `Ga naar de homepage${brandName ? ` van ${brandName}` : ''}`, menuButtonText = 'Menu', menuItems, navigationLabel = 'Hoofdnavigatie', noMenuButtonOnWideWindow, ...restProps }, ref) => {
|
|
16
12
|
const [open, setOpen] = useState(false);
|
|
@@ -23,7 +19,7 @@ const PageHeaderRoot = forwardRef(({ brandName, children, className, logoAccessi
|
|
|
23
19
|
setOpen(false);
|
|
24
20
|
}
|
|
25
21
|
}, [isWideWindow]);
|
|
26
|
-
return (_jsxs("header", { ...restProps, className: clsx('ams-page-header', className), ref: ref, children: [_jsxs(Link, { className: "ams-page-header__logo-link", href: logoLink, children: [_jsx(LogoLinkContent, { brandName: brandName, logoAccessibleName: logoAccessibleName, logoBrand: logoBrand }), _jsx("span", { className: "ams-visually-hidden", children: logoLinkTitle })] }), (hasMegaMenu || menuItems) && (_jsxs("nav", { "aria-labelledby": "primary-navigation", className: "ams-page-header__navigation", children: [_jsx("h2", { className: "ams-visually-hidden", id: "primary-navigation", children: navigationLabel }), _jsx("div", { className: "ams-page-header__logo-link ams-page-header__logo-link--hidden", children: _jsx(LogoLinkContent, { brandName: brandName, logoBrand: logoBrand }) }), _jsxs("ul", { className: "ams-page-header__menu", children: [menuItems, hasMegaMenu && (_jsx("li", { className: clsx(noMenuButtonOnWideWindow && 'ams-page-header__mega-menu-button-item--hide-on-wide-window'), children: _jsxs("button", { "aria-controls": "ams-page-header-mega-menu", "aria-expanded": open, className: "ams-page-header__mega-menu-button", onClick: () => setOpen(!open), type: "button", children: [_jsx("span", { className: "ams-page-header__mega-menu-button-label", children: menuButtonText }), _jsx("span", { "aria-hidden": "true", className: "ams-page-header__mega-menu-button-hidden-label", children: menuButtonText }), _jsx(Icon, { svg: _jsx(PageHeaderMenuIcon, { className: clsx('ams-page-header__menu-icon', open && 'ams-page-header__menu-icon--open') }) })] }) }))] }), hasMegaMenu && (_jsx("div", { className: clsx('ams-page-header__mega-menu', !open && 'ams-page-header__mega-menu--closed'), id: "ams-page-header-mega-menu", children: children }))] }))] }));
|
|
22
|
+
return (_jsxs("header", { ...restProps, className: clsx('ams-page-header', className), ref: ref, children: [_jsxs(Link, { className: "ams-page-header__logo-link", href: logoLink, children: [_jsx(LogoLinkContent, { brandName: brandName, logoAccessibleName: logoAccessibleName, logoBrand: logoBrand }), _jsx("span", { className: "ams-visually-hidden", children: ` ${logoLinkTitle}` })] }), (hasMegaMenu || menuItems) && (_jsxs("nav", { "aria-labelledby": "primary-navigation", className: "ams-page-header__navigation", children: [_jsx("h2", { "aria-hidden": true, className: "ams-visually-hidden", id: "primary-navigation", children: navigationLabel }), _jsx("div", { "aria-hidden": true, className: "ams-page-header__logo-link ams-page-header__logo-link--hidden", hidden: true, children: _jsx(LogoLinkContent, { brandName: brandName, logoBrand: logoBrand }) }), _jsxs("ul", { className: "ams-page-header__menu", children: [menuItems, hasMegaMenu && (_jsx("li", { className: clsx(noMenuButtonOnWideWindow && 'ams-page-header__mega-menu-button-item--hide-on-wide-window'), children: _jsxs("button", { "aria-controls": "ams-page-header-mega-menu", "aria-expanded": open, className: "ams-page-header__mega-menu-button", onClick: () => setOpen(!open), type: "button", children: [_jsx("span", { className: "ams-page-header__mega-menu-button-label", children: menuButtonText }), _jsx("span", { "aria-hidden": "true", className: "ams-page-header__mega-menu-button-hidden-label", children: menuButtonText }), _jsx(Icon, { svg: _jsx(PageHeaderMenuIcon, { className: clsx('ams-page-header__menu-icon', open && 'ams-page-header__menu-icon--open') }) })] }) }))] }), hasMegaMenu && (_jsx("div", { className: clsx('ams-page-header__mega-menu', !open && 'ams-page-header__mega-menu--closed'), id: "ams-page-header-mega-menu", children: children }))] }))] }));
|
|
27
23
|
});
|
|
28
24
|
PageHeaderRoot.displayName = 'PageHeader';
|
|
29
25
|
/**
|
|
@@ -123,7 +123,7 @@ describe('Page Header', () => {
|
|
|
123
123
|
expect(openMegaMenu).toBeInTheDocument();
|
|
124
124
|
expect(openMegaMenu).not.toHaveClass('ams-page-header__mega-menu--closed');
|
|
125
125
|
});
|
|
126
|
-
it.skip('
|
|
126
|
+
it.skip('closes the mega menu when it is open and the screen width passes the breakpoint', () => {
|
|
127
127
|
// TODO: Add this test
|
|
128
128
|
});
|
|
129
129
|
it('renders a custom logo link component', () => {
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
* @license EUPL-1.2+
|
|
4
4
|
* Copyright Gemeente Amsterdam
|
|
5
5
|
*/
|
|
6
|
-
import clsx from 'clsx';
|
|
6
|
+
import { clsx } from 'clsx';
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
8
|
import { Grid } from '../Grid';
|
|
9
9
|
export const PageHeaderGridCellNarrowWindowOnly = forwardRef(({ children, className, ...restProps }, ref) => (_jsx(Grid.Cell, { ...restProps, className: clsx('ams-page-header__grid-cell-narrow-window-only', className), ref: ref, children: children })));
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import { AnchorHTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
-
export type PageHeaderMenuLinkProps = {
|
|
6
|
+
export type PageHeaderMenuLinkProps = PropsWithChildren<AnchorHTMLAttributes<HTMLAnchorElement>> & {
|
|
7
7
|
fixed?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const PageHeaderMenuLink: import("react").ForwardRefExoticComponent<{
|
|
10
|
-
fixed?: boolean;
|
|
11
|
-
} & AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
8
|
+
};
|
|
9
|
+
export declare const PageHeaderMenuLink: import("react").ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
12
10
|
children?: import("react").ReactNode | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
fixed?: boolean;
|
|
13
13
|
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
* @license EUPL-1.2+
|
|
4
4
|
* Copyright Gemeente Amsterdam
|
|
5
5
|
*/
|
|
6
|
-
import clsx from 'clsx';
|
|
6
|
+
import { clsx } from 'clsx';
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
8
|
export const PageHeaderMenuLink = forwardRef(({ children, className, fixed, ...restProps }, ref) => (_jsx("li", { className: clsx('ams-page-header__menu-item', fixed && 'ams-page-header__menu-item--fixed'), children: _jsx("a", { ...restProps, className: clsx('ams-page-header__menu-link', className), ref: ref, children: children }) })));
|
|
9
9
|
PageHeaderMenuLink.displayName = 'PageHeader.MenuLink';
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
* Copyright Gemeente Amsterdam
|
|
4
4
|
*/
|
|
5
5
|
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
|
6
|
-
export type PageHeadingProps = {
|
|
6
|
+
export type PageHeadingProps = PropsWithChildren<HTMLAttributes<HTMLHeadingElement>> & {
|
|
7
7
|
/** Changes the text colour for readability on a dark background. */
|
|
8
8
|
color?: 'inverse';
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
/**
|
|
11
|
+
* @deprecated We no longer use this size of headings. Use `Heading` with level 1 instead.
|
|
11
12
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-text-page-heading--docs Page Heading docs at Amsterdam Design System}
|
|
12
13
|
*/
|
|
13
|
-
export declare const PageHeading: import("react").ForwardRefExoticComponent<{
|
|
14
|
+
export declare const PageHeading: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & {
|
|
15
|
+
children?: import("react").ReactNode | undefined;
|
|
16
|
+
} & {
|
|
14
17
|
/** Changes the text colour for readability on a dark background. */
|
|
15
18
|
color?: "inverse";
|
|
16
|
-
} & HTMLAttributes<HTMLHeadingElement> & {
|
|
17
|
-
children?: import("react").ReactNode | undefined;
|
|
18
19
|
} & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
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';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
7
3
|
import { forwardRef } from 'react';
|
|
8
4
|
/**
|
|
5
|
+
* @deprecated We no longer use this size of headings. Use `Heading` with level 1 instead.
|
|
9
6
|
* @see {@link https://designsystem.amsterdam/?path=/docs/components-text-page-heading--docs Page Heading docs at Amsterdam Design System}
|
|
10
7
|
*/
|
|
11
8
|
export const PageHeading = forwardRef(({ children, className, color, ...restProps }, ref) => (_jsx("h1", { ...restProps, className: clsx('ams-page-heading', color && `ams-page-heading--${color}`, className), ref: ref, children: children })));
|