@digigov/ui 0.11.0 → 0.12.2
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/.eslintrc.js +4 -0
- package/.prettierrc.js +3 -0
- package/.rush/temp/package-deps_build.json +176 -0
- package/.rush/temp/shrinkwrap-deps.json +278 -0
- package/CHANGELOG.json +796 -0
- package/CHANGELOG.md +22 -1
- package/docs/components.mdx +1 -0
- package/docs/create-a-new-service.mdx +93 -0
- package/docs/create-common-page-layout.mdx +205 -0
- package/docs/create-static-page.mdx +179 -0
- package/docs/edit-start-page.mdx +143 -0
- package/docs/index.mdx +66 -0
- package/docs/introduction.mdx +34 -0
- package/package.json +31 -8
- package/src/api/APIErrors.tsx +44 -0
- package/src/api/APIProvider.tsx +27 -0
- package/src/api/fetchAPI.ts +45 -0
- package/src/api/index.spec.tsx +419 -0
- package/{esm/api/index.js → src/api/index.tsx} +6 -3
- package/{api → src/api}/introduction.md +0 -0
- package/src/api/useResource.tsx +96 -0
- package/src/api/useResourceAction.tsx +80 -0
- package/src/api/useResourceQuery.tsx +177 -0
- package/src/api/utils.tsx +156 -0
- package/src/app/App.tsx +33 -0
- package/{app/Confirmation/index.d.ts → src/app/Confirmation/index.tsx} +0 -0
- package/{app/Footer/index.d.ts → src/app/Footer/index.tsx} +0 -0
- package/{es/app/Header/HeaderLogo.js → src/app/Header/HeaderLogo.tsx} +9 -7
- package/src/app/Header/HeaderSection.tsx +13 -0
- package/src/app/Header/HeaderTitle.tsx +24 -0
- package/{app → src/app}/Header/__snapshots__/index.spec.tsx.snap +0 -0
- package/{app → src/app}/Header/index.mdx +0 -0
- package/src/app/Header/index.spec.tsx +32 -0
- package/{esm/app/Header/index.js → src/app/Header/index.tsx} +10 -4
- package/src/app/NotFound/index.tsx +21 -0
- package/src/app/OutdatedBrowserBanner.tsx +37 -0
- package/src/app/PageTitle.tsx +70 -0
- package/{app → src/app}/QrCodeScanner/__snapshots__/index.spec.tsx.snap +0 -0
- package/{app → src/app}/QrCodeScanner/index.mdx +0 -0
- package/src/app/QrCodeScanner/index.spec.tsx +19 -0
- package/src/app/QrCodeScanner/index.tsx +90 -0
- package/src/app/i18n.tsx +44 -0
- package/{app/index.d.ts → src/app/index.ts} +0 -0
- package/{core → src/core}/Accordion/__snapshots__/index.spec.tsx.snap +0 -0
- package/{core → src/core}/Accordion/index.mdx +0 -0
- package/src/core/Accordion/index.spec.tsx +30 -0
- package/src/core/Accordion/index.tsx +86 -0
- package/{core → src/core}/Blockquote/__snapshots__/index.spec.tsx.snap +0 -0
- package/{core → src/core}/Blockquote/index.mdx +0 -0
- package/src/core/Blockquote/index.spec.tsx +10 -0
- package/{esm/core/Blockquote/index.js → src/core/Blockquote/index.tsx} +9 -7
- package/{core/Breadcrumbs/index.d.ts → src/core/Breadcrumbs/index.tsx} +0 -0
- package/{esm/core/Button/BackButton.js → src/core/Button/BackButton.tsx} +10 -8
- package/src/core/Button/ButtonLink.tsx +20 -0
- package/src/core/Button/CallToAction.tsx +31 -0
- package/src/core/Button/Icon.tsx +9 -0
- package/{core → src/core}/Button/__snapshots__/index.spec.tsx.snap +0 -0
- package/{core → src/core}/Button/index.mdx +0 -0
- package/src/core/Button/index.spec.tsx +8 -0
- package/src/core/Button/index.tsx +46 -0
- package/{core/Card/index.d.ts → src/core/Card/index.tsx} +0 -0
- package/{core → src/core}/Details/__snapshots__/index.spec.tsx.snap +0 -0
- package/{core → src/core}/Details/index.mdx +0 -0
- package/src/core/Details/index.spec.tsx +38 -0
- package/{core/Details/index.d.ts → src/core/Details/index.tsx} +2 -0
- package/src/core/Divider/index.tsx +13 -0
- package/{core → src/core}/ErrorSummary/__snapshots__/index.spec.tsx.snap +0 -0
- package/{core → src/core}/ErrorSummary/index.mdx +0 -0
- package/src/core/ErrorSummary/index.spec.tsx +10 -0
- package/{core/ErrorSummary/index.d.ts → src/core/ErrorSummary/index.tsx} +1 -0
- package/{core/Hidden/index.d.ts → src/core/Hidden/index.tsx} +0 -0
- package/{core → src/core}/Link/__snapshots__/index.spec.tsx.snap +0 -0
- package/src/core/Link/index.spec.tsx +22 -0
- package/src/core/Link/index.tsx +41 -0
- package/{core/List/List.d.ts → src/core/List/List.tsx} +2 -0
- package/{core/List/ListItem.d.ts → src/core/List/ListItem.tsx} +2 -0
- package/src/core/List/ListItemContent.tsx +32 -0
- package/src/core/List/ListItemIcon.tsx +31 -0
- package/src/core/List/ListItemText.tsx +23 -0
- package/src/core/List/ListItemTitle.tsx +37 -0
- package/{core → src/core}/List/__snapshots__/index.spec.tsx.snap +0 -0
- package/{core → src/core}/List/index.mdx +0 -0
- package/src/core/List/index.spec.tsx +10 -0
- package/{core/List/index.d.ts → src/core/List/index.tsx} +0 -0
- package/src/core/NavList/NavList.tsx +103 -0
- package/src/core/NavList/NavListContext.tsx +85 -0
- package/src/core/NavList/NavListItem.tsx +143 -0
- package/src/core/NavList/NavListItemBase.tsx +146 -0
- package/src/core/NavList/NavListSubMenu.tsx +33 -0
- package/{core → src/core}/NavList/__snapshots__/index.spec.tsx.snap +0 -0
- package/{core → src/core}/NavList/index.mdx +0 -0
- package/src/core/NavList/index.spec.tsx +10 -0
- package/{core/NavList/index.d.ts → src/core/NavList/index.tsx} +0 -0
- package/{core → src/core}/NotificationBanner/__snapshots__/index.spec.tsx.snap +0 -0
- package/{core → src/core}/NotificationBanner/index.mdx +0 -0
- package/src/core/NotificationBanner/index.spec.tsx +27 -0
- package/src/core/NotificationBanner/index.tsx +52 -0
- package/{core → src/core}/ServiceBadge/ServiceBadge.mdx +0 -0
- package/{core → src/core}/ServiceBadge/index.mdx +0 -0
- package/src/core/ServiceBadge/index.tsx +35 -0
- package/{core → src/core}/SummaryList/__snapshots__/index.spec.tsx.snap +0 -0
- package/{core → src/core}/SummaryList/index.mdx +0 -0
- package/src/core/SummaryList/index.spec.tsx +28 -0
- package/{core/SummaryList/index.d.ts → src/core/SummaryList/index.tsx} +2 -0
- package/{core/Table/index.d.ts → src/core/Table/index.tsx} +0 -0
- package/{core → src/core}/Tabs/index.mdx +0 -0
- package/src/core/Tabs/index.tsx +36 -0
- package/{core/VisuallyHidden/index.d.ts → src/core/VisuallyHidden/index.tsx} +0 -0
- package/{core → src/core}/WarningText/__snapshots__/index.spec.tsx.snap +0 -0
- package/{core → src/core}/WarningText/index.mdx +0 -0
- package/src/core/WarningText/index.spec.tsx +10 -0
- package/{core/WarningText/index.d.ts → src/core/WarningText/index.tsx} +1 -0
- package/{core/index.d.ts → src/core/index.ts} +3 -0
- package/src/custom.d.ts +8 -0
- package/{es → src}/form/inputs/Input/index.mdx +0 -0
- package/src/govgr/Footer/Copyright.tsx +64 -0
- package/{govgr/Footer/HellenicRepublicLogo.d.ts → src/govgr/Footer/HellenicRepublicLogo.tsx} +1 -0
- package/src/govgr/Footer/LicenseCCSA.tsx +24 -0
- package/{es → src}/govgr/Footer/index.mdx +0 -0
- package/src/govgr/Footer/index.tsx +49 -0
- package/{esm/govgr/Footer/logo.js → src/govgr/Footer/logo.ts} +1 -1
- package/{esm/govgr/Footer/logos/logo-el.js → src/govgr/Footer/logos/logo-el.ts} +1 -1
- package/{esm/govgr/Footer/logos/logo-en.js → src/govgr/Footer/logos/logo-en.ts} +1 -1
- package/{es → src}/govgr/Logo/govgr-logo.svg +0 -0
- package/{govgr/Logo/index.d.ts → src/govgr/Logo/index.tsx} +2 -0
- package/{es/govgr/Logo/logo.js → src/govgr/Logo/logo.ts} +1 -1
- package/{govgr/index.d.ts → src/govgr/index.ts} +0 -0
- package/src/hooks/useDebounce.ts +50 -0
- package/src/hooks/useLatest.ts +12 -0
- package/{esm/hooks/useOutdatedBrowserCheck.js → src/hooks/useOutdatedBrowserCheck.ts} +16 -15
- package/src/hooks/useSearch.ts +47 -0
- package/src/hooks/useTogglableSections.tsx +102 -0
- package/{index.d.ts → src/index.ts} +0 -0
- package/{es → src}/layouts/Basic/Bottom/index.mdx +0 -0
- package/{layouts/Basic/Bottom/index.d.ts → src/layouts/Basic/Bottom/index.tsx} +1 -0
- package/{es → src}/layouts/Basic/Content/index.mdx +0 -0
- package/src/layouts/Basic/Content/index.tsx +24 -0
- package/{es → src}/layouts/Basic/Main/index.mdx +0 -0
- package/{layouts/Basic/Main/index.d.ts → src/layouts/Basic/Main/index.tsx} +1 -0
- package/{es → src}/layouts/Basic/Masthead/index.mdx +0 -0
- package/{layouts/Basic/Masthead/index.d.ts → src/layouts/Basic/Masthead/index.tsx} +2 -0
- package/{es → src}/layouts/Basic/Side/index.mdx +0 -0
- package/{esm/layouts/Basic/Side/index.js → src/layouts/Basic/Side/index.tsx} +5 -3
- package/{es → src}/layouts/Basic/Top/index.mdx +0 -0
- package/{es/layouts/Basic/Top/index.js → src/layouts/Basic/Top/index.tsx} +7 -5
- package/{es → src}/layouts/Basic/__snapshots__/index.spec.tsx.snap +0 -0
- package/{es → src}/layouts/Basic/index.mdx +0 -0
- package/src/layouts/Basic/index.spec.tsx +24 -0
- package/{layouts/Basic/index.d.ts → src/layouts/Basic/index.tsx} +2 -0
- package/{layouts/Grid/index.d.ts → src/layouts/Grid/index.tsx} +0 -0
- package/{layouts/index.d.ts → src/layouts/index.ts} +0 -0
- package/src/locales/el.ts +60 -0
- package/{esm/locales/en.js → src/locales/en.ts} +25 -11
- package/{es → src}/router/index.mdx +0 -0
- package/src/router/index.tsx +28 -0
- package/src/test-utils/delay.ts +9 -0
- package/src/test-utils/mountWithTheme.tsx +33 -0
- package/{es → src}/themes/govgr.js +33 -29
- package/src/themes/grnet.js +109 -0
- package/src/themes/index.tsx +38 -0
- package/src/typography/Caption.tsx +15 -0
- package/src/typography/NormalText.tsx +7 -0
- package/src/typography/Paragraph.tsx +9 -0
- package/src/typography/Title.tsx +51 -0
- package/{es → src}/typography/index.mdx +0 -0
- package/{typography/index.d.ts → src/typography/index.ts} +0 -0
- package/src/utils/evaluateBrowserVersion.ts +346 -0
- package/src/utils/withDeprecation.tsx +97 -0
- package/tsconfig.json +18 -0
- package/tsconfig.production.json +27 -0
- package/ui.build.log +17 -0
- package/LICENSE +0 -0
- package/api/APIErrors.d.ts +0 -22
- package/api/APIErrors.js +0 -117
- package/api/APIProvider.d.ts +0 -15
- package/api/APIProvider.js +0 -43
- package/api/fetchAPI.d.ts +0 -18
- package/api/fetchAPI.js +0 -64
- package/api/index.d.ts +0 -9
- package/api/index.js +0 -104
- package/api/index.spec.d.ts +0 -1
- package/api/index.spec.js +0 -584
- package/api/useResource.d.ts +0 -11
- package/api/useResource.js +0 -144
- package/api/useResourceAction.d.ts +0 -2
- package/api/useResourceAction.js +0 -157
- package/api/useResourceQuery.d.ts +0 -18
- package/api/useResourceQuery.js +0 -229
- package/api/utils.d.ts +0 -6
- package/api/utils.js +0 -250
- package/app/App.d.ts +0 -14
- package/app/App.js +0 -49
- package/app/Confirmation/index.js +0 -44
- package/app/Footer/index.js +0 -200
- package/app/Header/HeaderLogo.d.ts +0 -3
- package/app/Header/HeaderLogo.js +0 -30
- package/app/Header/HeaderSection.d.ts +0 -5
- package/app/Header/HeaderSection.js +0 -20
- package/app/Header/HeaderTitle.d.ts +0 -5
- package/app/Header/HeaderTitle.js +0 -30
- package/app/Header/index.d.ts +0 -11
- package/app/Header/index.js +0 -106
- package/app/Header/index.spec.d.ts +0 -1
- package/app/Header/index.spec.js +0 -45
- package/app/NotFound/index.d.ts +0 -3
- package/app/NotFound/index.js +0 -29
- package/app/OutdatedBrowserBanner.d.ts +0 -2
- package/app/OutdatedBrowserBanner.js +0 -41
- package/app/PageTitle.d.ts +0 -10
- package/app/PageTitle.js +0 -76
- package/app/QrCodeScanner/index.d.ts +0 -29
- package/app/QrCodeScanner/index.js +0 -85
- package/app/QrCodeScanner/index.spec.d.ts +0 -1
- package/app/QrCodeScanner/index.spec.js +0 -26
- package/app/i18n.d.ts +0 -10
- package/app/i18n.js +0 -57
- package/app/index.js +0 -70
- package/core/Accordion/index.d.ts +0 -21
- package/core/Accordion/index.js +0 -127
- package/core/Accordion/index.spec.d.ts +0 -1
- package/core/Accordion/index.spec.js +0 -19
- package/core/Blockquote/index.d.ts +0 -3
- package/core/Blockquote/index.js +0 -29
- package/core/Blockquote/index.spec.d.ts +0 -1
- package/core/Blockquote/index.spec.js +0 -21
- package/core/Breadcrumbs/index.js +0 -44
- package/core/Button/BackButton.d.ts +0 -3
- package/core/Button/BackButton.js +0 -34
- package/core/Button/ButtonLink.d.ts +0 -4
- package/core/Button/ButtonLink.js +0 -28
- package/core/Button/CallToAction.d.ts +0 -7
- package/core/Button/CallToAction.js +0 -41
- package/core/Button/Icon.d.ts +0 -2
- package/core/Button/Icon.js +0 -19
- package/core/Button/index.d.ts +0 -15
- package/core/Button/index.js +0 -121
- package/core/Button/index.spec.d.ts +0 -1
- package/core/Button/index.spec.js +0 -21
- package/core/Card/index.js +0 -57
- package/core/Details/index.js +0 -35
- package/core/Details/index.spec.d.ts +0 -1
- package/core/Details/index.spec.js +0 -27
- package/core/Divider/index.d.ts +0 -5
- package/core/Divider/index.js +0 -20
- package/core/ErrorSummary/index.js +0 -19
- package/core/ErrorSummary/index.spec.d.ts +0 -1
- package/core/ErrorSummary/index.spec.js +0 -21
- package/core/Hidden/index.js +0 -18
- package/core/Link/index.d.ts +0 -12
- package/core/Link/index.js +0 -50
- package/core/Link/index.spec.d.ts +0 -1
- package/core/Link/index.spec.js +0 -31
- package/core/List/List.js +0 -19
- package/core/List/ListItem.js +0 -19
- package/core/List/ListItemContent.d.ts +0 -7
- package/core/List/ListItemContent.js +0 -45
- package/core/List/ListItemIcon.d.ts +0 -7
- package/core/List/ListItemIcon.js +0 -48
- package/core/List/ListItemText.d.ts +0 -8
- package/core/List/ListItemText.js +0 -36
- package/core/List/ListItemTitle.d.ts +0 -10
- package/core/List/ListItemTitle.js +0 -44
- package/core/List/index.js +0 -96
- package/core/List/index.spec.d.ts +0 -1
- package/core/List/index.spec.js +0 -21
- package/core/NavList/NavList.d.ts +0 -17
- package/core/NavList/NavList.js +0 -99
- package/core/NavList/NavListContext.d.ts +0 -20
- package/core/NavList/NavListContext.js +0 -102
- package/core/NavList/NavListItem.d.ts +0 -13
- package/core/NavList/NavListItem.js +0 -171
- package/core/NavList/NavListItemBase.d.ts +0 -16
- package/core/NavList/NavListItemBase.js +0 -161
- package/core/NavList/NavListSubMenu.d.ts +0 -8
- package/core/NavList/NavListSubMenu.js +0 -52
- package/core/NavList/index.js +0 -68
- package/core/NavList/index.spec.d.ts +0 -1
- package/core/NavList/index.spec.js +0 -21
- package/core/NotificationBanner/index.d.ts +0 -18
- package/core/NotificationBanner/index.js +0 -78
- package/core/NotificationBanner/index.spec.d.ts +0 -1
- package/core/NotificationBanner/index.spec.js +0 -32
- package/core/ServiceBadge/index.d.ts +0 -9
- package/core/ServiceBadge/index.js +0 -36
- package/core/SummaryList/index.js +0 -79
- package/core/SummaryList/index.spec.d.ts +0 -1
- package/core/SummaryList/index.spec.js +0 -19
- package/core/Table/index.js +0 -96
- package/core/Tabs/index.d.ts +0 -16
- package/core/Tabs/index.js +0 -88
- package/core/VisuallyHidden/index.js +0 -18
- package/core/WarningText/index.js +0 -19
- package/core/WarningText/index.spec.d.ts +0 -1
- package/core/WarningText/index.spec.js +0 -21
- package/core/index.js +0 -199
- package/custom.d.js +0 -1
- package/es/api/APIErrors.js +0 -96
- package/es/api/APIProvider.js +0 -25
- package/es/api/fetchAPI.js +0 -49
- package/es/api/index.js +0 -13
- package/es/api/index.spec.js +0 -546
- package/es/api/introduction.md +0 -6
- package/es/api/useResource.js +0 -128
- package/es/api/useResourceAction.js +0 -141
- package/es/api/useResourceQuery.js +0 -208
- package/es/api/utils.js +0 -233
- package/es/app/App.js +0 -27
- package/es/app/Confirmation/index.js +0 -3
- package/es/app/Footer/index.js +0 -15
- package/es/app/Header/HeaderSection.js +0 -7
- package/es/app/Header/HeaderTitle.js +0 -17
- package/es/app/Header/__snapshots__/index.spec.tsx.snap +0 -393
- package/es/app/Header/index.js +0 -13
- package/es/app/Header/index.mdx +0 -50
- package/es/app/Header/index.spec.js +0 -32
- package/es/app/NotFound/index.js +0 -12
- package/es/app/OutdatedBrowserBanner.js +0 -24
- package/es/app/PageTitle.js +0 -57
- package/es/app/QrCodeScanner/__snapshots__/index.spec.tsx.snap +0 -22
- package/es/app/QrCodeScanner/index.js +0 -64
- package/es/app/QrCodeScanner/index.mdx +0 -22
- package/es/app/QrCodeScanner/index.spec.js +0 -13
- package/es/app/i18n.js +0 -36
- package/es/app/index.js +0 -5
- package/es/core/Accordion/__snapshots__/index.spec.tsx.snap +0 -78
- package/es/core/Accordion/index.js +0 -67
- package/es/core/Accordion/index.mdx +0 -104
- package/es/core/Accordion/index.spec.js +0 -9
- package/es/core/Blockquote/__snapshots__/index.spec.tsx.snap +0 -13
- package/es/core/Blockquote/index.js +0 -16
- package/es/core/Blockquote/index.mdx +0 -61
- package/es/core/Blockquote/index.spec.js +0 -9
- package/es/core/Breadcrumbs/index.js +0 -3
- package/es/core/Button/BackButton.js +0 -21
- package/es/core/Button/ButtonLink.js +0 -16
- package/es/core/Button/CallToAction.js +0 -27
- package/es/core/Button/Icon.js +0 -7
- package/es/core/Button/__snapshots__/index.spec.tsx.snap +0 -13
- package/es/core/Button/index.js +0 -36
- package/es/core/Button/index.mdx +0 -65
- package/es/core/Button/index.spec.js +0 -9
- package/es/core/Card/index.js +0 -4
- package/es/core/Details/__snapshots__/index.spec.tsx.snap +0 -50
- package/es/core/Details/index.js +0 -5
- package/es/core/Details/index.mdx +0 -34
- package/es/core/Details/index.spec.js +0 -17
- package/es/core/Divider/index.js +0 -7
- package/es/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +0 -322
- package/es/core/ErrorSummary/index.js +0 -3
- package/es/core/ErrorSummary/index.mdx +0 -61
- package/es/core/ErrorSummary/index.spec.js +0 -9
- package/es/core/Hidden/index.js +0 -1
- package/es/core/Link/__snapshots__/index.spec.tsx.snap +0 -31
- package/es/core/Link/index.js +0 -26
- package/es/core/Link/index.spec.js +0 -21
- package/es/core/List/List.js +0 -3
- package/es/core/List/ListItem.js +0 -3
- package/es/core/List/ListItemContent.js +0 -27
- package/es/core/List/ListItemIcon.js +0 -29
- package/es/core/List/ListItemText.js +0 -19
- package/es/core/List/ListItemTitle.js +0 -25
- package/es/core/List/__snapshots__/index.spec.tsx.snap +0 -322
- package/es/core/List/index.js +0 -7
- package/es/core/List/index.mdx +0 -40
- package/es/core/List/index.spec.js +0 -9
- package/es/core/NavList/NavList.js +0 -78
- package/es/core/NavList/NavListContext.js +0 -80
- package/es/core/NavList/NavListItem.js +0 -141
- package/es/core/NavList/NavListItemBase.js +0 -133
- package/es/core/NavList/NavListSubMenu.js +0 -27
- package/es/core/NavList/__snapshots__/index.spec.tsx.snap +0 -334
- package/es/core/NavList/index.js +0 -5
- package/es/core/NavList/index.mdx +0 -185
- package/es/core/NavList/index.spec.js +0 -9
- package/es/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +0 -737
- package/es/core/NotificationBanner/index.js +0 -35
- package/es/core/NotificationBanner/index.mdx +0 -77
- package/es/core/NotificationBanner/index.spec.js +0 -20
- package/es/core/ServiceBadge/ServiceBadge.mdx +0 -0
- package/es/core/ServiceBadge/index.js +0 -20
- package/es/core/ServiceBadge/index.mdx +0 -42
- package/es/core/SummaryList/__snapshots__/index.spec.tsx.snap +0 -57
- package/es/core/SummaryList/index.js +0 -7
- package/es/core/SummaryList/index.mdx +0 -82
- package/es/core/SummaryList/index.spec.js +0 -9
- package/es/core/Table/index.js +0 -7
- package/es/core/Tabs/index.js +0 -37
- package/es/core/Tabs/index.mdx +0 -54
- package/es/core/VisuallyHidden/index.js +0 -1
- package/es/core/WarningText/__snapshots__/index.spec.tsx.snap +0 -336
- package/es/core/WarningText/index.js +0 -3
- package/es/core/WarningText/index.mdx +0 -46
- package/es/core/WarningText/index.spec.js +0 -9
- package/es/core/index.js +0 -14
- package/es/custom.d.js +0 -0
- package/es/govgr/Footer/Copyright.js +0 -37
- package/es/govgr/Footer/HellenicRepublicLogo.js +0 -3
- package/es/govgr/Footer/LicenseCCSA.js +0 -18
- package/es/govgr/Footer/index.js +0 -21
- package/es/govgr/Footer/logo.js +0 -1
- package/es/govgr/Footer/logos/logo-el.js +0 -1
- package/es/govgr/Footer/logos/logo-en.js +0 -1
- package/es/govgr/Logo/index.js +0 -3
- package/es/govgr/index.js +0 -4
- package/es/hooks/useDebounce.js +0 -41
- package/es/hooks/useLatest.js +0 -12
- package/es/hooks/useOutdatedBrowserCheck.js +0 -46
- package/es/hooks/useSearch.js +0 -25
- package/es/hooks/useTogglableSections.js +0 -96
- package/es/index.js +0 -5
- package/es/layouts/Basic/Bottom/index.js +0 -3
- package/es/layouts/Basic/Content/index.js +0 -18
- package/es/layouts/Basic/Main/index.js +0 -3
- package/es/layouts/Basic/Masthead/index.js +0 -4
- package/es/layouts/Basic/Side/index.js +0 -7
- package/es/layouts/Basic/index.js +0 -8
- package/es/layouts/Basic/index.spec.js +0 -10
- package/es/layouts/Grid/index.js +0 -1
- package/es/layouts/index.js +0 -2
- package/es/locales/el.js +0 -45
- package/es/locales/en.js +0 -45
- package/es/router/index.js +0 -15
- package/es/test-utils/delay.js +0 -31
- package/es/test-utils/mountWithTheme.js +0 -30
- package/es/themes/grnet.js +0 -110
- package/es/themes/index.js +0 -2
- package/es/typography/Caption.js +0 -7
- package/es/typography/NormalText.js +0 -3
- package/es/typography/Paragraph.js +0 -2
- package/es/typography/Title.js +0 -48
- package/es/typography/index.js +0 -8
- package/es/utils/evaluateBrowserVersion.js +0 -201
- package/es/utils/withDeprecation.js +0 -103
- package/esm/api/APIErrors.js +0 -96
- package/esm/api/APIProvider.js +0 -25
- package/esm/api/fetchAPI.js +0 -49
- package/esm/api/index.spec.js +0 -546
- package/esm/api/introduction.md +0 -6
- package/esm/api/useResource.js +0 -128
- package/esm/api/useResourceAction.js +0 -141
- package/esm/api/useResourceQuery.js +0 -208
- package/esm/api/utils.js +0 -233
- package/esm/app/App.js +0 -27
- package/esm/app/Confirmation/index.js +0 -3
- package/esm/app/Footer/index.js +0 -15
- package/esm/app/Header/HeaderLogo.js +0 -17
- package/esm/app/Header/HeaderSection.js +0 -7
- package/esm/app/Header/HeaderTitle.js +0 -17
- package/esm/app/Header/__snapshots__/index.spec.tsx.snap +0 -393
- package/esm/app/Header/index.mdx +0 -50
- package/esm/app/Header/index.spec.js +0 -32
- package/esm/app/NotFound/index.js +0 -12
- package/esm/app/OutdatedBrowserBanner.js +0 -24
- package/esm/app/PageTitle.js +0 -57
- package/esm/app/QrCodeScanner/__snapshots__/index.spec.tsx.snap +0 -22
- package/esm/app/QrCodeScanner/index.js +0 -64
- package/esm/app/QrCodeScanner/index.mdx +0 -22
- package/esm/app/QrCodeScanner/index.spec.js +0 -13
- package/esm/app/i18n.js +0 -36
- package/esm/app/index.js +0 -5
- package/esm/core/Accordion/__snapshots__/index.spec.tsx.snap +0 -78
- package/esm/core/Accordion/index.js +0 -67
- package/esm/core/Accordion/index.mdx +0 -104
- package/esm/core/Accordion/index.spec.js +0 -9
- package/esm/core/Blockquote/__snapshots__/index.spec.tsx.snap +0 -13
- package/esm/core/Blockquote/index.mdx +0 -61
- package/esm/core/Blockquote/index.spec.js +0 -9
- package/esm/core/Breadcrumbs/index.js +0 -3
- package/esm/core/Button/ButtonLink.js +0 -16
- package/esm/core/Button/CallToAction.js +0 -27
- package/esm/core/Button/Icon.js +0 -7
- package/esm/core/Button/__snapshots__/index.spec.tsx.snap +0 -13
- package/esm/core/Button/index.js +0 -36
- package/esm/core/Button/index.mdx +0 -65
- package/esm/core/Button/index.spec.js +0 -9
- package/esm/core/Card/index.js +0 -4
- package/esm/core/Details/__snapshots__/index.spec.tsx.snap +0 -50
- package/esm/core/Details/index.js +0 -5
- package/esm/core/Details/index.mdx +0 -34
- package/esm/core/Details/index.spec.js +0 -17
- package/esm/core/Divider/index.js +0 -7
- package/esm/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +0 -322
- package/esm/core/ErrorSummary/index.js +0 -3
- package/esm/core/ErrorSummary/index.mdx +0 -61
- package/esm/core/ErrorSummary/index.spec.js +0 -9
- package/esm/core/Hidden/index.js +0 -1
- package/esm/core/Link/__snapshots__/index.spec.tsx.snap +0 -31
- package/esm/core/Link/index.js +0 -26
- package/esm/core/Link/index.spec.js +0 -21
- package/esm/core/List/List.js +0 -3
- package/esm/core/List/ListItem.js +0 -3
- package/esm/core/List/ListItemContent.js +0 -27
- package/esm/core/List/ListItemIcon.js +0 -29
- package/esm/core/List/ListItemText.js +0 -19
- package/esm/core/List/ListItemTitle.js +0 -25
- package/esm/core/List/__snapshots__/index.spec.tsx.snap +0 -322
- package/esm/core/List/index.js +0 -7
- package/esm/core/List/index.mdx +0 -40
- package/esm/core/List/index.spec.js +0 -9
- package/esm/core/NavList/NavList.js +0 -78
- package/esm/core/NavList/NavListContext.js +0 -80
- package/esm/core/NavList/NavListItem.js +0 -141
- package/esm/core/NavList/NavListItemBase.js +0 -133
- package/esm/core/NavList/NavListSubMenu.js +0 -27
- package/esm/core/NavList/__snapshots__/index.spec.tsx.snap +0 -334
- package/esm/core/NavList/index.js +0 -5
- package/esm/core/NavList/index.mdx +0 -185
- package/esm/core/NavList/index.spec.js +0 -9
- package/esm/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +0 -737
- package/esm/core/NotificationBanner/index.js +0 -35
- package/esm/core/NotificationBanner/index.mdx +0 -77
- package/esm/core/NotificationBanner/index.spec.js +0 -20
- package/esm/core/ServiceBadge/ServiceBadge.mdx +0 -0
- package/esm/core/ServiceBadge/index.js +0 -20
- package/esm/core/ServiceBadge/index.mdx +0 -42
- package/esm/core/SummaryList/__snapshots__/index.spec.tsx.snap +0 -57
- package/esm/core/SummaryList/index.js +0 -7
- package/esm/core/SummaryList/index.mdx +0 -82
- package/esm/core/SummaryList/index.spec.js +0 -9
- package/esm/core/Table/index.js +0 -7
- package/esm/core/Tabs/index.js +0 -37
- package/esm/core/Tabs/index.mdx +0 -54
- package/esm/core/VisuallyHidden/index.js +0 -1
- package/esm/core/WarningText/__snapshots__/index.spec.tsx.snap +0 -336
- package/esm/core/WarningText/index.js +0 -3
- package/esm/core/WarningText/index.mdx +0 -46
- package/esm/core/WarningText/index.spec.js +0 -9
- package/esm/core/index.js +0 -14
- package/esm/custom.d.js +0 -0
- package/esm/form/inputs/Input/index.mdx +0 -10
- package/esm/govgr/Footer/Copyright.js +0 -37
- package/esm/govgr/Footer/HellenicRepublicLogo.js +0 -3
- package/esm/govgr/Footer/LicenseCCSA.js +0 -18
- package/esm/govgr/Footer/index.js +0 -21
- package/esm/govgr/Footer/index.mdx +0 -97
- package/esm/govgr/Logo/govgr-logo.svg +0 -1
- package/esm/govgr/Logo/index.js +0 -3
- package/esm/govgr/Logo/logo.js +0 -1
- package/esm/govgr/index.js +0 -4
- package/esm/hooks/useDebounce.js +0 -41
- package/esm/hooks/useLatest.js +0 -12
- package/esm/hooks/useSearch.js +0 -25
- package/esm/hooks/useTogglableSections.js +0 -96
- package/esm/index.js +0 -10
- package/esm/layouts/Basic/Bottom/index.js +0 -3
- package/esm/layouts/Basic/Bottom/index.mdx +0 -37
- package/esm/layouts/Basic/Content/index.js +0 -18
- package/esm/layouts/Basic/Content/index.mdx +0 -64
- package/esm/layouts/Basic/Main/index.js +0 -3
- package/esm/layouts/Basic/Main/index.mdx +0 -64
- package/esm/layouts/Basic/Masthead/index.js +0 -4
- package/esm/layouts/Basic/Masthead/index.mdx +0 -74
- package/esm/layouts/Basic/Side/index.mdx +0 -71
- package/esm/layouts/Basic/Top/index.js +0 -11
- package/esm/layouts/Basic/Top/index.mdx +0 -74
- package/esm/layouts/Basic/__snapshots__/index.spec.tsx.snap +0 -54
- package/esm/layouts/Basic/index.js +0 -8
- package/esm/layouts/Basic/index.mdx +0 -62
- package/esm/layouts/Basic/index.spec.js +0 -10
- package/esm/layouts/Grid/index.js +0 -1
- package/esm/layouts/index.js +0 -2
- package/esm/locales/el.js +0 -45
- package/esm/router/index.js +0 -15
- package/esm/router/index.mdx +0 -40
- package/esm/test-utils/delay.js +0 -31
- package/esm/test-utils/mountWithTheme.js +0 -30
- package/esm/themes/govgr.js +0 -79
- package/esm/themes/grnet.js +0 -110
- package/esm/themes/index.js +0 -2
- package/esm/typography/Caption.js +0 -7
- package/esm/typography/NormalText.js +0 -3
- package/esm/typography/Paragraph.js +0 -2
- package/esm/typography/Title.js +0 -48
- package/esm/typography/index.js +0 -8
- package/esm/typography/index.mdx +0 -32
- package/esm/utils/evaluateBrowserVersion.js +0 -201
- package/esm/utils/withDeprecation.js +0 -103
- package/form/inputs/Input/index.mdx +0 -10
- package/govgr/Footer/Copyright.d.ts +0 -8
- package/govgr/Footer/Copyright.js +0 -52
- package/govgr/Footer/HellenicRepublicLogo.js +0 -19
- package/govgr/Footer/LicenseCCSA.d.ts +0 -3
- package/govgr/Footer/LicenseCCSA.js +0 -33
- package/govgr/Footer/index.d.ts +0 -13
- package/govgr/Footer/index.js +0 -39
- package/govgr/Footer/index.mdx +0 -97
- package/govgr/Footer/logo.d.ts +0 -2
- package/govgr/Footer/logo.js +0 -8
- package/govgr/Footer/logos/logo-el.d.ts +0 -2
- package/govgr/Footer/logos/logo-el.js +0 -8
- package/govgr/Footer/logos/logo-en.d.ts +0 -2
- package/govgr/Footer/logos/logo-en.js +0 -8
- package/govgr/Logo/govgr-logo.svg +0 -1
- package/govgr/Logo/index.js +0 -19
- package/govgr/Logo/logo.d.ts +0 -2
- package/govgr/Logo/logo.js +0 -8
- package/govgr/index.js +0 -57
- package/hooks/useDebounce.d.ts +0 -3
- package/hooks/useDebounce.js +0 -63
- package/hooks/useLatest.d.ts +0 -3
- package/hooks/useLatest.js +0 -26
- package/hooks/useOutdatedBrowserCheck.d.ts +0 -2
- package/hooks/useOutdatedBrowserCheck.js +0 -60
- package/hooks/useSearch.d.ts +0 -4
- package/hooks/useSearch.js +0 -40
- package/hooks/useTogglableSections.d.ts +0 -18
- package/hooks/useTogglableSections.js +0 -108
- package/index.js +0 -70
- package/layouts/Basic/Bottom/index.js +0 -19
- package/layouts/Basic/Bottom/index.mdx +0 -37
- package/layouts/Basic/Content/index.d.ts +0 -5
- package/layouts/Basic/Content/index.js +0 -31
- package/layouts/Basic/Content/index.mdx +0 -64
- package/layouts/Basic/Main/index.js +0 -19
- package/layouts/Basic/Main/index.mdx +0 -64
- package/layouts/Basic/Masthead/index.js +0 -27
- package/layouts/Basic/Masthead/index.mdx +0 -74
- package/layouts/Basic/Side/index.d.ts +0 -3
- package/layouts/Basic/Side/index.js +0 -20
- package/layouts/Basic/Side/index.mdx +0 -71
- package/layouts/Basic/Top/index.d.ts +0 -3
- package/layouts/Basic/Top/index.js +0 -24
- package/layouts/Basic/Top/index.mdx +0 -74
- package/layouts/Basic/__snapshots__/index.spec.tsx.snap +0 -54
- package/layouts/Basic/index.js +0 -97
- package/layouts/Basic/index.mdx +0 -62
- package/layouts/Basic/index.spec.d.ts +0 -1
- package/layouts/Basic/index.spec.js +0 -20
- package/layouts/Grid/index.js +0 -18
- package/layouts/index.js +0 -34
- package/locales/el.d.ts +0 -46
- package/locales/el.js +0 -52
- package/locales/en.d.ts +0 -46
- package/locales/en.js +0 -52
- package/router/index.d.ts +0 -9
- package/router/index.js +0 -37
- package/router/index.mdx +0 -40
- package/test-utils/delay.d.ts +0 -2
- package/test-utils/delay.js +0 -45
- package/test-utils/mountWithTheme.d.ts +0 -3
- package/test-utils/mountWithTheme.js +0 -43
- package/themes/govgr.d.ts +0 -3
- package/themes/govgr.js +0 -89
- package/themes/grnet.d.ts +0 -2
- package/themes/grnet.js +0 -128
- package/themes/index.d.ts +0 -32
- package/themes/index.js +0 -19
- package/typography/Caption.d.ts +0 -7
- package/typography/Caption.js +0 -20
- package/typography/NormalText.d.ts +0 -5
- package/typography/NormalText.js +0 -19
- package/typography/Paragraph.d.ts +0 -6
- package/typography/Paragraph.js +0 -13
- package/typography/Title.d.ts +0 -9
- package/typography/Title.js +0 -63
- package/typography/index.js +0 -97
- package/typography/index.mdx +0 -32
- package/utils/evaluateBrowserVersion.d.ts +0 -15
- package/utils/evaluateBrowserVersion.js +0 -216
- package/utils/withDeprecation.d.ts +0 -16
- package/utils/withDeprecation.js +0 -116
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Accordion
|
|
3
|
-
parent: docs/ui/components
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
Accordion,
|
|
8
|
-
AccordionItem,
|
|
9
|
-
AccordionItemDetails,
|
|
10
|
-
AccordionItemSummary,
|
|
11
|
-
} from '@digigov/ui/core/Accordion';
|
|
12
|
-
|
|
13
|
-
import PropsDoc from '@docs-components/propsDoc';
|
|
14
|
-
import StylesDoc from '@docs-components/stylesDoc';
|
|
15
|
-
|
|
16
|
-
## Example
|
|
17
|
-
|
|
18
|
-
<Accordion>
|
|
19
|
-
<AccordionItem>
|
|
20
|
-
<AccordionItemSummary>Βασικες Ρυθμισεις</AccordionItemSummary>
|
|
21
|
-
<AccordionItemDetails>Περιεχομενο Βασικων Ρυθμισεων</AccordionItemDetails>
|
|
22
|
-
</AccordionItem>
|
|
23
|
-
<AccordionItem>
|
|
24
|
-
<AccordionItemSummary>Υπολοιπες Ρυθμισεις</AccordionItemSummary>
|
|
25
|
-
<AccordionItemDetails>Περιεχομενο Υπολοιπων Ρυθμισεων</AccordionItemDetails>
|
|
26
|
-
</AccordionItem>
|
|
27
|
-
</Accordion>
|
|
28
|
-
|
|
29
|
-
## How to use
|
|
30
|
-
|
|
31
|
-
```jsx live path=core/Accordion/index.tsx
|
|
32
|
-
import {
|
|
33
|
-
Accordion,
|
|
34
|
-
AccordionItem,
|
|
35
|
-
AccordionItemDetails,
|
|
36
|
-
AccordionItemSummary,
|
|
37
|
-
} from 'govgr/components/Accordion';
|
|
38
|
-
|
|
39
|
-
function CustomAccordion() {
|
|
40
|
-
return (
|
|
41
|
-
<Accordion>
|
|
42
|
-
<AccordionItem>
|
|
43
|
-
<AccordionItemSummary>Βασικες Ρυθμισεις</AccordionItemSummary>
|
|
44
|
-
<AccordionItemDetails>
|
|
45
|
-
Περιεχομενο Βασικων Ρυθμισεων
|
|
46
|
-
</AccordionItemDetails>
|
|
47
|
-
</AccordionItem>
|
|
48
|
-
<AccordionItem>
|
|
49
|
-
<AccordionItemSummary>Υπολοιπες Ρυθμισεις</AccordionItemSummary>
|
|
50
|
-
<AccordionItemDetails>
|
|
51
|
-
Περιεχομενο Υπολοιπων Ρυθμισεων
|
|
52
|
-
</AccordionItemDetails>
|
|
53
|
-
</AccordionItem>
|
|
54
|
-
</Accordion>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## When to use this component
|
|
60
|
-
|
|
61
|
-
Only use an accordion if there’s evidence it’s helpful for users to:
|
|
62
|
-
|
|
63
|
-
- see an overview of multiple, related sections of content
|
|
64
|
-
- show and hide those sections as needed
|
|
65
|
-
|
|
66
|
-
Accordions can work well for people who use a service regularly, for example users of caseworking systems who need to perform familiar tasks quickly.
|
|
67
|
-
|
|
68
|
-
## When not to use this component
|
|
69
|
-
|
|
70
|
-
Accordions hide content from users and not everyone will notice them or understand how they work. For this reason do not use an accordion for content which is essential to all users.
|
|
71
|
-
|
|
72
|
-
Test your content without an accordion first. Consider if it’s better to:
|
|
73
|
-
|
|
74
|
-
- simplify and reduce the amount of content
|
|
75
|
-
- split the content across multiple pages
|
|
76
|
-
- keep the content on a single page, separated by headings
|
|
77
|
-
- use a list of links to let users navigate quickly to specific sections of content
|
|
78
|
-
|
|
79
|
-
Do not use the accordion component if the amount of content it would need to contain will make the page slow to load.
|
|
80
|
-
|
|
81
|
-
Accordions work best for simple content and links. Do not use accordions to split up a series of questions into sections. Use separate pages instead.
|
|
82
|
-
|
|
83
|
-
## API
|
|
84
|
-
|
|
85
|
-
### Properties
|
|
86
|
-
|
|
87
|
-
<PropsDoc data={Accordion.__doc__} />
|
|
88
|
-
<br />
|
|
89
|
-
<PropsDoc data={AccordionItem.__doc__} />
|
|
90
|
-
<br />
|
|
91
|
-
<PropsDoc data={AccordionItemSummary.__doc__} />
|
|
92
|
-
<br />
|
|
93
|
-
<PropsDoc data={AccordionItemDetails.__doc__} />
|
|
94
|
-
|
|
95
|
-
### Styles
|
|
96
|
-
|
|
97
|
-
<StylesDoc data={Accordion.__doc__} />
|
|
98
|
-
<br />
|
|
99
|
-
<StylesDoc data={AccordionItem.__doc__} />
|
|
100
|
-
<br />
|
|
101
|
-
<StylesDoc data={AccordionItemSummary.__doc__} />
|
|
102
|
-
<br />
|
|
103
|
-
<StylesDoc data={AccordionItemDetails.__doc__} />
|
|
104
|
-
<br />
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import { Accordion, AccordionItem, AccordionItemDetails, AccordionItemSummary } from '@digigov/ui/core/Accordion';
|
|
4
|
-
|
|
5
|
-
var _ref = /*#__PURE__*/React.createElement(Accordion, null, /*#__PURE__*/React.createElement(AccordionItem, null, /*#__PURE__*/React.createElement(AccordionItemSummary, null, "\u0392\u03B1\u03C3\u03B9\u03BA\u03B5\u03C2 \u03A1\u03C5\u03B8\u03BC\u03B9\u03C3\u03B5\u03B9\u03C2"), /*#__PURE__*/React.createElement(AccordionItemDetails, null, "\u03A0\u03B5\u03C1\u03B9\u03B5\u03C7\u03BF\u03BC\u03B5\u03BD\u03BF \u0392\u03B1\u03C3\u03B9\u03BA\u03C9\u03BD \u03A1\u03C5\u03B8\u03BC\u03B9\u03C3\u03B5\u03C9\u03BD")), /*#__PURE__*/React.createElement(AccordionItem, null, /*#__PURE__*/React.createElement(AccordionItemSummary, null, "\u03A5\u03C0\u03BF\u03BB\u03BF\u03B9\u03C0\u03B5\u03C2 \u03A1\u03C5\u03B8\u03BC\u03B9\u03C3\u03B5\u03B9\u03C2"), /*#__PURE__*/React.createElement(AccordionItemDetails, null, "\u03A0\u03B5\u03C1\u03B9\u03B5\u03C7\u03BF\u03BC\u03B5\u03BD\u03BF \u03A5\u03C0\u03BF\u03BB\u03BF\u03B9\u03C0\u03C9\u03BD \u03A1\u03C5\u03B8\u03BC\u03B9\u03C3\u03B5\u03C9\u03BD")));
|
|
6
|
-
|
|
7
|
-
it('renders the Accordion', function () {
|
|
8
|
-
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`renders the Blockquote with sample data 1`] = `
|
|
4
|
-
<withDeprecationComponent>
|
|
5
|
-
<ForwardRef(Blockquote)>
|
|
6
|
-
<blockquote
|
|
7
|
-
className="govgr-blockquote"
|
|
8
|
-
>
|
|
9
|
-
this is some random data
|
|
10
|
-
</blockquote>
|
|
11
|
-
</ForwardRef(Blockquote)>
|
|
12
|
-
</withDeprecationComponent>
|
|
13
|
-
`;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
parent: docs/ui/components
|
|
3
|
-
title: Blockquote
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import Blockquote from '@digigov/ui/core/Blockquote';
|
|
7
|
-
|
|
8
|
-
## Example
|
|
9
|
-
|
|
10
|
-
<Blockquote>
|
|
11
|
-
It can take up to 8 weeks to register a lasting power of attorney if there are
|
|
12
|
-
no mistakes in the application.
|
|
13
|
-
</Blockquote>
|
|
14
|
-
<Blockquote variant="warning">
|
|
15
|
-
It can take up to 8 weeks to register a lasting power of attorney if there are
|
|
16
|
-
no mistakes in the application.
|
|
17
|
-
</Blockquote>
|
|
18
|
-
<Blockquote variant="error">
|
|
19
|
-
It can take up to 8 weeks to register a lasting power of attorney if there are
|
|
20
|
-
no mistakes in the application.
|
|
21
|
-
</Blockquote>
|
|
22
|
-
|
|
23
|
-
## How to use
|
|
24
|
-
|
|
25
|
-
```jsx
|
|
26
|
-
import Blockquote from 'govgr/components/Blockquote';
|
|
27
|
-
|
|
28
|
-
<Blockquote>
|
|
29
|
-
It can take up to 8 weeks to register a lasting power of attorney if there are
|
|
30
|
-
no mistakes in the application.
|
|
31
|
-
</Blockquote>
|
|
32
|
-
|
|
33
|
-
<Blockquote variant="warning">
|
|
34
|
-
It can take up to 8 weeks to register a lasting power of attorney if there are
|
|
35
|
-
no mistakes in the application.
|
|
36
|
-
</Blockquote>
|
|
37
|
-
|
|
38
|
-
<Blockquote variant="error">
|
|
39
|
-
It can take up to 8 weeks to register a lasting power of attorney if there are
|
|
40
|
-
no mistakes in the application.
|
|
41
|
-
</Blockquote>
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## When to use this component
|
|
46
|
-
|
|
47
|
-
Use the inset text component to differentiate a block of text from the content that surrounds it, for example:
|
|
48
|
-
|
|
49
|
-
quotes
|
|
50
|
-
examples
|
|
51
|
-
additional information about the page
|
|
52
|
-
|
|
53
|
-
## When not to use this component
|
|
54
|
-
|
|
55
|
-
Some users do not notice inset text if it’s used on complex pages or near to other visually prominent elements. For this reason, avoid using inset text as a way of highlighting very important information that users need to see.
|
|
56
|
-
|
|
57
|
-
If you need to draw attention to very important content, like legal information, use the warning text component instead.
|
|
58
|
-
|
|
59
|
-
## How it works
|
|
60
|
-
|
|
61
|
-
Use inset text very sparingly - it’s less effective if it’s overused.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import Component from '@digigov/ui/core/Blockquote';
|
|
4
|
-
|
|
5
|
-
var _ref = /*#__PURE__*/React.createElement(Component, null, "this is some random data");
|
|
6
|
-
|
|
7
|
-
it('renders the Blockquote with sample data', function () {
|
|
8
|
-
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import CoreButtonLink from '@digigov/react-core/ButtonLink';
|
|
2
|
-
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
-
export var ButtonLink = withDeprecation(CoreButtonLink, {
|
|
4
|
-
name: 'ButtonLink',
|
|
5
|
-
props: {
|
|
6
|
-
variant: {
|
|
7
|
-
error: true
|
|
8
|
-
},
|
|
9
|
-
size: {
|
|
10
|
-
error: true
|
|
11
|
-
},
|
|
12
|
-
xsFullWidth: {
|
|
13
|
-
error: true
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["label", "children"];
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import CoreCallToAction from '@digigov/react-core/CallToAction';
|
|
5
|
-
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
6
|
-
export var CallToAction = withDeprecation(function (_ref) {
|
|
7
|
-
var _ref$label = _ref.label,
|
|
8
|
-
label = _ref$label === void 0 ? 'Start here' : _ref$label,
|
|
9
|
-
children = _ref.children,
|
|
10
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
-
|
|
12
|
-
return /*#__PURE__*/React.createElement(CoreCallToAction, props, children || label);
|
|
13
|
-
}, {
|
|
14
|
-
name: 'CallToAction',
|
|
15
|
-
props: {
|
|
16
|
-
variant: {
|
|
17
|
-
error: true
|
|
18
|
-
},
|
|
19
|
-
size: {
|
|
20
|
-
error: true
|
|
21
|
-
},
|
|
22
|
-
xsFullWidth: {
|
|
23
|
-
error: true
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
export default CallToAction;
|
package/esm/core/Button/Icon.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`renders the button 1`] = `
|
|
4
|
-
<withDeprecationComponent>
|
|
5
|
-
<ForwardRef(Button)>
|
|
6
|
-
<button
|
|
7
|
-
className="govgr-btn-primary govgr-btn"
|
|
8
|
-
>
|
|
9
|
-
hello
|
|
10
|
-
</button>
|
|
11
|
-
</ForwardRef(Button)>
|
|
12
|
-
</withDeprecationComponent>
|
|
13
|
-
`;
|
package/esm/core/Button/index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["label", "children"];
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import CoreButton from '@digigov/react-core/Button';
|
|
5
|
-
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
6
|
-
export var Button = withDeprecation(CoreButton, {
|
|
7
|
-
name: 'Button',
|
|
8
|
-
props: {
|
|
9
|
-
href: {
|
|
10
|
-
error: 'To use a button with a link import ButtonLink instead'
|
|
11
|
-
},
|
|
12
|
-
variant: {
|
|
13
|
-
error: true
|
|
14
|
-
},
|
|
15
|
-
size: {
|
|
16
|
-
error: true
|
|
17
|
-
},
|
|
18
|
-
xsFullWidth: {
|
|
19
|
-
error: true
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
export default Button;
|
|
24
|
-
export var ContinueButton = function ContinueButton(_ref) {
|
|
25
|
-
var _ref$label = _ref.label,
|
|
26
|
-
label = _ref$label === void 0 ? 'Continue' : _ref$label,
|
|
27
|
-
children = _ref.children,
|
|
28
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
|
|
30
|
-
return /*#__PURE__*/React.createElement(Button, props, label || children);
|
|
31
|
-
};
|
|
32
|
-
export * from '@digigov/ui/core/Button/BackButton';
|
|
33
|
-
export * from '@digigov/ui/core/Button/CallToAction';
|
|
34
|
-
export * from '@digigov/ui/core/Button/ButtonLink';
|
|
35
|
-
export * from '@digigov/ui/core/Button/Icon';
|
|
36
|
-
export * from '@digigov/react-core/ButtonGroup';
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Button
|
|
3
|
-
parent: docs/ui/components
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Button
|
|
7
|
-
|
|
8
|
-
import Button from '@digigov/ui/core/Button';
|
|
9
|
-
import PropsDoc from '@docs-components/propsDoc';
|
|
10
|
-
import StylesDoc from '@docs-components/stylesDoc';
|
|
11
|
-
|
|
12
|
-
Use the button component to help users carry out an action like starting an
|
|
13
|
-
application or saving their information.
|
|
14
|
-
|
|
15
|
-
```jsx live path=core/Button/index.tsx
|
|
16
|
-
import Button from '@digigov/ui/core/Button';
|
|
17
|
-
function CustomButton (props){
|
|
18
|
-
return (
|
|
19
|
-
<Button>Action Label</Button>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
export CustomButton
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## How it works
|
|
27
|
-
|
|
28
|
-
Write button text in sentence case, describing the action it performs. For
|
|
29
|
-
example:'
|
|
30
|
-
|
|
31
|
-
- `Start now` at the [start of the service](patterns/start-pages.md)
|
|
32
|
-
- `Sign in` to an account a user has already created
|
|
33
|
-
- `Continue` when the service does not save a user's information
|
|
34
|
-
- `Save and continue` when the service does save a user's information
|
|
35
|
-
- `Save and come back later` when a user can save their information and come back later
|
|
36
|
-
- `Add another` to add another item to a list or group
|
|
37
|
-
- `Pay` to make a payment
|
|
38
|
-
- `Confirm and send` on a check answers page that does not have any legal
|
|
39
|
-
content a user must agree to
|
|
40
|
-
- `Accept and send` on a check answers page that has legal content a user
|
|
41
|
-
must agree to
|
|
42
|
-
- `Sign out` when a user is signed in to an account
|
|
43
|
-
|
|
44
|
-
You may need to include more or different words to better describe the action.
|
|
45
|
-
For example, `Add another address` and `Accept and claim a tax refund`.
|
|
46
|
-
|
|
47
|
-
Align the primary action button to the left edge of your form.
|
|
48
|
-
|
|
49
|
-
## Default buttons
|
|
50
|
-
|
|
51
|
-
Use a default button for the main call to action on a page.
|
|
52
|
-
|
|
53
|
-
Avoid using multiple default buttons on a single page. Having more than on main
|
|
54
|
-
call to action reduces their impact, and makes it harder for users to know what
|
|
55
|
-
to do next.
|
|
56
|
-
|
|
57
|
-
## API
|
|
58
|
-
|
|
59
|
-
### Properties
|
|
60
|
-
|
|
61
|
-
<PropsDoc data={Button.__doc__} />
|
|
62
|
-
|
|
63
|
-
### Styles
|
|
64
|
-
|
|
65
|
-
<StylesDoc data={Button.__doc__} />
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import Component from '@digigov/ui/core/Button';
|
|
4
|
-
|
|
5
|
-
var _ref = /*#__PURE__*/React.createElement(Component, null, "hello");
|
|
6
|
-
|
|
7
|
-
it('renders the button', function () {
|
|
8
|
-
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
-
});
|
package/esm/core/Card/index.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`renders the closed Details component 1`] = `
|
|
4
|
-
<ForwardRef(Details)>
|
|
5
|
-
<details
|
|
6
|
-
className="govgr-details"
|
|
7
|
-
>
|
|
8
|
-
<ForwardRef(DetailsSummary)>
|
|
9
|
-
<summary
|
|
10
|
-
className="govgr-details__summary"
|
|
11
|
-
>
|
|
12
|
-
Help with nationality
|
|
13
|
-
</summary>
|
|
14
|
-
</ForwardRef(DetailsSummary)>
|
|
15
|
-
<ForwardRef(DetailsContent)>
|
|
16
|
-
<div
|
|
17
|
-
className="govgr-details__summary-text"
|
|
18
|
-
>
|
|
19
|
-
We need to know your nationality so we can work out which elections you’re entitled to vote in. If you cannot provide your nationality, you’ll have to send copies of identity documents through the post.
|
|
20
|
-
</div>
|
|
21
|
-
</ForwardRef(DetailsContent)>
|
|
22
|
-
</details>
|
|
23
|
-
</ForwardRef(Details)>
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
exports[`renders the open Details component 1`] = `
|
|
27
|
-
<ForwardRef(Details)
|
|
28
|
-
open={true}
|
|
29
|
-
>
|
|
30
|
-
<details
|
|
31
|
-
className="govgr-details"
|
|
32
|
-
open={true}
|
|
33
|
-
>
|
|
34
|
-
<ForwardRef(DetailsSummary)>
|
|
35
|
-
<summary
|
|
36
|
-
className="govgr-details__summary"
|
|
37
|
-
>
|
|
38
|
-
Help with nationality
|
|
39
|
-
</summary>
|
|
40
|
-
</ForwardRef(DetailsSummary)>
|
|
41
|
-
<ForwardRef(DetailsContent)>
|
|
42
|
-
<div
|
|
43
|
-
className="govgr-details__summary-text"
|
|
44
|
-
>
|
|
45
|
-
We need to know your nationality so we can work out which elections you’re entitled to vote in. If you cannot provide your nationality, you’ll have to send copies of identity documents through the post.
|
|
46
|
-
</div>
|
|
47
|
-
</ForwardRef(DetailsContent)>
|
|
48
|
-
</details>
|
|
49
|
-
</ForwardRef(Details)>
|
|
50
|
-
`;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
parent: docs/ui/components
|
|
3
|
-
title: Details
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Example
|
|
7
|
-
|
|
8
|
-
```jsx live
|
|
9
|
-
<Details>
|
|
10
|
-
<DetailsSummary>Help with nationality</DetailsSummary>
|
|
11
|
-
<DetailsContent>
|
|
12
|
-
We need to know your nationality so we can work out which elections you’re
|
|
13
|
-
entitled to vote in. If you cannot provide your nationality, you’ll have to
|
|
14
|
-
send copies of identity documents through the post.
|
|
15
|
-
</DetailsContent>
|
|
16
|
-
</Details>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
<br />
|
|
20
|
-
|
|
21
|
-
## When to use this component
|
|
22
|
-
|
|
23
|
-
Use the Details component to make a page easier to scan when it contains
|
|
24
|
-
information that only some users will need.
|
|
25
|
-
|
|
26
|
-
## When not to use this component
|
|
27
|
-
|
|
28
|
-
Do not use the Details component to hide information that the majority of
|
|
29
|
-
your users should see.
|
|
30
|
-
|
|
31
|
-
## How it works
|
|
32
|
-
|
|
33
|
-
The Details component is a short link that expands into a text including some
|
|
34
|
-
extra information, when a user clicks on it.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import { Details, DetailsContent, DetailsSummary } from '@digigov/ui/core/Details';
|
|
4
|
-
|
|
5
|
-
var _ref = /*#__PURE__*/React.createElement(Details, null, /*#__PURE__*/React.createElement(DetailsSummary, null, "Help with nationality"), /*#__PURE__*/React.createElement(DetailsContent, null, "We need to know your nationality so we can work out which elections you\u2019re entitled to vote in. If you cannot provide your nationality, you\u2019ll have to send copies of identity documents through the post."));
|
|
6
|
-
|
|
7
|
-
it('renders the closed Details component', function () {
|
|
8
|
-
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
var _ref2 = /*#__PURE__*/React.createElement(Details, {
|
|
12
|
-
open: true
|
|
13
|
-
}, /*#__PURE__*/React.createElement(DetailsSummary, null, "Help with nationality"), /*#__PURE__*/React.createElement(DetailsContent, null, "We need to know your nationality so we can work out which elections you\u2019re entitled to vote in. If you cannot provide your nationality, you\u2019ll have to send copies of identity documents through the post."));
|
|
14
|
-
|
|
15
|
-
it('renders the open Details component', function () {
|
|
16
|
-
expect(mount(_ref2)).toMatchSnapshot();
|
|
17
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import CoreSectionBreak from '@digigov/react-core/SectionBreak';
|
|
2
|
-
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
-
export var SectionBreak = withDeprecation(CoreSectionBreak, {
|
|
4
|
-
name: 'Divider',
|
|
5
|
-
rename: 'SectionBreak'
|
|
6
|
-
});
|
|
7
|
-
export default SectionBreak;
|