@digigov/ui 2.0.0-8e254888 → 2.0.0-a32ad9b2
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/app/Footer/Footer.stories/index.js +49 -1
- package/app/Footer/Footer.stories.d.ts +43 -1
- package/app/Footer/Footer.stories.js.map +3 -3
- package/app/Footer/FooterLink/index.js +17 -0
- package/app/Footer/FooterLink/package.json +6 -0
- package/app/Footer/FooterLink.d.ts +7 -0
- package/app/Footer/FooterLink.js.map +7 -0
- package/app/Footer/index.d.ts +1 -1
- package/app/Footer/index.js +1 -1
- package/app/Footer/index.js.map +1 -1
- package/app/Header/Header.stories/index.js +53 -1
- package/app/Header/Header.stories.d.ts +50 -1
- package/app/Header/Header.stories.js.map +3 -3
- package/app/Header/HeaderLogo/index.js +12 -2
- package/app/Header/HeaderLogo.d.ts +6 -2
- package/app/Header/HeaderLogo.js.map +3 -3
- package/app/Header/HeaderSecondaryLogo/index.js +9 -1
- package/app/Header/HeaderSecondaryLogo.d.ts +6 -2
- package/app/Header/HeaderSecondaryLogo.js.map +3 -3
- package/app/Header/HeaderTitle/index.js +10 -2
- package/app/Header/HeaderTitle.d.ts +6 -2
- package/app/Header/HeaderTitle.js.map +3 -3
- package/app/Modal/hooks/index.js +2 -6
- package/app/Modal/hooks.d.ts +2 -2
- package/app/Modal/hooks.js.map +2 -2
- package/app/Modal/index.web/index.js +5 -5
- package/app/Modal/index.web.js.map +2 -2
- package/app/OutdatedBrowserBanner/index.d.ts +1 -0
- package/app/OutdatedBrowserBanner/index.js.map +2 -2
- package/app/PhaseBannerHeader/index.d.ts +1 -1
- package/app/PhaseBannerHeader/index.js.map +2 -2
- package/app/QrCodeScanner/index.js.map +2 -2
- package/app/Skeleton/Skeleton.stories/index.js +28 -0
- package/app/Skeleton/Skeleton.stories.d.ts +56 -0
- package/app/Skeleton/Skeleton.stories.js.map +2 -2
- package/cjs/app/Footer/Footer.stories/index.js +37 -2
- package/cjs/app/Footer/Footer.stories.js.map +4 -4
- package/cjs/app/Footer/FooterLink/index.js +50 -0
- package/cjs/app/Footer/FooterLink.js.map +7 -0
- package/cjs/app/Footer/index.js +3 -3
- package/cjs/app/Footer/index.js.map +2 -2
- package/cjs/app/Header/Header.stories/index.js +51 -2
- package/cjs/app/Header/Header.stories.js.map +4 -4
- package/cjs/app/Header/HeaderLogo/index.js +13 -4
- package/cjs/app/Header/HeaderLogo.js.map +3 -3
- package/cjs/app/Header/HeaderSecondaryLogo/index.js +12 -4
- package/cjs/app/Header/HeaderSecondaryLogo.js.map +3 -3
- package/cjs/app/Header/HeaderTitle/index.js +11 -4
- package/cjs/app/Header/HeaderTitle.js.map +3 -3
- package/cjs/app/Modal/hooks/index.js +2 -6
- package/cjs/app/Modal/hooks.js.map +2 -2
- package/cjs/app/Modal/index.web/index.js +5 -5
- package/cjs/app/Modal/index.web.js.map +2 -2
- package/cjs/app/OutdatedBrowserBanner/index.js.map +2 -2
- package/cjs/app/PhaseBannerHeader/index.js.map +2 -2
- package/cjs/app/QrCodeScanner/index.js.map +2 -2
- package/cjs/app/Skeleton/Skeleton.stories/index.js +30 -1
- package/cjs/app/Skeleton/Skeleton.stories.js.map +2 -2
- package/cjs/content/Accordion/Accordion.stories/index.js +54 -2
- package/cjs/content/Accordion/Accordion.stories.js.map +4 -4
- package/cjs/content/Accordion/hooks.js.map +1 -1
- package/cjs/content/Blockquote/Blockquote.stories/index.js +20 -1
- package/cjs/content/Blockquote/Blockquote.stories.js.map +2 -2
- package/cjs/content/Card/Card.stories/index.js +78 -2
- package/cjs/content/Card/Card.stories.js.map +4 -4
- package/cjs/content/Chip/Chip.stories/index.js +24 -1
- package/cjs/content/Chip/Chip.stories.js.map +2 -2
- package/cjs/content/List/List.stories/index.js +40 -2
- package/cjs/content/List/List.stories.js.map +4 -4
- package/cjs/content/Table/Table.stories/index.js +157 -2
- package/cjs/content/Table/Table.stories.js.map +4 -4
- package/cjs/feedback/CopyToClipboard/CopyToClipboard.stories/index.js +61 -3
- package/cjs/feedback/CopyToClipboard/CopyToClipboard.stories.js.map +4 -4
- package/cjs/feedback/ErrorSummary/ErrorSummary.stories/index.js +42 -3
- package/cjs/feedback/ErrorSummary/ErrorSummary.stories.js.map +4 -4
- package/cjs/feedback/NotificationBanner/NotificationBanner.stories/index.js +36 -1
- package/cjs/feedback/NotificationBanner/NotificationBanner.stories.js.map +2 -2
- package/cjs/feedback/PhaseBanner/PhaseBanner.stories/index.js +27 -3
- package/cjs/feedback/PhaseBanner/PhaseBanner.stories.js.map +4 -4
- package/cjs/feedback/WarningText/WarningText.stories/index.js +24 -1
- package/cjs/feedback/WarningText/WarningText.stories.js.map +2 -2
- package/cjs/form/AutoComplete/AutoComplete.stories/index.js +75 -0
- package/cjs/form/AutoComplete/AutoComplete.stories.js.map +4 -4
- package/cjs/form/AutoComplete/Status/index.js.map +2 -2
- package/cjs/form/AutoComplete/index.js.map +2 -2
- package/cjs/form/Button/Button.stories/index.js +44 -13
- package/cjs/form/Button/Button.stories.js.map +3 -3
- package/cjs/form/Button/ButtonLink/index.js +13 -4
- package/cjs/form/Button/ButtonLink.js.map +3 -3
- package/cjs/form/Button/CallToAction/index.js +11 -4
- package/cjs/form/Button/CallToAction.js.map +3 -3
- package/cjs/form/Button/__stories__/Primary/index.js +18 -1
- package/cjs/form/Button/__stories__/Primary.js.map +2 -2
- package/cjs/form/Checkbox/Checkbox.stories/index.js +113 -2
- package/cjs/form/Checkbox/Checkbox.stories.js.map +4 -4
- package/cjs/form/DateInputContainer/DateInputContainer.stories/index.js +77 -2
- package/cjs/form/DateInputContainer/DateInputContainer.stories.js.map +4 -4
- package/cjs/form/ErrorMessage/ErrorMessage.stories/index.js +26 -1
- package/cjs/form/ErrorMessage/ErrorMessage.stories.js.map +4 -4
- package/cjs/form/RadioContainer/RadioContainer.stories/index.js +115 -2
- package/cjs/form/RadioContainer/RadioContainer.stories.js.map +4 -4
- package/cjs/form/SelectContainer/SelectContainer.stories/index.js +79 -2
- package/cjs/form/SelectContainer/SelectContainer.stories.js.map +4 -4
- package/cjs/form/SingleCharacterInputs/SingleCharacterInput.stories/index.js +93 -2
- package/cjs/form/SingleCharacterInputs/SingleCharacterInput.stories.js.map +4 -4
- package/cjs/form/TextArea/TextArea.stories/index.js +88 -2
- package/cjs/form/TextArea/TextArea.stories.js.map +4 -4
- package/cjs/form/TextInput/TextInput.stories/index.js +94 -0
- package/cjs/form/TextInput/TextInput.stories.js.map +4 -4
- package/cjs/govgr/GovGRLogo/index.js +14 -4
- package/cjs/govgr/GovGRLogo/index.js.map +3 -3
- package/cjs/layouts/Stack/__stories__/AlignItems/index.js +2 -2
- package/cjs/layouts/Stack/__stories__/AlignItems.js.map +3 -3
- package/cjs/layouts/Stack/__stories__/Default/index.js +2 -2
- package/cjs/layouts/Stack/__stories__/Default.js.map +3 -3
- package/cjs/layouts/Stack/__stories__/JustifyContent/index.js +2 -2
- package/cjs/layouts/Stack/__stories__/JustifyContent.js.map +3 -3
- package/cjs/layouts/Stack/__stories__/NoWrap/index.js +2 -2
- package/cjs/layouts/Stack/__stories__/NoWrap.js.map +3 -3
- package/cjs/layouts/Stack/__stories__/Row/index.js +2 -2
- package/cjs/layouts/Stack/__stories__/Row.js.map +3 -3
- package/cjs/layouts/Stack/__stories__/Spacing/index.js +2 -2
- package/cjs/layouts/Stack/__stories__/Spacing.js.map +3 -3
- package/cjs/layouts/Stack/index.js +6 -0
- package/cjs/layouts/Stack/index.js.map +2 -2
- package/cjs/lazy/index.js +13 -2
- package/cjs/lazy.js.map +2 -2
- package/cjs/navigation/BackLink/index.js +13 -4
- package/cjs/navigation/BackLink/index.js.map +3 -3
- package/cjs/navigation/Breadcrumbs/BreadcrumbsListItemLink/index.js +48 -0
- package/cjs/navigation/Breadcrumbs/BreadcrumbsListItemLink.js.map +7 -0
- package/cjs/navigation/Breadcrumbs/index.js +2 -2
- package/cjs/navigation/Breadcrumbs/index.js.map +2 -2
- package/cjs/navigation/Drawer/hooks/index.js +2 -6
- package/cjs/navigation/Drawer/hooks.js.map +2 -2
- package/cjs/navigation/Link/index.js +6 -2
- package/cjs/navigation/Link/index.js.map +2 -2
- package/cjs/navigation/NavList/NavListAuto/index.js +7 -13
- package/cjs/navigation/NavList/NavListAuto/index.js.map +3 -3
- package/cjs/navigation/NavList/NavListItemAction/index.js +66 -0
- package/cjs/navigation/NavList/NavListItemAction.js.map +7 -0
- package/cjs/navigation/NavList/NavListItemLink/index.js +48 -0
- package/cjs/navigation/NavList/NavListItemLink.js.map +7 -0
- package/cjs/navigation/NavList/index.js +4 -4
- package/cjs/navigation/NavList/index.js.map +2 -2
- package/cjs/navigation/Pagination/hooks/index.js +2 -2
- package/cjs/navigation/Pagination/hooks.js.map +2 -2
- package/cjs/navigation/Tabs/__stories__/Default/index.js +1 -2
- package/cjs/navigation/Tabs/__stories__/Default.js.map +2 -2
- package/cjs/navigation/Tabs/__stories__/UsingAccordion/index.js +7 -8
- package/cjs/navigation/Tabs/__stories__/UsingAccordion.js.map +2 -2
- package/cjs/navigation/Tabs/hooks.js.map +1 -1
- package/cjs/registry/index.js +99 -91
- package/cjs/registry.js.map +2 -2
- package/cjs/typography/CodeBlock/index.js +1 -2
- package/cjs/typography/CodeBlock/index.js.map +2 -2
- package/cjs/utils/hooks/useDebounce/index.js +1 -1
- package/cjs/utils/hooks/useDebounce.js.map +2 -2
- package/content/Accordion/Accordion.stories/index.js +58 -1
- package/content/Accordion/Accordion.stories.d.ts +79 -1
- package/content/Accordion/Accordion.stories.js.map +3 -3
- package/content/Accordion/hooks.js.map +1 -1
- package/content/Blockquote/Blockquote.stories/index.js +18 -0
- package/content/Blockquote/Blockquote.stories.d.ts +27 -0
- package/content/Blockquote/Blockquote.stories.js.map +2 -2
- package/content/Card/Card.stories/index.js +81 -1
- package/content/Card/Card.stories.d.ts +126 -1
- package/content/Card/Card.stories.js.map +3 -3
- package/content/Chip/Chip.stories/index.js +22 -0
- package/content/Chip/Chip.stories.d.ts +36 -0
- package/content/Chip/Chip.stories.js.map +2 -2
- package/content/List/List.stories/index.js +38 -1
- package/content/List/List.stories.d.ts +51 -1
- package/content/List/List.stories.js.map +3 -3
- package/content/Table/Table.stories/index.js +164 -1
- package/content/Table/Table.stories.d.ts +124 -1
- package/content/Table/Table.stories.js.map +3 -3
- package/feedback/CopyToClipboard/CopyToClipboard.stories/index.js +58 -1
- package/feedback/CopyToClipboard/CopyToClipboard.stories.d.ts +81 -1
- package/feedback/CopyToClipboard/CopyToClipboard.stories.js.map +3 -3
- package/feedback/ErrorSummary/ErrorSummary.stories/index.js +39 -1
- package/feedback/ErrorSummary/ErrorSummary.stories.d.ts +42 -1
- package/feedback/ErrorSummary/ErrorSummary.stories.js.map +3 -3
- package/feedback/NotificationBanner/NotificationBanner.stories/index.js +34 -0
- package/feedback/NotificationBanner/NotificationBanner.stories.d.ts +60 -0
- package/feedback/NotificationBanner/NotificationBanner.stories.js.map +2 -2
- package/feedback/PhaseBanner/PhaseBanner.stories/index.js +28 -1
- package/feedback/PhaseBanner/PhaseBanner.stories.d.ts +30 -1
- package/feedback/PhaseBanner/PhaseBanner.stories.js.map +3 -3
- package/feedback/WarningText/WarningText.stories/index.js +22 -0
- package/feedback/WarningText/WarningText.stories.d.ts +36 -0
- package/feedback/WarningText/WarningText.stories.js.map +2 -2
- package/form/AutoComplete/AutoComplete.stories/index.js +74 -0
- package/form/AutoComplete/AutoComplete.stories.d.ts +82 -0
- package/form/AutoComplete/AutoComplete.stories.js.map +3 -3
- package/form/AutoComplete/Status/index.d.ts +1 -1
- package/form/AutoComplete/Status/index.js.map +2 -2
- package/form/AutoComplete/index.d.ts +1 -1
- package/form/AutoComplete/index.js.map +2 -2
- package/form/Button/Button.stories/index.js +43 -3
- package/form/Button/Button.stories.d.ts +59 -2
- package/form/Button/Button.stories.js.map +2 -2
- package/form/Button/ButtonLink/index.js +12 -2
- package/form/Button/ButtonLink.d.ts +6 -2
- package/form/Button/ButtonLink.js.map +3 -3
- package/form/Button/CallToAction/index.js +10 -2
- package/form/Button/CallToAction.d.ts +6 -2
- package/form/Button/CallToAction.js.map +3 -3
- package/form/Button/__stories__/Primary/index.js +18 -1
- package/form/Button/__stories__/Primary.d.ts +8 -1
- package/form/Button/__stories__/Primary.js.map +2 -2
- package/form/Checkbox/Checkbox.stories/index.js +115 -1
- package/form/Checkbox/Checkbox.stories.d.ts +166 -1
- package/form/Checkbox/Checkbox.stories.js.map +3 -3
- package/form/DateInputContainer/DateInputContainer.stories/index.js +82 -1
- package/form/DateInputContainer/DateInputContainer.stories.d.ts +141 -1
- package/form/DateInputContainer/DateInputContainer.stories.js.map +3 -3
- package/form/ErrorMessage/ErrorMessage.stories/index.js +24 -0
- package/form/ErrorMessage/ErrorMessage.stories.d.ts +33 -0
- package/form/ErrorMessage/ErrorMessage.stories.js.map +3 -3
- package/form/RadioContainer/RadioContainer.stories/index.js +117 -1
- package/form/RadioContainer/RadioContainer.stories.d.ts +174 -1
- package/form/RadioContainer/RadioContainer.stories.js.map +3 -3
- package/form/SelectContainer/SelectContainer.stories/index.js +80 -1
- package/form/SelectContainer/SelectContainer.stories.d.ts +135 -1
- package/form/SelectContainer/SelectContainer.stories.js.map +3 -3
- package/form/SingleCharacterInputs/SingleCharacterInput.stories/index.js +98 -1
- package/form/SingleCharacterInputs/SingleCharacterInput.stories.d.ts +108 -1
- package/form/SingleCharacterInputs/SingleCharacterInput.stories.js.map +3 -3
- package/form/TextArea/TextArea.stories/index.js +86 -1
- package/form/TextArea/TextArea.stories.d.ts +117 -1
- package/form/TextArea/TextArea.stories.js.map +3 -3
- package/form/TextInput/TextInput.stories/index.js +93 -0
- package/form/TextInput/TextInput.stories.d.ts +118 -0
- package/form/TextInput/TextInput.stories.js.map +3 -3
- package/govgr/GovGRLogo/index.d.ts +6 -2
- package/govgr/GovGRLogo/index.js +11 -1
- package/govgr/GovGRLogo/index.js.map +3 -3
- package/index.js +1 -1
- package/layouts/Stack/__stories__/AlignItems/index.js +1 -1
- package/layouts/Stack/__stories__/AlignItems.js.map +2 -2
- package/layouts/Stack/__stories__/Default/index.js +1 -1
- package/layouts/Stack/__stories__/Default.js.map +2 -2
- package/layouts/Stack/__stories__/JustifyContent/index.js +1 -1
- package/layouts/Stack/__stories__/JustifyContent.js.map +2 -2
- package/layouts/Stack/__stories__/NoWrap/index.js +1 -1
- package/layouts/Stack/__stories__/NoWrap.js.map +2 -2
- package/layouts/Stack/__stories__/Row/index.js +1 -1
- package/layouts/Stack/__stories__/Row.js.map +2 -2
- package/layouts/Stack/__stories__/Spacing/index.js +1 -1
- package/layouts/Stack/__stories__/Spacing.js.map +2 -2
- package/layouts/Stack/index.d.ts +1 -0
- package/layouts/Stack/index.js +1 -0
- package/layouts/Stack/index.js.map +2 -2
- package/lazy/index.js +13 -2
- package/navigation/BackLink/index.d.ts +6 -2
- package/navigation/BackLink/index.js +12 -2
- package/navigation/BackLink/index.js.map +3 -3
- package/navigation/Breadcrumbs/BreadcrumbsListItemLink/index.js +15 -0
- package/navigation/Breadcrumbs/BreadcrumbsListItemLink/package.json +6 -0
- package/navigation/Breadcrumbs/BreadcrumbsListItemLink.d.ts +7 -0
- package/navigation/Breadcrumbs/BreadcrumbsListItemLink.js.map +7 -0
- package/navigation/Breadcrumbs/index.d.ts +1 -1
- package/navigation/Breadcrumbs/index.js +1 -1
- package/navigation/Breadcrumbs/index.js.map +1 -1
- package/navigation/Drawer/hooks/index.js +2 -6
- package/navigation/Drawer/hooks.js.map +2 -2
- package/navigation/Link/index.js +6 -2
- package/navigation/Link/index.js.map +2 -2
- package/navigation/NavList/NavListAuto/index.js +10 -8
- package/navigation/NavList/NavListAuto/index.js.map +2 -2
- package/navigation/NavList/NavListItemAction/index.js +37 -0
- package/navigation/NavList/NavListItemAction/package.json +6 -0
- package/navigation/NavList/NavListItemAction.d.ts +27 -0
- package/navigation/NavList/NavListItemAction.js.map +7 -0
- package/navigation/NavList/NavListItemLink/index.js +15 -0
- package/navigation/NavList/NavListItemLink/package.json +6 -0
- package/navigation/NavList/NavListItemLink.d.ts +7 -0
- package/navigation/NavList/NavListItemLink.js.map +7 -0
- package/navigation/NavList/index.d.ts +2 -2
- package/navigation/NavList/index.js +2 -2
- package/navigation/NavList/index.js.map +2 -2
- package/navigation/Pagination/hooks/index.js +2 -2
- package/navigation/Pagination/hooks.js.map +2 -2
- package/navigation/Tabs/__stories__/Default/index.js +1 -2
- package/navigation/Tabs/__stories__/Default.js.map +2 -2
- package/navigation/Tabs/__stories__/UsingAccordion/index.js +7 -8
- package/navigation/Tabs/__stories__/UsingAccordion.js.map +2 -2
- package/navigation/Tabs/hooks.d.ts +1 -1
- package/navigation/Tabs/hooks.js.map +1 -1
- package/package.json +7 -7
- package/registry/index.js +99 -91
- package/src/app/BannerContainer/index.test.tsx +4 -0
- package/src/app/Footer/Footer.stories.jsx +179 -0
- package/src/app/Footer/FooterLink.tsx +20 -0
- package/src/app/Footer/index.test.tsx +4 -0
- package/src/app/Footer/index.tsx +1 -1
- package/src/app/Footer/interaction.test.tsx +4 -0
- package/src/app/Header/Header.stories.jsx +102 -0
- package/src/app/Header/HeaderLogo.tsx +18 -2
- package/src/app/Header/HeaderSecondaryLogo.tsx +20 -2
- package/src/app/Header/HeaderTitle.tsx +20 -2
- package/src/app/Header/index.test.tsx +4 -0
- package/src/app/Header/interaction.test.tsx +8 -0
- package/src/app/Loader/index.test.tsx +4 -0
- package/src/app/Masthead/index.test.tsx +4 -0
- package/src/app/Masthead/interaction.test.tsx +4 -0
- package/src/app/Modal/hooks.ts +8 -8
- package/src/app/Modal/index.test.tsx +4 -0
- package/src/app/Modal/index.web.tsx +5 -7
- package/src/app/Modal/interaction.test.tsx +12 -0
- package/src/app/NotFound/index.test.tsx +4 -0
- package/src/app/OutdatedBrowserBanner/index.tsx +1 -1
- package/src/app/Panel/index.test.tsx +4 -0
- package/src/app/PhaseBannerHeader/index.test.tsx +4 -0
- package/src/app/PhaseBannerHeader/index.tsx +1 -1
- package/src/app/QrCodeScanner/index.tsx +0 -1
- package/src/app/QrCodeViewer/index.test.tsx +4 -0
- package/src/app/Skeleton/Skeleton.stories.js +30 -0
- package/src/app/Skeleton/index.test.tsx +4 -0
- package/src/content/Accordion/Accordion.stories.jsx +86 -0
- package/src/content/Accordion/hooks.ts +1 -1
- package/src/content/Accordion/index.test.tsx +4 -0
- package/src/content/Accordion/interaction.test.tsx +4 -0
- package/src/content/Blockquote/Blockquote.stories.js +20 -0
- package/src/content/Blockquote/index.test.tsx +4 -0
- package/src/content/Card/Card.stories.jsx +118 -0
- package/src/content/Card/index.test.tsx +4 -0
- package/src/content/Card/interaction.test.tsx +4 -0
- package/src/content/Chip/Chip.stories.js +22 -0
- package/src/content/Chip/index.test.tsx +4 -0
- package/src/content/Details/index.test.tsx +4 -0
- package/src/content/Details/interaction.test.tsx +4 -0
- package/src/content/List/List.stories.jsx +60 -0
- package/src/content/List/__snapshots__/index.spec.tsx.snap +13 -3
- package/src/content/List/index.test.tsx +4 -0
- package/src/content/Markdown/index.test.tsx +4 -0
- package/src/content/SafeHTML/index.test.tsx +4 -0
- package/src/content/StepNav/index.test.tsx +4 -0
- package/src/content/StepNav/interaction.test.tsx +4 -0
- package/src/content/SummaryList/index.test.tsx +4 -0
- package/src/content/SummaryList/interaction.test.tsx +4 -0
- package/src/content/Table/Table.stories.jsx +216 -0
- package/src/content/Table/index.test.tsx +4 -0
- package/src/content/Table/interaction.test.tsx +8 -0
- package/src/content/TaskList/index.test.tsx +4 -0
- package/src/content/Timeline/index.test.tsx +4 -0
- package/src/doc.mdx +49 -0
- package/src/feedback/CopyToClipboard/CopyToClipboard.stories.jsx +70 -0
- package/src/feedback/CopyToClipboard/doc.mdx +4 -2
- package/src/feedback/CopyToClipboard/index.test.tsx +4 -0
- package/src/feedback/CopyToClipboard/interaction.test.tsx +12 -0
- package/src/feedback/ErrorSummary/ErrorSummary.stories.jsx +67 -0
- package/src/feedback/ErrorSummary/__snapshots__/index.spec.tsx.snap +13 -3
- package/src/feedback/ErrorSummary/index.test.tsx +4 -0
- package/src/feedback/ErrorSummary/interaction.test.tsx +4 -0
- package/src/feedback/NotificationBanner/NotificationBanner.stories.js +36 -0
- package/src/feedback/NotificationBanner/__snapshots__/index.spec.tsx.snap +24 -14
- package/src/feedback/NotificationBanner/index.test.tsx +4 -0
- package/src/feedback/NotificationBanner/interaction.test.tsx +8 -0
- package/src/feedback/PhaseBanner/PhaseBanner.stories.jsx +47 -0
- package/src/feedback/PhaseBanner/index.test.tsx +4 -0
- package/src/feedback/PhaseBanner/interaction.test.tsx +4 -0
- package/src/feedback/WarningText/WarningText.stories.js +24 -0
- package/src/feedback/WarningText/__snapshots__/index.spec.tsx.snap +13 -3
- package/src/feedback/WarningText/index.test.tsx +4 -0
- package/src/form/AutoComplete/AutoComplete.stories.jsx +91 -0
- package/src/form/AutoComplete/Status/index.tsx +1 -1
- package/src/form/AutoComplete/index.test.tsx +4 -0
- package/src/form/AutoComplete/index.tsx +1 -1
- package/src/form/AutoComplete/interaction.test.tsx +4 -0
- package/src/form/Button/Button.stories.js +42 -2
- package/src/form/Button/ButtonLink.tsx +18 -2
- package/src/form/Button/CallToAction.tsx +20 -2
- package/src/form/Button/__stories__/Primary.tsx +24 -2
- package/src/form/Button/index.test.tsx +4 -0
- package/src/form/Button/interaction.test.tsx +20 -0
- package/src/form/Checkbox/Checkbox.stories.jsx +150 -0
- package/src/form/Checkbox/index.test.tsx +4 -0
- package/src/form/Checkbox/interaction.test.tsx +8 -0
- package/src/form/DateInputContainer/DateInputContainer.stories.jsx +115 -0
- package/src/form/DateInputContainer/index.test.tsx +4 -0
- package/src/form/DateInputContainer/interaction.test.tsx +8 -0
- package/src/form/ErrorMessage/ErrorMessage.stories.jsx +42 -0
- package/src/form/ErrorMessage/index.test.tsx +4 -0
- package/src/form/FileUpload/index.test.tsx +4 -0
- package/src/form/RadioContainer/RadioContainer.stories.jsx +157 -0
- package/src/form/RadioContainer/index.test.tsx +4 -0
- package/src/form/RadioContainer/interaction.test.tsx +8 -0
- package/src/form/SearchContainer/index.test.tsx +4 -0
- package/src/form/SelectContainer/SelectContainer.stories.jsx +107 -0
- package/src/form/SelectContainer/index.test.tsx +4 -0
- package/src/form/SelectContainer/interaction.test.tsx +4 -0
- package/src/form/SingleCharacterInputs/SingleCharacterInput.stories.jsx +130 -0
- package/src/form/SingleCharacterInputs/index.test.tsx +4 -0
- package/src/form/TextArea/TextArea.stories.jsx +117 -0
- package/src/form/TextArea/index.test.tsx +4 -0
- package/src/form/TextArea/interaction.test.tsx +12 -0
- package/src/form/TextInput/TextInput.stories.jsx +125 -0
- package/src/form/TextInput/index.test.tsx +4 -0
- package/src/form/TextInput/interaction.test.tsx +8 -0
- package/src/govgr/GovGRLogo/index.tsx +17 -2
- package/src/layouts/Basic/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/layouts/Basic/index.test.tsx +4 -0
- package/src/layouts/Grid/index.test.tsx +4 -0
- package/src/layouts/Screen/index.test.tsx +4 -0
- package/src/layouts/Stack/__stories__/AlignItems.tsx +1 -1
- package/src/layouts/Stack/__stories__/Default.tsx +1 -1
- package/src/layouts/Stack/__stories__/JustifyContent.tsx +1 -1
- package/src/layouts/Stack/__stories__/NoWrap.tsx +1 -1
- package/src/layouts/Stack/__stories__/Row.tsx +1 -1
- package/src/layouts/Stack/__stories__/Spacing.tsx +1 -1
- package/src/layouts/Stack/index.test.tsx +4 -0
- package/src/layouts/Stack/index.tsx +1 -0
- package/src/lazy.js +13 -2
- package/src/navigation/BackLink/doc.mdx +1 -1
- package/src/navigation/BackLink/index.test.tsx +4 -0
- package/src/navigation/BackLink/index.tsx +19 -2
- package/src/navigation/BackLink/interaction.test.tsx +4 -0
- package/src/navigation/BackToTopLink/index.test.tsx +4 -0
- package/src/navigation/Breadcrumbs/BreadcrumbsListItemLink.tsx +22 -0
- package/src/navigation/Breadcrumbs/index.test.tsx +4 -0
- package/src/navigation/Breadcrumbs/index.tsx +1 -1
- package/src/navigation/Breadcrumbs/interaction.test.tsx +12 -0
- package/src/navigation/Drawer/hooks.ts +6 -6
- package/src/navigation/Drawer/index.test.tsx +4 -0
- package/src/navigation/Dropdown/doc.mdx +13 -7
- package/src/navigation/Dropdown/index.test.tsx +4 -0
- package/src/navigation/Dropdown/interaction.test.tsx +20 -0
- package/src/navigation/Link/index.test.tsx +4 -0
- package/src/navigation/Link/index.tsx +10 -5
- package/src/navigation/Link/interaction.test.tsx +12 -0
- package/src/navigation/NavList/NavListAuto/index.tsx +10 -8
- package/src/navigation/NavList/NavListItemAction.tsx +69 -0
- package/src/navigation/NavList/NavListItemLink.tsx +22 -0
- package/src/navigation/NavList/__snapshots__/index.spec.tsx.snap +13 -3
- package/src/navigation/NavList/doc.mdx +17 -15
- package/src/navigation/NavList/index.test.tsx +4 -0
- package/src/navigation/NavList/index.tsx +3 -2
- package/src/navigation/NavList/interaction.test.tsx +12 -0
- package/src/navigation/Pagination/doc.mdx +13 -8
- package/src/navigation/Pagination/hooks.ts +2 -2
- package/src/navigation/Pagination/index.test.tsx +4 -0
- package/src/navigation/Pagination/interaction.test.tsx +4 -0
- package/src/navigation/SkipLink/index.test.tsx +4 -0
- package/src/navigation/Tabs/__stories__/Default.tsx +109 -39
- package/src/navigation/Tabs/__stories__/UsingAccordion.tsx +121 -31
- package/src/navigation/Tabs/hooks.ts +2 -2
- package/src/navigation/Tabs/index.test.tsx +4 -0
- package/src/navigation/Tabs/interaction.test.tsx +6 -0
- package/src/registry.js +99 -91
- package/src/typography/CodeBlock/doc.mdx +1 -1
- package/src/typography/CodeBlock/index.test.tsx +4 -0
- package/src/typography/CodeBlock/index.tsx +14 -12
- package/src/typography/Heading/index.test.tsx +4 -0
- package/src/typography/HeadingCaption/index.test.tsx +4 -0
- package/src/typography/Hint/index.test.tsx +4 -0
- package/src/typography/NormalText/index.test.tsx +4 -0
- package/src/typography/Paragraph/index.test.tsx +4 -0
- package/src/utils/Base/doc.mdx +56 -3
- package/src/utils/VisuallyHidden/index.test.tsx +4 -0
- package/src/utils/hooks/useDebounce.ts +1 -1
- package/typography/CodeBlock/index.d.ts +1 -1
- package/typography/CodeBlock/index.js +1 -2
- package/typography/CodeBlock/index.js.map +2 -2
- package/utils/hooks/useDebounce/index.js +1 -1
- package/utils/hooks/useDebounce.js.map +2 -2
- package/utils/hooks/useLatest.d.ts +1 -1
- package/src/app/Footer/Footer.stories.js +0 -18
- package/src/app/Header/Header.stories.js +0 -20
- package/src/content/Accordion/Accordion.stories.js +0 -14
- package/src/content/Card/Card.stories.js +0 -21
- package/src/content/List/List.stories.js +0 -15
- package/src/content/Table/Table.stories.js +0 -27
- package/src/feedback/CopyToClipboard/CopyToClipboard.stories.js +0 -9
- package/src/feedback/ErrorSummary/ErrorSummary.stories.js +0 -16
- package/src/feedback/PhaseBanner/PhaseBanner.stories.js +0 -11
- package/src/form/AutoComplete/AutoComplete.stories.js +0 -16
- package/src/form/Checkbox/Checkbox.stories.js +0 -19
- package/src/form/DateInputContainer/DateInputContainer.stories.js +0 -14
- package/src/form/ErrorMessage/ErrorMessage.stories.js +0 -12
- package/src/form/RadioContainer/RadioContainer.stories.js +0 -19
- package/src/form/SelectContainer/SelectContainer.stories.js +0 -13
- package/src/form/SingleCharacterInputs/SingleCharacterInput.stories.js +0 -13
- package/src/form/TextArea/TextArea.stories.js +0 -17
- package/src/form/TextInput/TextInput.stories.js +0 -19
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from '@digigov/react-core/BreadcrumbsListItemLinkBase';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import {
|
|
4
|
+
BreadcrumbsListItemLinkBase,
|
|
5
|
+
BreadcrumbsListItemLinkBaseProps,
|
|
6
|
+
} from '@digigov/react-core/BreadcrumbsListItemLinkBase';
|
|
7
|
+
import { Link } from '@digigov/ui/navigation/Link';
|
|
8
|
+
|
|
9
|
+
export interface BreadcrumbsListItemLinkProps
|
|
10
|
+
extends BreadcrumbsListItemLinkBaseProps {}
|
|
11
|
+
|
|
12
|
+
export const BreadcrumbsListItemLink = React.forwardRef<
|
|
13
|
+
HTMLAnchorElement,
|
|
14
|
+
BreadcrumbsListItemLinkProps
|
|
15
|
+
>(function BreadcrumbsListItemLink({ children, ...props }, ref) {
|
|
16
|
+
return (
|
|
17
|
+
<BreadcrumbsListItemLinkBase as={Link} ref={ref} {...props}>
|
|
18
|
+
{children}
|
|
19
|
+
</BreadcrumbsListItemLinkBase>
|
|
20
|
+
);
|
|
21
|
+
});
|
|
22
|
+
export default BreadcrumbsListItemLink;
|
|
@@ -30,6 +30,10 @@ test('renders the All Breadcrumbs variants', async ({ mount, page }) => {
|
|
|
30
30
|
)
|
|
31
31
|
await page.evaluate(() => document.fonts.ready);
|
|
32
32
|
|
|
33
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
34
|
+
await page.mouse.move(0, 0);
|
|
35
|
+
|
|
36
|
+
|
|
33
37
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
34
38
|
expect(screenshot).toMatchSnapshot();
|
|
35
39
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from '@digigov/react-core/Breadcrumbs';
|
|
2
2
|
export * from '@digigov/react-core/BreadcrumbsList';
|
|
3
3
|
export * from '@digigov/react-core/BreadcrumbsListItemWrapper';
|
|
4
|
-
export * from '@digigov/
|
|
4
|
+
export * from '@digigov/ui/navigation/Breadcrumbs/BreadcrumbsListItemLink';
|
|
5
5
|
import Breadcrumbs from '@digigov/react-core/Breadcrumbs';
|
|
6
6
|
|
|
7
7
|
export * from '@digigov/ui/navigation/Breadcrumbs/BreadcrumbsListItem';
|
|
@@ -8,6 +8,10 @@ import { WithHook } from '@digigov/ui/navigation/Breadcrumbs/__stories__/WithHoo
|
|
|
8
8
|
test('renders the Default Hover and click', async ({ mount, page }) => {
|
|
9
9
|
await mount(<Default />);
|
|
10
10
|
await page.evaluate(() => document.fonts.ready);
|
|
11
|
+
|
|
12
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
13
|
+
await page.mouse.move(0, 0);
|
|
14
|
+
|
|
11
15
|
await page.locator('#root>nav>ol>li:nth-child(1)>a').hover();
|
|
12
16
|
await page.locator('#root>nav>ol>li:nth-child(1)>a').click();
|
|
13
17
|
await page.keyboard.press('Tab');
|
|
@@ -22,6 +26,10 @@ test('renders the Default Hover and click', async ({ mount, page }) => {
|
|
|
22
26
|
test('renders the WithHook click', async ({ mount, page }) => {
|
|
23
27
|
await mount(<WithHook />);
|
|
24
28
|
await page.evaluate(() => document.fonts.ready);
|
|
29
|
+
|
|
30
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
31
|
+
await page.mouse.move(0, 0);
|
|
32
|
+
|
|
25
33
|
await page.click("[id='Εγχειρίδια Νομοθεσίας Πυρασφάλειας']");
|
|
26
34
|
|
|
27
35
|
const screenshot = await page.screenshot({
|
|
@@ -34,6 +42,10 @@ test('renders the WithHook click', async ({ mount, page }) => {
|
|
|
34
42
|
test('renders the Auto click', async ({ mount, page }) => {
|
|
35
43
|
await mount(<Auto />);
|
|
36
44
|
await page.evaluate(() => document.fonts.ready);
|
|
45
|
+
|
|
46
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
47
|
+
await page.mouse.move(0, 0);
|
|
48
|
+
|
|
37
49
|
await page.click("[id='Εγχειρίδια Νομοθεσίας Πυρασφάλειας']");
|
|
38
50
|
|
|
39
51
|
const screenshot = await page.screenshot({
|
|
@@ -28,12 +28,12 @@ export interface UseDrawerReturn {
|
|
|
28
28
|
|
|
29
29
|
export const useDrawer = (): UseDrawerReturn => {
|
|
30
30
|
const [currentOpen, setCurrentOpen] = useState<DrawerId | null>(null);
|
|
31
|
-
const drawersRef = useRef<
|
|
32
|
-
|
|
33
|
-
);
|
|
34
|
-
const buttonsRef = useRef<
|
|
35
|
-
|
|
36
|
-
);
|
|
31
|
+
const drawersRef = useRef<
|
|
32
|
+
Map<DrawerId, React.RefObject<HTMLDivElement | null>>
|
|
33
|
+
>(new Map());
|
|
34
|
+
const buttonsRef = useRef<
|
|
35
|
+
Map<DrawerId, React.RefObject<HTMLButtonElement | null>>
|
|
36
|
+
>(new Map());
|
|
37
37
|
|
|
38
38
|
const open = useCallback((id: DrawerId) => {
|
|
39
39
|
setCurrentOpen(id);
|
|
@@ -22,6 +22,10 @@ test('renders the All Drawer variants', async ({ mount, page }) => {
|
|
|
22
22
|
)
|
|
23
23
|
await page.evaluate(() => document.fonts.ready);
|
|
24
24
|
|
|
25
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
26
|
+
await page.mouse.move(0, 0);
|
|
27
|
+
|
|
28
|
+
|
|
25
29
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
26
30
|
expect(screenshot).toMatchSnapshot();
|
|
27
31
|
});
|
|
@@ -7,22 +7,28 @@ title: Dropdown
|
|
|
7
7
|
|
|
8
8
|
## How to use
|
|
9
9
|
|
|
10
|
-
<
|
|
11
|
-
|
|
10
|
+
<div className="dropdown-docs">
|
|
11
|
+
<code src="@digigov/ui/navigation/Dropdown/__stories__/Default.tsx" />
|
|
12
|
+
</div>
|
|
12
13
|
### Dropdown with align right
|
|
13
14
|
|
|
14
15
|
You can display the dropdown menu to the right side of the `Dropdown` button.
|
|
15
16
|
|
|
16
|
-
<
|
|
17
|
-
|
|
17
|
+
<div className="dropdown-docs">
|
|
18
|
+
<code src="@digigov/ui/navigation/Dropdown/__stories__/AlignRight.tsx" />
|
|
19
|
+
</div>
|
|
18
20
|
### Dropdown with placement top
|
|
19
21
|
|
|
20
22
|
You can display the dropdown menu to the top of the `Dropdown` button.
|
|
21
23
|
|
|
22
|
-
<
|
|
24
|
+
<div className="dropdown-docs">
|
|
25
|
+
<code src="@digigov/ui/navigation/Dropdown/__stories__/PlacementTop.tsx" />
|
|
26
|
+
</div>
|
|
23
27
|
|
|
24
28
|
## API
|
|
25
29
|
|
|
26
|
-
See below for a complete reference to all of the props
|
|
30
|
+
See below for a complete reference to all of the props available to the components mentioned here.
|
|
27
31
|
|
|
28
|
-
<ComponentProps
|
|
32
|
+
<ComponentProps
|
|
33
|
+
componentName={['DropdownBase', 'DropdownButton', 'DropdownContent']}
|
|
34
|
+
/>
|
|
@@ -54,6 +54,10 @@ test('renders the All Dropdown variants', async ({ mount, page }) => {
|
|
|
54
54
|
)
|
|
55
55
|
await page.evaluate(() => document.fonts.ready);
|
|
56
56
|
|
|
57
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
58
|
+
await page.mouse.move(0, 0);
|
|
59
|
+
|
|
60
|
+
|
|
57
61
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
58
62
|
expect(screenshot).toMatchSnapshot();
|
|
59
63
|
});
|
|
@@ -10,6 +10,10 @@ import { ScrollableContent } from '@digigov/ui/navigation/Dropdown/__stories__/S
|
|
|
10
10
|
test('renders the AlignRight Align right action', async ({ mount, page }) => {
|
|
11
11
|
await mount(<AlignRight />);
|
|
12
12
|
await page.evaluate(() => document.fonts.ready);
|
|
13
|
+
|
|
14
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
15
|
+
await page.mouse.move(0, 0);
|
|
16
|
+
|
|
13
17
|
await page.locator('#root>div>details>summary').click();
|
|
14
18
|
const screenshot = await page.screenshot({
|
|
15
19
|
fullPage: true,
|
|
@@ -21,6 +25,10 @@ test('renders the AlignRight Align right action', async ({ mount, page }) => {
|
|
|
21
25
|
test('renders the Default Open dropdown action', async ({ mount, page }) => {
|
|
22
26
|
await mount(<Default />);
|
|
23
27
|
await page.evaluate(() => document.fonts.ready);
|
|
28
|
+
|
|
29
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
30
|
+
await page.mouse.move(0, 0);
|
|
31
|
+
|
|
24
32
|
await page.locator('#root>details>summary').click();
|
|
25
33
|
const screenshot = await page.screenshot({
|
|
26
34
|
fullPage: true,
|
|
@@ -32,6 +40,10 @@ test('renders the Default Open dropdown action', async ({ mount, page }) => {
|
|
|
32
40
|
test('renders the Dense Open dropdown action', async ({ mount, page }) => {
|
|
33
41
|
await mount(<Dense />);
|
|
34
42
|
await page.evaluate(() => document.fonts.ready);
|
|
43
|
+
|
|
44
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
45
|
+
await page.mouse.move(0, 0);
|
|
46
|
+
|
|
35
47
|
await page.locator('#root>details>summary').click();
|
|
36
48
|
const screenshot = await page.screenshot({
|
|
37
49
|
fullPage: true,
|
|
@@ -46,6 +58,10 @@ test('renders the PlacementTop Placement top action', async ({
|
|
|
46
58
|
}) => {
|
|
47
59
|
await mount(<PlacementTop />);
|
|
48
60
|
await page.evaluate(() => document.fonts.ready);
|
|
61
|
+
|
|
62
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
63
|
+
await page.mouse.move(0, 0);
|
|
64
|
+
|
|
49
65
|
await page.locator('#root>div>details>summary').click();
|
|
50
66
|
const screenshot = await page.screenshot({
|
|
51
67
|
fullPage: true,
|
|
@@ -57,6 +73,10 @@ test('renders the PlacementTop Placement top action', async ({
|
|
|
57
73
|
test('renders the ScrollableContent open content', async ({ mount, page }) => {
|
|
58
74
|
await mount(<ScrollableContent />);
|
|
59
75
|
await page.evaluate(() => document.fonts.ready);
|
|
76
|
+
|
|
77
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
78
|
+
await page.mouse.move(0, 0);
|
|
79
|
+
|
|
60
80
|
await page.locator('#root>details>summary').click();
|
|
61
81
|
const screenshot = await page.screenshot({
|
|
62
82
|
fullPage: true,
|
|
@@ -38,6 +38,10 @@ test('renders the All Link variants', async ({ mount, page }) => {
|
|
|
38
38
|
)
|
|
39
39
|
await page.evaluate(() => document.fonts.ready);
|
|
40
40
|
|
|
41
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
42
|
+
await page.mouse.move(0, 0);
|
|
43
|
+
|
|
44
|
+
|
|
41
45
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
42
46
|
expect(screenshot).toMatchSnapshot();
|
|
43
47
|
});
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import LinkBase, { LinkBaseProps } from '@digigov/react-core/LinkBase';
|
|
3
|
-
|
|
4
3
|
export interface LinkComponentContextProps {
|
|
5
4
|
component: React.ElementType<LinkProps>;
|
|
6
5
|
children?: React.ReactNode;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
export const CommonLink: React.FC<LinkProps> = (props) =>
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
export const CommonLink: React.FC<LinkProps> = (props) => {
|
|
9
|
+
const defaultStyle = !props.className;
|
|
10
|
+
const underline = props.className ? !defaultStyle : defaultStyle;
|
|
11
|
+
return (
|
|
12
|
+
<LinkBase defaultStyle={defaultStyle} underline={underline} {...props}>
|
|
13
|
+
{props.children}
|
|
14
|
+
</LinkBase>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
12
17
|
|
|
13
18
|
const LinkComponentContext =
|
|
14
|
-
React.createContext<React.ElementType<LinkProps>>(
|
|
19
|
+
React.createContext<React.ElementType<LinkProps>>(CommonLink);
|
|
15
20
|
export const LinkProvider: React.FC<LinkComponentContextProps> = (props) => {
|
|
16
21
|
return (
|
|
17
22
|
<LinkComponentContext.Provider value={props.component}>
|
|
@@ -8,6 +8,10 @@ import { NoUnderline } from '@digigov/ui/navigation/Link/__stories__/NoUnderline
|
|
|
8
8
|
test('renders the DarkBackground Hover and focus', async ({ mount, page }) => {
|
|
9
9
|
await mount(<DarkBackground />);
|
|
10
10
|
await page.evaluate(() => document.fonts.ready);
|
|
11
|
+
|
|
12
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
13
|
+
await page.mouse.move(0, 0);
|
|
14
|
+
|
|
11
15
|
await page.locator('#root>section>a').hover();
|
|
12
16
|
await page.locator('#root>section>a').click();
|
|
13
17
|
|
|
@@ -21,6 +25,10 @@ test('renders the DarkBackground Hover and focus', async ({ mount, page }) => {
|
|
|
21
25
|
test('renders the Default Focus', async ({ mount, page }) => {
|
|
22
26
|
await mount(<Default />);
|
|
23
27
|
await page.evaluate(() => document.fonts.ready);
|
|
28
|
+
|
|
29
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
30
|
+
await page.mouse.move(0, 0);
|
|
31
|
+
|
|
24
32
|
await page.keyboard.press('Tab');
|
|
25
33
|
const screenshot = await page.screenshot({
|
|
26
34
|
fullPage: true,
|
|
@@ -32,6 +40,10 @@ test('renders the Default Focus', async ({ mount, page }) => {
|
|
|
32
40
|
test('renders the NoUnderline Hover and focus', async ({ mount, page }) => {
|
|
33
41
|
await mount(<NoUnderline />);
|
|
34
42
|
await page.evaluate(() => document.fonts.ready);
|
|
43
|
+
|
|
44
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
45
|
+
await page.mouse.move(0, 0);
|
|
46
|
+
|
|
35
47
|
await page.locator('#root>a').hover();
|
|
36
48
|
await page.locator('#root>a').click();
|
|
37
49
|
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import NavList from '@digigov/react-core/NavList';
|
|
3
|
-
import NavListItemAction from '@digigov/react-core/NavListItemAction';
|
|
4
|
-
import NavMenuContainer from '@digigov/react-core/NavMenuContainer';
|
|
5
|
-
import NavMenuContent from '@digigov/react-core/NavMenuContent';
|
|
6
|
-
import NavMenuContentListItem from '@digigov/react-core/NavMenuContentListItem';
|
|
7
|
-
import NavMenuTitle from '@digigov/react-core/NavMenuTitle';
|
|
8
2
|
import { Link } from '@digigov/ui/navigation/Link';
|
|
3
|
+
import {
|
|
4
|
+
NavList,
|
|
5
|
+
NavListItemAction,
|
|
6
|
+
NavMenuContentList,
|
|
7
|
+
NavMenuContentListItem,
|
|
8
|
+
NavMenuContent,
|
|
9
|
+
NavMenuContainer,
|
|
10
|
+
NavMenuTitle,
|
|
11
|
+
} from '@digigov/ui/navigation/NavList';
|
|
9
12
|
import { useNavList } from '@digigov/ui/navigation/NavList/hooks/useNavList';
|
|
10
|
-
import Nav from '@digigov/ui/navigation/NavList/Nav';
|
|
11
|
-
import NavMenuContentList from '@digigov/ui/navigation/NavList/NavMenuContentList';
|
|
13
|
+
import { Nav } from '@digigov/ui/navigation/NavList/Nav';
|
|
12
14
|
import { NavListAutoProps } from '@digigov/ui/navigation/NavList/types';
|
|
13
15
|
|
|
14
16
|
export const NavListAuto: React.FC<NavListAutoProps> = ({
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export * from '@digigov/react-core/NavListItemActionBase';
|
|
2
|
+
import React, { ForwardedRef } from 'react';
|
|
3
|
+
import {
|
|
4
|
+
NavListItemButton,
|
|
5
|
+
NavListItemButtonProps,
|
|
6
|
+
NavListItemBadge,
|
|
7
|
+
NavListItemActionContainer,
|
|
8
|
+
} from '@digigov/ui/navigation/NavList';
|
|
9
|
+
import {
|
|
10
|
+
NavListItemLink,
|
|
11
|
+
NavListItemLinkProps,
|
|
12
|
+
} from '@digigov/ui/navigation/NavList/NavListItemLink';
|
|
13
|
+
|
|
14
|
+
export type LinkButtonJoinProps = NavListItemLinkProps & NavListItemButtonProps;
|
|
15
|
+
export interface NavListItemActionBaseProps extends LinkButtonJoinProps {
|
|
16
|
+
/**
|
|
17
|
+
* label is optional.
|
|
18
|
+
* The label for the NavListItemActionBase.
|
|
19
|
+
*/
|
|
20
|
+
label?: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* arrow is optional.
|
|
24
|
+
* use arrow prop if you want to have arrow at the nav list item.
|
|
25
|
+
* @value true
|
|
26
|
+
* @value false
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
arrow?: boolean;
|
|
30
|
+
badgeText?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* NavListItemAction must be inside the NavList.
|
|
34
|
+
* This component has a items of NavListItemLink component inside.
|
|
35
|
+
*/
|
|
36
|
+
export const NavListItemAction = React.forwardRef<
|
|
37
|
+
HTMLButtonElement | HTMLAnchorElement,
|
|
38
|
+
NavListItemActionBaseProps
|
|
39
|
+
>(function NavListItemAction(
|
|
40
|
+
{ label, arrow = false, href, className, children, ...props },
|
|
41
|
+
ref
|
|
42
|
+
) {
|
|
43
|
+
return (
|
|
44
|
+
<NavListItemActionContainer>
|
|
45
|
+
{href ? (
|
|
46
|
+
<NavListItemLink
|
|
47
|
+
{...props}
|
|
48
|
+
href={href}
|
|
49
|
+
className={className}
|
|
50
|
+
ref={ref as ForwardedRef<HTMLAnchorElement>}
|
|
51
|
+
>
|
|
52
|
+
{children || label}
|
|
53
|
+
</NavListItemLink>
|
|
54
|
+
) : (
|
|
55
|
+
<NavListItemButton
|
|
56
|
+
{...props}
|
|
57
|
+
arrow={arrow}
|
|
58
|
+
className={className}
|
|
59
|
+
ref={ref as ForwardedRef<HTMLButtonElement>}
|
|
60
|
+
>
|
|
61
|
+
{children || label}
|
|
62
|
+
</NavListItemButton>
|
|
63
|
+
)}
|
|
64
|
+
{props.badgeText && <NavListItemBadge text={props.badgeText} />}
|
|
65
|
+
</NavListItemActionContainer>
|
|
66
|
+
);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export default NavListItemAction;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from '@digigov/react-core/NavListItemLinkBase';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import {
|
|
4
|
+
NavListItemLinkBase,
|
|
5
|
+
NavListItemLinkBaseProps,
|
|
6
|
+
} from '@digigov/react-core/NavListItemLinkBase';
|
|
7
|
+
import { Link } from '@digigov/ui/navigation/Link';
|
|
8
|
+
|
|
9
|
+
export interface NavListItemLinkProps extends NavListItemLinkBaseProps {}
|
|
10
|
+
|
|
11
|
+
export const NavListItemLink = React.forwardRef<
|
|
12
|
+
HTMLAnchorElement,
|
|
13
|
+
NavListItemLinkProps
|
|
14
|
+
>(function NavListItemLink({ children, ...props }, ref) {
|
|
15
|
+
return (
|
|
16
|
+
<NavListItemLinkBase as={Link} ref={ref} {...props}>
|
|
17
|
+
{children}
|
|
18
|
+
</NavListItemLinkBase>
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export default NavListItemLink;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`renders the ErrorSummary with sample data 1`] = `
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Object {
|
|
5
|
+
"$$typeof": Symbol(react.transitional.element),
|
|
6
|
+
"_owner": null,
|
|
7
|
+
"_store": Object {},
|
|
8
|
+
"key": null,
|
|
9
|
+
"props": Object {
|
|
10
|
+
"children": "this is some random warning text",
|
|
11
|
+
},
|
|
12
|
+
"type": Object {
|
|
13
|
+
"$$typeof": Symbol(react.forward_ref),
|
|
14
|
+
"render": [Function],
|
|
15
|
+
},
|
|
16
|
+
}
|
|
7
17
|
`;
|
|
@@ -19,7 +19,6 @@ import PhaseBanner, { PhaseBannerTag } from '@digigov/ui/feedback/PhaseBanner';
|
|
|
19
19
|
|
|
20
20
|
<code src="@digigov/ui/navigation/NavList/__stories__/HorizontalWithoutDrawer.tsx" />
|
|
21
21
|
|
|
22
|
-
|
|
23
22
|
### Vertical NavList with submenu
|
|
24
23
|
|
|
25
24
|
<code src="@digigov/ui/navigation/NavList/__stories__/VerticalWithoutDrawer.tsx" />
|
|
@@ -27,7 +26,7 @@ import PhaseBanner, { PhaseBannerTag } from '@digigov/ui/feedback/PhaseBanner';
|
|
|
27
26
|
### Auto
|
|
28
27
|
|
|
29
28
|
<PhaseBanner>
|
|
30
|
-
|
|
29
|
+
<PhaseBannerTag>EXPERIMENTAL</PhaseBannerTag>
|
|
31
30
|
</PhaseBanner>
|
|
32
31
|
|
|
33
32
|
This is an implementation of NavList, utilizing the `useNavList` hook to register each item along with its associated content.
|
|
@@ -42,16 +41,19 @@ implementation in the ARIA Authoring Practices Guide (APG) at
|
|
|
42
41
|
|
|
43
42
|
## API
|
|
44
43
|
|
|
45
|
-
See below for a complete reference to all of the props
|
|
46
|
-
|
|
47
|
-
<ComponentProps
|
|
48
|
-
[
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
See below for a complete reference to all of the props available to the components mentioned here.
|
|
45
|
+
|
|
46
|
+
<ComponentProps
|
|
47
|
+
componentName={[
|
|
48
|
+
'Nav',
|
|
49
|
+
'NavList',
|
|
50
|
+
'NavListAction',
|
|
51
|
+
'NavListItemActionContainer',
|
|
52
|
+
'NavListItemButton',
|
|
53
|
+
'NavListItemLinkBase',
|
|
54
|
+
'NavMenuContainer',
|
|
55
|
+
'NavMenuContentListBase',
|
|
56
|
+
'NavMenuContentListItem',
|
|
57
|
+
'NavMenuTitle',
|
|
58
|
+
]}
|
|
59
|
+
/>{' '}
|
|
@@ -46,6 +46,10 @@ test('renders the All NavList variants', async ({ mount, page }) => {
|
|
|
46
46
|
)
|
|
47
47
|
await page.evaluate(() => document.fonts.ready);
|
|
48
48
|
|
|
49
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
50
|
+
await page.mouse.move(0, 0);
|
|
51
|
+
|
|
52
|
+
|
|
49
53
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
50
54
|
expect(screenshot).toMatchSnapshot();
|
|
51
55
|
});
|
|
@@ -12,8 +12,9 @@ export * from '@digigov/react-core/NavMenuContentListBase';
|
|
|
12
12
|
export * from '@digigov/react-core/NavMenuContentListItem';
|
|
13
13
|
export * from '@digigov/react-core/NavMenuTitle';
|
|
14
14
|
export * from '@digigov/react-core/NavListItemActionContainer';
|
|
15
|
-
export * from '@digigov/
|
|
15
|
+
export * from '@digigov/ui/navigation/NavList/NavListItemAction';
|
|
16
16
|
export * from '@digigov/react-core/NavListItemBadge';
|
|
17
17
|
export * from '@digigov/react-core/NavListItemButton';
|
|
18
|
-
export * from '@digigov/
|
|
18
|
+
export * from '@digigov/ui/navigation/NavList/NavListItemLink';
|
|
19
|
+
|
|
19
20
|
export default NavList;
|
|
@@ -11,6 +11,10 @@ test('renders the HorizontalWithoutDrawer Open submenu', async ({
|
|
|
11
11
|
}) => {
|
|
12
12
|
await mount(<HorizontalWithoutDrawer />);
|
|
13
13
|
await page.evaluate(() => document.fonts.ready);
|
|
14
|
+
|
|
15
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
16
|
+
await page.mouse.move(0, 0);
|
|
17
|
+
|
|
14
18
|
await page.locator('#root>nav>ul>li:nth-child(2)>button').click();
|
|
15
19
|
const screenshot = await page.screenshot({
|
|
16
20
|
fullPage: true,
|
|
@@ -25,6 +29,10 @@ test('renders the VerticalWithoutDrawer Open submenu', async ({
|
|
|
25
29
|
}) => {
|
|
26
30
|
await mount(<VerticalWithoutDrawer />);
|
|
27
31
|
await page.evaluate(() => document.fonts.ready);
|
|
32
|
+
|
|
33
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
34
|
+
await page.mouse.move(0, 0);
|
|
35
|
+
|
|
28
36
|
await page.locator('#root>nav>ul>li:nth-child(2)>button').click();
|
|
29
37
|
const screenshot = await page.screenshot({
|
|
30
38
|
fullPage: true,
|
|
@@ -36,6 +44,10 @@ test('renders the VerticalWithoutDrawer Open submenu', async ({
|
|
|
36
44
|
test('renders the UsingHeaderButton menu', async ({ mount, page }) => {
|
|
37
45
|
await mount(<UsingHeaderButton />);
|
|
38
46
|
await page.evaluate(() => document.fonts.ready);
|
|
47
|
+
|
|
48
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
49
|
+
await page.mouse.move(0, 0);
|
|
50
|
+
|
|
39
51
|
await page.locator('button:text("Επιλογές")').click();
|
|
40
52
|
const screenshot = await page.screenshot({
|
|
41
53
|
fullPage: true,
|
|
@@ -3,6 +3,10 @@ id: pagination
|
|
|
3
3
|
title: Pagination
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
# Pagination
|
|
7
|
+
|
|
8
|
+
pagination component displays a list of page numbers, and allows the user to navigate to a specific page.
|
|
9
|
+
|
|
6
10
|
## How to use
|
|
7
11
|
|
|
8
12
|
<code src="@digigov/ui/navigation/Pagination/__stories__/Default.tsx" />
|
|
@@ -21,12 +25,13 @@ title: Pagination
|
|
|
21
25
|
|
|
22
26
|
## API
|
|
23
27
|
|
|
24
|
-
See below for a complete reference to all of the props
|
|
28
|
+
See below for a complete reference to all of the props available to the components mentioned here.
|
|
25
29
|
|
|
26
|
-
<ComponentProps
|
|
27
|
-
[
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
]}
|
|
30
|
+
<ComponentProps
|
|
31
|
+
componentName={[
|
|
32
|
+
'Pagination',
|
|
33
|
+
'PaginationLabel',
|
|
34
|
+
'PaginationList',
|
|
35
|
+
'PaginationListItem',
|
|
36
|
+
]}
|
|
37
|
+
/>{' '}
|
|
@@ -53,8 +53,8 @@ export const usePagination = ({
|
|
|
53
53
|
? currentPage * currentResultsPerPage
|
|
54
54
|
: total;
|
|
55
55
|
|
|
56
|
-
const labelRef = useRef<React.RefObject<HTMLDivElement>>();
|
|
57
|
-
const selectLabelRef = useRef<React.RefObject<HTMLLabelElement>>();
|
|
56
|
+
const labelRef = useRef<React.RefObject<HTMLDivElement>>(undefined);
|
|
57
|
+
const selectLabelRef = useRef<React.RefObject<HTMLLabelElement>>(undefined);
|
|
58
58
|
|
|
59
59
|
useEffect(() => {
|
|
60
60
|
setCurrentPage(totalPages < currentPage ? totalPages : currentPage);
|
|
@@ -38,6 +38,10 @@ test('renders the All Pagination variants', async ({ mount, page }) => {
|
|
|
38
38
|
)
|
|
39
39
|
await page.evaluate(() => document.fonts.ready);
|
|
40
40
|
|
|
41
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
42
|
+
await page.mouse.move(0, 0);
|
|
43
|
+
|
|
44
|
+
|
|
41
45
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
42
46
|
expect(screenshot).toMatchSnapshot();
|
|
43
47
|
});
|
|
@@ -6,6 +6,10 @@ import { Default } from '@digigov/ui/navigation/Pagination/__stories__/Default';
|
|
|
6
6
|
test('renders the Default Hover and click no3', async ({ mount, page }) => {
|
|
7
7
|
await mount(<Default />);
|
|
8
8
|
await page.evaluate(() => document.fonts.ready);
|
|
9
|
+
|
|
10
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
11
|
+
await page.mouse.move(0, 0);
|
|
12
|
+
|
|
9
13
|
await page.locator('#root>nav:nth-child(1)>ul>li:nth-child(4)>a').hover();
|
|
10
14
|
await page.locator('#root>nav:nth-child(1)>ul>li:nth-child(4)>a').click();
|
|
11
15
|
|
|
@@ -14,6 +14,10 @@ test('renders the All SkipLink variants', async ({ mount, page }) => {
|
|
|
14
14
|
)
|
|
15
15
|
await page.evaluate(() => document.fonts.ready);
|
|
16
16
|
|
|
17
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
18
|
+
await page.mouse.move(0, 0);
|
|
19
|
+
|
|
20
|
+
|
|
17
21
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
18
22
|
expect(screenshot).toMatchSnapshot();
|
|
19
23
|
});
|