@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
|
@@ -18,6 +18,10 @@ test('renders the All QrCodeViewer variants', async ({ mount, page }) => {
|
|
|
18
18
|
)
|
|
19
19
|
await page.evaluate(() => document.fonts.ready);
|
|
20
20
|
|
|
21
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
22
|
+
await page.mouse.move(0, 0);
|
|
23
|
+
|
|
24
|
+
|
|
21
25
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
22
26
|
expect(screenshot).toMatchSnapshot();
|
|
23
27
|
});
|
|
@@ -7,6 +7,36 @@ export default {
|
|
|
7
7
|
component: Skeleton,
|
|
8
8
|
displayName: 'Skeleton',
|
|
9
9
|
};
|
|
10
|
+
|
|
11
|
+
export const WithControls = {
|
|
12
|
+
args: {
|
|
13
|
+
variant: 'text',
|
|
14
|
+
fontSize: 'sm',
|
|
15
|
+
animation: false,
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
argTypes: {
|
|
19
|
+
variant: {
|
|
20
|
+
options: ['circular', 'rectangular', 'text', 'button'],
|
|
21
|
+
control: { type: 'radio' },
|
|
22
|
+
},
|
|
23
|
+
fontSize: {
|
|
24
|
+
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
25
|
+
control: { type: 'select' },
|
|
26
|
+
if: { arg: 'variant', eq: 'text' },
|
|
27
|
+
},
|
|
28
|
+
width: {
|
|
29
|
+
control: { type: 'number', min: 0 },
|
|
30
|
+
},
|
|
31
|
+
height: {
|
|
32
|
+
control: { type: 'number', min: 0 },
|
|
33
|
+
},
|
|
34
|
+
animation: {
|
|
35
|
+
control: { type: 'boolean' },
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
10
40
|
export { Default } from '@digigov/ui/app/Skeleton/__stories__/Default';
|
|
11
41
|
export { TextSizes } from '@digigov/ui/app/Skeleton/__stories__/TextSizes';
|
|
12
42
|
export { Rectangular } from '@digigov/ui/app/Skeleton/__stories__/Rectangular';
|
|
@@ -46,6 +46,10 @@ test('renders the All Skeleton 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
|
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Accordion,
|
|
5
|
+
AccordionSection,
|
|
6
|
+
AccordionSectionContent,
|
|
7
|
+
AccordionSectionSummary,
|
|
8
|
+
AccordionSectionSummaryHeading,
|
|
9
|
+
} from '@digigov/ui/content/Accordion';
|
|
10
|
+
import { Hint } from '@digigov/ui/typography/Hint';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'Digigov UI/content/Accordion',
|
|
14
|
+
tags: ['Experimental'],
|
|
15
|
+
description:
|
|
16
|
+
'The accordion component lets users show and hide sections of related content on a page.',
|
|
17
|
+
link: 'https://guide.services.gov.gr/docs/components/accordion',
|
|
18
|
+
component: Accordion,
|
|
19
|
+
displayName: 'Accordion',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const WithControls = {
|
|
23
|
+
render: (args) => {
|
|
24
|
+
return (
|
|
25
|
+
<Accordion
|
|
26
|
+
horizontalBorders={args.horizontalBorders}
|
|
27
|
+
summaryColor={args.summaryColor}
|
|
28
|
+
dense={args.dense}
|
|
29
|
+
>
|
|
30
|
+
<AccordionSection open>
|
|
31
|
+
<AccordionSectionSummary>
|
|
32
|
+
<AccordionSectionSummaryHeading aria-controls="content1">
|
|
33
|
+
{args.title}
|
|
34
|
+
</AccordionSectionSummaryHeading>
|
|
35
|
+
{args.hint > 0 && <Hint>{args.hintMessage}</Hint>}
|
|
36
|
+
</AccordionSectionSummary>
|
|
37
|
+
<AccordionSectionContent id="content1">
|
|
38
|
+
{args.content}
|
|
39
|
+
</AccordionSectionContent>
|
|
40
|
+
</AccordionSection>
|
|
41
|
+
</Accordion>
|
|
42
|
+
);
|
|
43
|
+
},
|
|
44
|
+
args: {
|
|
45
|
+
title: 'Διαφορές με το δημόσιο',
|
|
46
|
+
hint: true,
|
|
47
|
+
hintMessage:
|
|
48
|
+
'Δικαστικές και εξωδικαστικές διαφορές με το Δημόσιο, εκκαθάριση δικαστικών δαπανών κ.ά.',
|
|
49
|
+
content:
|
|
50
|
+
'Παρακάτω μπορείτε να δείτε την διαθέσιμη και ενεργή υπηρεσία που αφορά το επιλεγμένο γεγονός ζωής.',
|
|
51
|
+
horizontalBorders: 'top',
|
|
52
|
+
summaryColor: 'primary',
|
|
53
|
+
dense: false,
|
|
54
|
+
},
|
|
55
|
+
argTypes: {
|
|
56
|
+
title: {
|
|
57
|
+
control: { type: 'text' },
|
|
58
|
+
},
|
|
59
|
+
hint: {
|
|
60
|
+
control: { type: 'boolean' },
|
|
61
|
+
},
|
|
62
|
+
hintMessage: {
|
|
63
|
+
control: { type: 'text' },
|
|
64
|
+
if: { arg: 'hint', eq: true },
|
|
65
|
+
},
|
|
66
|
+
content: {
|
|
67
|
+
control: { type: 'text' },
|
|
68
|
+
},
|
|
69
|
+
horizontalBorders: {
|
|
70
|
+
options: ['none', 'top', 'bottom'],
|
|
71
|
+
control: { type: 'select' },
|
|
72
|
+
},
|
|
73
|
+
summaryColor: {
|
|
74
|
+
options: ['primary', 'secondary'],
|
|
75
|
+
control: { type: 'select' },
|
|
76
|
+
},
|
|
77
|
+
dense: {
|
|
78
|
+
control: { type: 'boolean' },
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export { Default } from '@digigov/ui/content/Accordion/__stories__/Default';
|
|
84
|
+
export { WithHints } from '@digigov/ui/content/Accordion/__stories__/WithHints';
|
|
85
|
+
export { WithHook } from '@digigov/ui/content/Accordion/__stories__/WithHook';
|
|
86
|
+
export { Auto } from '@digigov/ui/content/Accordion/__stories__/Auto';
|
|
@@ -34,7 +34,7 @@ export const useAccordion = ({
|
|
|
34
34
|
singleOpen = false,
|
|
35
35
|
}: UseAccordionProps = {}): UseAccordionReturn => {
|
|
36
36
|
const sectionsRef = useRef<
|
|
37
|
-
Map<AccordionItemId, React.RefObject<HTMLDetailsElement>>
|
|
37
|
+
Map<AccordionItemId, React.RefObject<HTMLDetailsElement | null>>
|
|
38
38
|
>(new Map());
|
|
39
39
|
const [current, setCurrentOpen] = useState(
|
|
40
40
|
defaultOpen ? { [defaultOpen]: true } : {}
|
|
@@ -26,6 +26,10 @@ test('renders the All Accordion variants', async ({ mount, page }) => {
|
|
|
26
26
|
)
|
|
27
27
|
await page.evaluate(() => document.fonts.ready);
|
|
28
28
|
|
|
29
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
30
|
+
await page.mouse.move(0, 0);
|
|
31
|
+
|
|
32
|
+
|
|
29
33
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
30
34
|
expect(screenshot).toMatchSnapshot();
|
|
31
35
|
});
|
|
@@ -6,6 +6,10 @@ import { Default } from '@digigov/ui/content/Accordion/__stories__/Default';
|
|
|
6
6
|
test('renders the Default Mouse navigation', 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>div>details:nth-child(2)>summary').click();
|
|
10
14
|
const screenshot = await page.screenshot({
|
|
11
15
|
fullPage: true,
|
|
@@ -7,5 +7,25 @@ export default {
|
|
|
7
7
|
component: Blockquote,
|
|
8
8
|
displayName: 'Blockquote',
|
|
9
9
|
};
|
|
10
|
+
|
|
11
|
+
export const WithControls = {
|
|
12
|
+
args: {
|
|
13
|
+
children:
|
|
14
|
+
'Οι προσωπικές πληροφορίες που συμπληρώνετε στην αίτησή σας θα χρησιμοποιηθούν αποκλειστικά για την εξυπηρέτησή σας.',
|
|
15
|
+
dense: false,
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
children: {
|
|
19
|
+
control: { type: 'text' },
|
|
20
|
+
},
|
|
21
|
+
dense: {
|
|
22
|
+
control: { type: 'boolean' },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
parameters: {
|
|
26
|
+
controls: { exclude: ['ref'] },
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
10
30
|
export { Default } from '@digigov/ui/content/Blockquote/__stories__/Default';
|
|
11
31
|
export { Dense } from '@digigov/ui/content/Blockquote/__stories__/Dense';
|
|
@@ -18,6 +18,10 @@ test('renders the All Blockquote variants', async ({ mount, page }) => {
|
|
|
18
18
|
)
|
|
19
19
|
await page.evaluate(() => document.fonts.ready);
|
|
20
20
|
|
|
21
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
22
|
+
await page.mouse.move(0, 0);
|
|
23
|
+
|
|
24
|
+
|
|
21
25
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
22
26
|
expect(screenshot).toMatchSnapshot();
|
|
23
27
|
});
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Card,
|
|
5
|
+
CardHeading,
|
|
6
|
+
CardContent,
|
|
7
|
+
CardAction,
|
|
8
|
+
} from '@digigov/ui/content/Card';
|
|
9
|
+
import { Button } from '@digigov/ui/form/Button';
|
|
10
|
+
import { LinkBase } from '@digigov/ui/navigation/Link';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'Digigov UI/content/Card',
|
|
14
|
+
tags: ['Experimental'],
|
|
15
|
+
description:
|
|
16
|
+
'Cards can be used to divide and organise interface content for better understandability and readability',
|
|
17
|
+
link: 'https://guide.services.gov.gr/docs/components/card',
|
|
18
|
+
component: Card,
|
|
19
|
+
displayName: 'Card',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const WithControls = {
|
|
23
|
+
render: (args) => {
|
|
24
|
+
return (
|
|
25
|
+
<Card
|
|
26
|
+
variant={args.variant}
|
|
27
|
+
borderColor={args.borderColor}
|
|
28
|
+
callToAction={args.callToAction}
|
|
29
|
+
dense={args.dense}
|
|
30
|
+
fullHeight={args.fullHeight}
|
|
31
|
+
>
|
|
32
|
+
<CardHeading>
|
|
33
|
+
{args.callToAction || args.action === 'title' ? (
|
|
34
|
+
<LinkBase href="#">{args.title} </LinkBase>
|
|
35
|
+
) : (
|
|
36
|
+
args.title
|
|
37
|
+
)}
|
|
38
|
+
</CardHeading>
|
|
39
|
+
<CardContent>{args.content}</CardContent>
|
|
40
|
+
{args.action === 'button' && (
|
|
41
|
+
<CardAction>
|
|
42
|
+
<Button>Είσοδος</Button>
|
|
43
|
+
</CardAction>
|
|
44
|
+
)}
|
|
45
|
+
{args.action === 'link' && (
|
|
46
|
+
<CardAction>
|
|
47
|
+
<LinkBase href="#">Περισσότερα</LinkBase>
|
|
48
|
+
</CardAction>
|
|
49
|
+
)}
|
|
50
|
+
</Card>
|
|
51
|
+
);
|
|
52
|
+
},
|
|
53
|
+
args: {
|
|
54
|
+
title: 'Γεωργία και κτηνοτροφία',
|
|
55
|
+
content:
|
|
56
|
+
'Διαδικασίες, επιδοτήσεις και αποζημιώσεις για την γεωργική, κτηνοτροφική ή αλιευτική σας δραστηριότητα.',
|
|
57
|
+
action: 'button',
|
|
58
|
+
actionButtonText: 'Συνέχεια',
|
|
59
|
+
actionButtonLink: 'Συνέχεια',
|
|
60
|
+
variant: 'default',
|
|
61
|
+
borderColor: 'light',
|
|
62
|
+
callToAction: false,
|
|
63
|
+
dense: false,
|
|
64
|
+
fullHeight: false,
|
|
65
|
+
},
|
|
66
|
+
argTypes: {
|
|
67
|
+
title: {
|
|
68
|
+
control: { type: 'text' },
|
|
69
|
+
},
|
|
70
|
+
content: {
|
|
71
|
+
control: { type: 'text' },
|
|
72
|
+
},
|
|
73
|
+
action: {
|
|
74
|
+
options: ['button', 'link', 'title'],
|
|
75
|
+
control: { type: 'select' },
|
|
76
|
+
},
|
|
77
|
+
actionButtonText: {
|
|
78
|
+
control: { type: 'text' },
|
|
79
|
+
if: { arg: 'action', eq: 'button' },
|
|
80
|
+
},
|
|
81
|
+
actionButtonLink: {
|
|
82
|
+
control: { type: 'text' },
|
|
83
|
+
if: { arg: 'action', eq: 'link' },
|
|
84
|
+
},
|
|
85
|
+
variant: {
|
|
86
|
+
options: ['border', 'divider', 'border-top', 'default'],
|
|
87
|
+
control: { type: 'select' },
|
|
88
|
+
},
|
|
89
|
+
borderColor: {
|
|
90
|
+
options: ['light', 'dark'],
|
|
91
|
+
control: { type: 'inline-radio' },
|
|
92
|
+
if: { arg: 'variant', neq: 'default' },
|
|
93
|
+
},
|
|
94
|
+
callToAction: {
|
|
95
|
+
control: { type: 'boolean' },
|
|
96
|
+
},
|
|
97
|
+
dense: {
|
|
98
|
+
control: { type: 'boolean' },
|
|
99
|
+
},
|
|
100
|
+
fullHeight: {
|
|
101
|
+
control: { type: 'boolean' },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
parameters: {
|
|
105
|
+
controls: { exclude: ['ref'] },
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
export { Default } from '@digigov/ui/content/Card/__stories__/Default';
|
|
109
|
+
export { WithGrayBorder } from '@digigov/ui/content/Card/__stories__/WithGrayBorder';
|
|
110
|
+
export { WithDarkBorder } from '@digigov/ui/content/Card/__stories__/WithDarkBorder';
|
|
111
|
+
export { WithGrayTopBorder } from '@digigov/ui/content/Card/__stories__/WithGrayTopBorder';
|
|
112
|
+
export { WithDarkTopBorder } from '@digigov/ui/content/Card/__stories__/WithDarkTopBorder';
|
|
113
|
+
export { WithDivider } from '@digigov/ui/content/Card/__stories__/WithDivider';
|
|
114
|
+
export { WithClickableContent } from '@digigov/ui/content/Card/__stories__/WithClickableContent';
|
|
115
|
+
export { WithClickableLink } from '@digigov/ui/content/Card/__stories__/WithClickableLink';
|
|
116
|
+
export { WithGroupButton } from '@digigov/ui/content/Card/__stories__/WithGroupButton';
|
|
117
|
+
export { WithLink } from '@digigov/ui/content/Card/__stories__/WithLink';
|
|
118
|
+
export { Dense } from '@digigov/ui/content/Card/__stories__/Dense';
|
|
@@ -54,6 +54,10 @@ test('renders the All Card 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
|
});
|
|
@@ -6,6 +6,10 @@ import { WithClickableContent } from '@digigov/ui/content/Card/__stories__/WithC
|
|
|
6
6
|
test('renders the WithClickableContent Click card', async ({ mount, page }) => {
|
|
7
7
|
await mount(<WithClickableContent />);
|
|
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>div>div>div:nth-child(1)>a').click();
|
|
10
14
|
const screenshot = await page.screenshot({
|
|
11
15
|
fullPage: true,
|
|
@@ -4,6 +4,28 @@ export default {
|
|
|
4
4
|
component: Chip,
|
|
5
5
|
displayName: 'Chip',
|
|
6
6
|
};
|
|
7
|
+
|
|
8
|
+
export const WithControls = {
|
|
9
|
+
args: {
|
|
10
|
+
children: 'Ετικέτα',
|
|
11
|
+
onClick: true,
|
|
12
|
+
onDelete: true,
|
|
13
|
+
},
|
|
14
|
+
argTypes: {
|
|
15
|
+
children: {
|
|
16
|
+
control: { type: 'text' },
|
|
17
|
+
},
|
|
18
|
+
onClick: {
|
|
19
|
+
control: { type: 'boolean' },
|
|
20
|
+
},
|
|
21
|
+
onDelete: {
|
|
22
|
+
control: { type: 'boolean' },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
parameters: {
|
|
26
|
+
controls: { exclude: ['ref'] },
|
|
27
|
+
},
|
|
28
|
+
};
|
|
7
29
|
export { Default } from '@digigov/ui/content/Chip/__stories__/Default';
|
|
8
30
|
export { ClickableChip } from '@digigov/ui/content/Chip/__stories__/ClickableChip';
|
|
9
31
|
export { DeletableChip } from '@digigov/ui/content/Chip/__stories__/DeletableChip';
|
|
@@ -30,6 +30,10 @@ test('renders the All Chip 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
|
});
|
|
@@ -14,6 +14,10 @@ test('renders the All Details 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
|
});
|
|
@@ -6,6 +6,10 @@ import { Default } from '@digigov/ui/content/Details/__stories__/Default';
|
|
|
6
6
|
test('renders the Default Open Details', 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>details>summary').click();
|
|
10
14
|
const screenshot = await page.screenshot({
|
|
11
15
|
fullPage: true,
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { List } from '@digigov/ui/content/List/List';
|
|
3
|
+
import { ListItem } from '@digigov/ui/content/List/ListItem';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Digigov UI/content/List',
|
|
7
|
+
description:
|
|
8
|
+
'Use lists to make blocks of text easier to read, and to break information into manageable chunks.',
|
|
9
|
+
link: 'https://guide.services.gov.gr/docs/styles/typography#lists',
|
|
10
|
+
component: List,
|
|
11
|
+
displayName: 'List',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const WithControls = {
|
|
15
|
+
render: (args) => {
|
|
16
|
+
return (
|
|
17
|
+
<List listStyle={args.listStyle} dense={args.dense} layout={args.layout}>
|
|
18
|
+
{args.listItems.map((item, index) => (
|
|
19
|
+
<ListItem key={index}>{item}</ListItem>
|
|
20
|
+
))}
|
|
21
|
+
</List>
|
|
22
|
+
);
|
|
23
|
+
},
|
|
24
|
+
args: {
|
|
25
|
+
listStyle: 'none',
|
|
26
|
+
layout: 'vertical',
|
|
27
|
+
dense: false,
|
|
28
|
+
listItems: [
|
|
29
|
+
'Αποτελέσματα διαγνωστικών εργαστηριακών εξετάσεων',
|
|
30
|
+
'Πτυχία τριτοβάθμιας εκπαίδευσης',
|
|
31
|
+
'Υπεύθυνη Δήλωση / Εξουσιοδότηση / Γνήσιο Υπογραφής',
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
argTypes: {
|
|
35
|
+
listStyle: {
|
|
36
|
+
options: ['none', 'bullet', 'number'],
|
|
37
|
+
control: { type: 'select' },
|
|
38
|
+
},
|
|
39
|
+
layout: {
|
|
40
|
+
options: ['vertical', 'horizontal'],
|
|
41
|
+
control: { type: 'select' },
|
|
42
|
+
},
|
|
43
|
+
dense: {
|
|
44
|
+
control: { type: 'boolean' },
|
|
45
|
+
},
|
|
46
|
+
listItems: {
|
|
47
|
+
control: { type: 'object' },
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
parameters: {
|
|
51
|
+
controls: { exclude: ['ref'] },
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export { Default } from '@digigov/ui/content/List/__stories__/Default';
|
|
56
|
+
export { BulletList } from '@digigov/ui/content/List/__stories__/BulletList';
|
|
57
|
+
export { NumberedList } from '@digigov/ui/content/List/__stories__/NumberedList';
|
|
58
|
+
export { HorizontalList } from '@digigov/ui/content/List/__stories__/HorizontalList';
|
|
59
|
+
export { WithExtraSpace } from '@digigov/ui/content/List/__stories__/WithExtraSpace';
|
|
60
|
+
export { NestedBulletList } from '@digigov/ui/content/List/__stories__/NestedBulletList';
|
|
@@ -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
|
`;
|
|
@@ -34,6 +34,10 @@ test('renders the All List variants', async ({ mount, page }) => {
|
|
|
34
34
|
)
|
|
35
35
|
await page.evaluate(() => document.fonts.ready);
|
|
36
36
|
|
|
37
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
38
|
+
await page.mouse.move(0, 0);
|
|
39
|
+
|
|
40
|
+
|
|
37
41
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
38
42
|
expect(screenshot).toMatchSnapshot();
|
|
39
43
|
});
|
|
@@ -14,6 +14,10 @@ test('renders the All Markdown 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
|
});
|
|
@@ -14,6 +14,10 @@ test('renders the All SafeHTML 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
|
});
|
|
@@ -30,6 +30,10 @@ test('renders the All StepNav 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
|
});
|
|
@@ -6,6 +6,10 @@ import { Default } from '@digigov/ui/content/StepNav/__stories__/Default';
|
|
|
6
6
|
test('renders the Default Click 1st and all', 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
|
|
10
14
|
.locator(
|
|
11
15
|
'#root>div>ol>li:nth-child(1)>details>summary>h2>div>span:nth-child(1)'
|
|
@@ -42,6 +42,10 @@ test('renders the All SummaryList variants', async ({ mount, page }) => {
|
|
|
42
42
|
)
|
|
43
43
|
await page.evaluate(() => document.fonts.ready);
|
|
44
44
|
|
|
45
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
46
|
+
await page.mouse.move(0, 0);
|
|
47
|
+
|
|
48
|
+
|
|
45
49
|
const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
46
50
|
expect(screenshot).toMatchSnapshot();
|
|
47
51
|
});
|
|
@@ -9,6 +9,10 @@ test('renders the WithActions Navigate with keyboard', async ({
|
|
|
9
9
|
}) => {
|
|
10
10
|
await mount(<WithActions />);
|
|
11
11
|
await page.evaluate(() => document.fonts.ready);
|
|
12
|
+
|
|
13
|
+
// Move the mouse to the top-left corner to avoid random hover issues
|
|
14
|
+
await page.mouse.move(0, 0);
|
|
15
|
+
|
|
12
16
|
await page.keyboard.press('Tab');
|
|
13
17
|
await page.keyboard.press('Tab');
|
|
14
18
|
|