@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,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.Top = void 0;
|
|
9
|
-
|
|
10
|
-
var _Top = _interopRequireDefault(require("@digigov/react-core/Top"));
|
|
11
|
-
|
|
12
|
-
var _withDeprecation = _interopRequireDefault(require("@digigov/ui/utils/withDeprecation"));
|
|
13
|
-
|
|
14
|
-
var Top = (0, _withDeprecation["default"])(_Top["default"], {
|
|
15
|
-
name: 'Top',
|
|
16
|
-
props: {
|
|
17
|
-
dense: {
|
|
18
|
-
error: true
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
exports.Top = Top;
|
|
23
|
-
var _default = Top;
|
|
24
|
-
exports["default"] = _default;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Top
|
|
3
|
-
parent: docs/ui/components
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Top
|
|
7
|
-
|
|
8
|
-
import { Top } from '@digigov/ui/layouts/Basic';
|
|
9
|
-
import PropsDoc from '@docs-components/propsDoc';
|
|
10
|
-
import StylesDoc from '@docs-components/stylesDoc';
|
|
11
|
-
|
|
12
|
-
### Example without bottom margin
|
|
13
|
-
|
|
14
|
-
```jsx live path=layouts/Basic/index.tsx
|
|
15
|
-
import Header, { HeaderTitle } from '@digigov/ui/app/Header';
|
|
16
|
-
import GovGRLogo from '@digigov/ui/govgr/Logo';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function Top{
|
|
20
|
-
return (
|
|
21
|
-
<Top dense>
|
|
22
|
-
<Header>
|
|
23
|
-
<GovGRLogo />
|
|
24
|
-
<HeaderTitle>
|
|
25
|
-
<ServiceBadge />
|
|
26
|
-
</HeaderTitle>
|
|
27
|
-
</Header>
|
|
28
|
-
</Top>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
export Top
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Example with bottom margin
|
|
36
|
-
|
|
37
|
-
```jsx live path=layouts/Basic/index.tsx
|
|
38
|
-
import Header, { HeaderTitle } from '@digigov/ui/app/Header';
|
|
39
|
-
import GovGRLogo from '@digigov/ui/govgr/Logo';
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
function Top{
|
|
43
|
-
return (
|
|
44
|
-
<Top>
|
|
45
|
-
<Header>
|
|
46
|
-
<GovGRLogo />
|
|
47
|
-
<HeaderTitle>
|
|
48
|
-
<ServiceBadge />
|
|
49
|
-
</HeaderTitle>
|
|
50
|
-
</Header>
|
|
51
|
-
</Top>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
export Top
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
<br />
|
|
59
|
-
|
|
60
|
-
## How it works
|
|
61
|
-
|
|
62
|
-
The Top component is used to group the Header components.
|
|
63
|
-
|
|
64
|
-
## API
|
|
65
|
-
|
|
66
|
-
### Properties
|
|
67
|
-
|
|
68
|
-
<PropsDoc data={Top.__doc__} />
|
|
69
|
-
|
|
70
|
-
<br />
|
|
71
|
-
|
|
72
|
-
### Styles
|
|
73
|
-
|
|
74
|
-
<StylesDoc data={Top.__doc__} />
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`renders the BasicLayout with Top, Content, Bottom, Main and Side children 1`] = `
|
|
4
|
-
<ForwardRef(Layout)>
|
|
5
|
-
<div
|
|
6
|
-
className="govgr-layout-wrapper__full-height govgr-layout-wrapper"
|
|
7
|
-
>
|
|
8
|
-
<withDeprecationComponent>
|
|
9
|
-
<ForwardRef(Top)>
|
|
10
|
-
<div
|
|
11
|
-
className="govgr-top"
|
|
12
|
-
>
|
|
13
|
-
Header content
|
|
14
|
-
</div>
|
|
15
|
-
</ForwardRef(Top)>
|
|
16
|
-
</withDeprecationComponent>
|
|
17
|
-
<withDeprecationComponent>
|
|
18
|
-
<ForwardRef(Container)>
|
|
19
|
-
<div
|
|
20
|
-
className="govgr-width-container"
|
|
21
|
-
>
|
|
22
|
-
<div
|
|
23
|
-
className="govgr-main-wrapper"
|
|
24
|
-
>
|
|
25
|
-
<ForwardRef(Main)>
|
|
26
|
-
<main
|
|
27
|
-
className="govgr-grid-column-two-thirds"
|
|
28
|
-
>
|
|
29
|
-
Main content
|
|
30
|
-
</main>
|
|
31
|
-
</ForwardRef(Main)>
|
|
32
|
-
<withDeprecationComponent>
|
|
33
|
-
<ForwardRef(Aside)>
|
|
34
|
-
<aside
|
|
35
|
-
className="govgr-grid-column-one-third"
|
|
36
|
-
>
|
|
37
|
-
Side content
|
|
38
|
-
</aside>
|
|
39
|
-
</ForwardRef(Aside)>
|
|
40
|
-
</withDeprecationComponent>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</ForwardRef(Container)>
|
|
44
|
-
</withDeprecationComponent>
|
|
45
|
-
<ForwardRef(Bottom)>
|
|
46
|
-
<div
|
|
47
|
-
className="govgr-bottom"
|
|
48
|
-
>
|
|
49
|
-
Bottom content
|
|
50
|
-
</div>
|
|
51
|
-
</ForwardRef(Bottom)>
|
|
52
|
-
</div>
|
|
53
|
-
</ForwardRef(Layout)>
|
|
54
|
-
`;
|
package/layouts/Basic/index.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
var _exportNames = {};
|
|
9
|
-
exports["default"] = void 0;
|
|
10
|
-
|
|
11
|
-
var _Layout = _interopRequireDefault(require("@digigov/react-core/Layout"));
|
|
12
|
-
|
|
13
|
-
var _Top = require("@digigov/ui/layouts/Basic/Top");
|
|
14
|
-
|
|
15
|
-
Object.keys(_Top).forEach(function (key) {
|
|
16
|
-
if (key === "default" || key === "__esModule") return;
|
|
17
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
18
|
-
if (key in exports && exports[key] === _Top[key]) return;
|
|
19
|
-
Object.defineProperty(exports, key, {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function get() {
|
|
22
|
-
return _Top[key];
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
var _Side = require("@digigov/ui/layouts/Basic/Side");
|
|
28
|
-
|
|
29
|
-
Object.keys(_Side).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
32
|
-
if (key in exports && exports[key] === _Side[key]) return;
|
|
33
|
-
Object.defineProperty(exports, key, {
|
|
34
|
-
enumerable: true,
|
|
35
|
-
get: function get() {
|
|
36
|
-
return _Side[key];
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
var _Main = require("@digigov/ui/layouts/Basic/Main");
|
|
42
|
-
|
|
43
|
-
Object.keys(_Main).forEach(function (key) {
|
|
44
|
-
if (key === "default" || key === "__esModule") return;
|
|
45
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
46
|
-
if (key in exports && exports[key] === _Main[key]) return;
|
|
47
|
-
Object.defineProperty(exports, key, {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
get: function get() {
|
|
50
|
-
return _Main[key];
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
var _Content = require("@digigov/ui/layouts/Basic/Content");
|
|
56
|
-
|
|
57
|
-
Object.keys(_Content).forEach(function (key) {
|
|
58
|
-
if (key === "default" || key === "__esModule") return;
|
|
59
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
60
|
-
if (key in exports && exports[key] === _Content[key]) return;
|
|
61
|
-
Object.defineProperty(exports, key, {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function get() {
|
|
64
|
-
return _Content[key];
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
var _Bottom = require("@digigov/ui/layouts/Basic/Bottom");
|
|
70
|
-
|
|
71
|
-
Object.keys(_Bottom).forEach(function (key) {
|
|
72
|
-
if (key === "default" || key === "__esModule") return;
|
|
73
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
74
|
-
if (key in exports && exports[key] === _Bottom[key]) return;
|
|
75
|
-
Object.defineProperty(exports, key, {
|
|
76
|
-
enumerable: true,
|
|
77
|
-
get: function get() {
|
|
78
|
-
return _Bottom[key];
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
var _Masthead = require("@digigov/ui/layouts/Basic/Masthead");
|
|
84
|
-
|
|
85
|
-
Object.keys(_Masthead).forEach(function (key) {
|
|
86
|
-
if (key === "default" || key === "__esModule") return;
|
|
87
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
88
|
-
if (key in exports && exports[key] === _Masthead[key]) return;
|
|
89
|
-
Object.defineProperty(exports, key, {
|
|
90
|
-
enumerable: true,
|
|
91
|
-
get: function get() {
|
|
92
|
-
return _Masthead[key];
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
var _default = _Layout["default"];
|
|
97
|
-
exports["default"] = _default;
|
package/layouts/Basic/index.mdx
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Basic Layout
|
|
3
|
-
parent: docs/ui/components
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# BasicLayout
|
|
7
|
-
|
|
8
|
-
import BasicLayout, {
|
|
9
|
-
Top,
|
|
10
|
-
Side,
|
|
11
|
-
Main,
|
|
12
|
-
Content,
|
|
13
|
-
Bottom,
|
|
14
|
-
} from '@digigov/ui/layouts/Basic';
|
|
15
|
-
import StylesDoc from '@docs-components/stylesDoc';
|
|
16
|
-
|
|
17
|
-
Use the BasicLayout component to create a basic page layout.
|
|
18
|
-
|
|
19
|
-
```jsx live path=layouts/Basic/index.tsx
|
|
20
|
-
import BasicLayout, { Top, Side, Main , Content, Bottom } from '@digigov/ui/layouts/Basic';
|
|
21
|
-
function CustomLayout (props){
|
|
22
|
-
return (
|
|
23
|
-
<BasicLayout>
|
|
24
|
-
<Top>Header content</Top>
|
|
25
|
-
<Content>
|
|
26
|
-
<Main>Main content</Main>
|
|
27
|
-
<Side>Side content</Side>
|
|
28
|
-
</Content>
|
|
29
|
-
<Bottom>Bottom content</Bottom>
|
|
30
|
-
</BasicLayout>
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
export CustomLayout
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
<br />
|
|
38
|
-
|
|
39
|
-
## How it works
|
|
40
|
-
|
|
41
|
-
The BasicLayout component is used in combination with the Top, Side, Main,
|
|
42
|
-
Content and Bottom components.
|
|
43
|
-
|
|
44
|
-
## API
|
|
45
|
-
|
|
46
|
-
### Properties
|
|
47
|
-
|
|
48
|
-
<br />
|
|
49
|
-
|
|
50
|
-
### Styles
|
|
51
|
-
|
|
52
|
-
<StylesDoc data={BasicLayout.__doc__} />
|
|
53
|
-
<br />
|
|
54
|
-
<StylesDoc data={Top.__doc__} />
|
|
55
|
-
<br />
|
|
56
|
-
<StylesDoc data={Content.__doc__} />
|
|
57
|
-
<br />
|
|
58
|
-
<StylesDoc data={Main.__doc__} />
|
|
59
|
-
<br />
|
|
60
|
-
<StylesDoc data={Side.__doc__} />
|
|
61
|
-
<br />
|
|
62
|
-
<StylesDoc data={Bottom.__doc__} />
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
-
|
|
5
|
-
var React = _interopRequireWildcard(require("react"));
|
|
6
|
-
|
|
7
|
-
var _enzyme = require("enzyme");
|
|
8
|
-
|
|
9
|
-
var _Basic = _interopRequireWildcard(require("@digigov/ui/layouts/Basic"));
|
|
10
|
-
|
|
11
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
-
|
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
-
|
|
15
|
-
var _ref = /*#__PURE__*/React.createElement(_Basic["default"], null, /*#__PURE__*/React.createElement(_Basic.Top, null, "Header content"), /*#__PURE__*/React.createElement(_Basic.Content, null, /*#__PURE__*/React.createElement(_Basic.Main, null, "Main content"), /*#__PURE__*/React.createElement(_Basic.Side, null, "Side content")), /*#__PURE__*/React.createElement(_Basic.Bottom, null, "Bottom content"));
|
|
16
|
-
|
|
17
|
-
it('renders the BasicLayout with Top, Content, Bottom, Main and Side children ', function () {
|
|
18
|
-
var jsx = _ref;
|
|
19
|
-
expect((0, _enzyme.mount)(jsx)).toMatchSnapshot();
|
|
20
|
-
});
|
package/layouts/Grid/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _Grid = require("@digigov/react-core/Grid");
|
|
8
|
-
|
|
9
|
-
Object.keys(_Grid).forEach(function (key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] === _Grid[key]) return;
|
|
12
|
-
Object.defineProperty(exports, key, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _Grid[key];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
package/layouts/index.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
var _exportNames = {
|
|
9
|
-
BasicLayout: true
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "BasicLayout", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function get() {
|
|
14
|
-
return _Basic["default"];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
var _Basic = _interopRequireWildcard(require("@digigov/ui/layouts/Basic"));
|
|
19
|
-
|
|
20
|
-
Object.keys(_Basic).forEach(function (key) {
|
|
21
|
-
if (key === "default" || key === "__esModule") return;
|
|
22
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
23
|
-
if (key in exports && exports[key] === _Basic[key]) return;
|
|
24
|
-
Object.defineProperty(exports, key, {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _Basic[key];
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
-
|
|
34
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
package/locales/el.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
form: {
|
|
3
|
-
error: {
|
|
4
|
-
required: string;
|
|
5
|
-
number: string;
|
|
6
|
-
positive_number: string;
|
|
7
|
-
string: string;
|
|
8
|
-
email: string;
|
|
9
|
-
afm: string;
|
|
10
|
-
file_size: string;
|
|
11
|
-
mobile_phone: string;
|
|
12
|
-
uuid4: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
button: {
|
|
16
|
-
start: string;
|
|
17
|
-
login: string;
|
|
18
|
-
back: string;
|
|
19
|
-
continue: string;
|
|
20
|
-
search_ref: string;
|
|
21
|
-
scan: string;
|
|
22
|
-
save: string;
|
|
23
|
-
logout: string;
|
|
24
|
-
submit: string;
|
|
25
|
-
delete: string;
|
|
26
|
-
};
|
|
27
|
-
footer: {
|
|
28
|
-
created_by: string;
|
|
29
|
-
grnet: string;
|
|
30
|
-
mindigital: string;
|
|
31
|
-
using: string;
|
|
32
|
-
open_source: string;
|
|
33
|
-
creative_commons: string;
|
|
34
|
-
};
|
|
35
|
-
notfound: {
|
|
36
|
-
page_not_found: string;
|
|
37
|
-
wrong_key_address: string;
|
|
38
|
-
wrong_cp_address: string;
|
|
39
|
-
service_contact: string;
|
|
40
|
-
};
|
|
41
|
-
outdated: {
|
|
42
|
-
mobile: string;
|
|
43
|
-
web: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export default _default;
|
package/locales/el.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _default = {
|
|
8
|
-
form: {
|
|
9
|
-
error: {
|
|
10
|
-
required: 'Το πεδίο είναι υποχρεωτικό.',
|
|
11
|
-
number: 'Συμπληρώστε έναν έγκυρο αριθμό',
|
|
12
|
-
positive_number: 'Συμπληρώστε έναν θετικό αριθμό',
|
|
13
|
-
string: 'Το πεδίο πρέπει να είναι string',
|
|
14
|
-
email: 'Συμπληρώστε μια έγκυρη ηλεκτρονική διεύθυνση (e-mail).',
|
|
15
|
-
afm: 'Ο Α.Φ.Μ που πληκτρολογήσατε είναι λανθασμένος.',
|
|
16
|
-
file_size: 'Το μέγεθος του αρχείου είναι μεγαλύτερο απο το επιτρεπόμενο.',
|
|
17
|
-
mobile_phone: 'Συμπληρώστε έναν έγκυρο αριθμό κινητού τηλεφώνου.',
|
|
18
|
-
uuid4: 'Ο κωδικός επιβεβαίωσης δεν είναι έγκυρος.'
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
button: {
|
|
22
|
-
start: 'Ξεκινήστε εδώ',
|
|
23
|
-
login: 'Σύνδεση',
|
|
24
|
-
back: 'Πίσω',
|
|
25
|
-
"continue": 'Συνέχεια',
|
|
26
|
-
search_ref: 'Αναζητήστε',
|
|
27
|
-
scan: 'Σαρώστε QR Code',
|
|
28
|
-
save: 'Αποθήκευση',
|
|
29
|
-
logout: 'Εξοδος',
|
|
30
|
-
submit: 'Υποβολή',
|
|
31
|
-
"delete": 'Διαγραφή'
|
|
32
|
-
},
|
|
33
|
-
footer: {
|
|
34
|
-
created_by: 'Υλοποίηση από το',
|
|
35
|
-
grnet: 'ΕΔΥΤΕ',
|
|
36
|
-
mindigital: 'Υπουργείο Ψηφιακής Διακυβέρνησης',
|
|
37
|
-
using: 'με χρήση',
|
|
38
|
-
open_source: 'Ανοιχτού Λογισμικού',
|
|
39
|
-
creative_commons: 'Άδεια χρήσης περιεχομένου'
|
|
40
|
-
},
|
|
41
|
-
notfound: {
|
|
42
|
-
page_not_found: 'Η σελίδα δεν βρέθηκε',
|
|
43
|
-
wrong_key_address: 'Εάν έχετε πληκτρολογήσει τη διεύθυνση της σελίδας, ελέγξτε ότι είναι σωστή.',
|
|
44
|
-
wrong_cp_address: 'Εάν έχετε επικολλήσει τη διεύθυνση της σελίδας, ελέγξτε ότι έχετε αντιγράψει ολόκληρη τη διεύθυνση.',
|
|
45
|
-
service_contact: 'Εάν η διεύθυνση της σελίδας είναι σωστή ή έχετε επιλέξει κάποιον σύνδεσμο ή κουμπί, επικοινωνήστε με τη γραμμή εξυπηρέτησης σε περίπτωση που χρειαστείτε βοήθεια.'
|
|
46
|
-
},
|
|
47
|
-
outdated: {
|
|
48
|
-
mobile: 'Η ιστοσελίδα ενδέχεται να μην λειτουργεί σωστά καθώς ο browser σας είτε δεν υποστηρίζεται είτε είναι μη επικαιροποιημένος. Παρακαλούμε επικαιροποιήστε τον browser σας.',
|
|
49
|
-
web: 'Η ιστοσελίδα ενδέχεται να μην λειτουργεί σωστά καθώς ο browser σας είναι μη επικαιροποιημένος. Για να επικαιροποιήσετε τον browser σας επισκεφθείτε την ιστοσελίδα: '
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
exports["default"] = _default;
|
package/locales/en.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
form: {
|
|
3
|
-
error: {
|
|
4
|
-
required: string;
|
|
5
|
-
number: string;
|
|
6
|
-
positive_number: string;
|
|
7
|
-
string: string;
|
|
8
|
-
email: string;
|
|
9
|
-
afm: string;
|
|
10
|
-
file_size: string;
|
|
11
|
-
mobile_phone: string;
|
|
12
|
-
uuid4: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
button: {
|
|
16
|
-
start: string;
|
|
17
|
-
login: string;
|
|
18
|
-
back: string;
|
|
19
|
-
continue: string;
|
|
20
|
-
search_ref: string;
|
|
21
|
-
scan: string;
|
|
22
|
-
save: string;
|
|
23
|
-
logout: string;
|
|
24
|
-
submit: string;
|
|
25
|
-
delete: string;
|
|
26
|
-
};
|
|
27
|
-
footer: {
|
|
28
|
-
created_by: string;
|
|
29
|
-
grnet: string;
|
|
30
|
-
mindigital: string;
|
|
31
|
-
using: string;
|
|
32
|
-
open_source: string;
|
|
33
|
-
creative_commons: string;
|
|
34
|
-
};
|
|
35
|
-
notfound: {
|
|
36
|
-
page_not_found: string;
|
|
37
|
-
wrong_key_address: string;
|
|
38
|
-
wrong_cp_address: string;
|
|
39
|
-
service_contact: string;
|
|
40
|
-
};
|
|
41
|
-
outdated: {
|
|
42
|
-
mobile: string;
|
|
43
|
-
web: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export default _default;
|
package/locales/en.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _default = {
|
|
8
|
-
form: {
|
|
9
|
-
error: {
|
|
10
|
-
required: 'This field is required.',
|
|
11
|
-
number: 'Please enter a valid number',
|
|
12
|
-
positive_number: 'Please enter a positive number',
|
|
13
|
-
string: 'This field must be a string',
|
|
14
|
-
email: 'Please enter a valid email address (e-mail).',
|
|
15
|
-
afm: 'The VAT number you entered is incorrect.',
|
|
16
|
-
file_size: 'File size is larger than allowed.',
|
|
17
|
-
mobile_phone: 'Fill in a valid mobile phone number.',
|
|
18
|
-
uuid4: 'Confirmation code is invalid.'
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
button: {
|
|
22
|
-
start: 'Start',
|
|
23
|
-
login: 'Login',
|
|
24
|
-
back: 'Back',
|
|
25
|
-
"continue": 'Continue',
|
|
26
|
-
search_ref: 'Search',
|
|
27
|
-
scan: 'Scan QR Code',
|
|
28
|
-
save: 'Save',
|
|
29
|
-
logout: 'Logout',
|
|
30
|
-
submit: 'Sumbit',
|
|
31
|
-
"delete": 'Delete'
|
|
32
|
-
},
|
|
33
|
-
footer: {
|
|
34
|
-
created_by: 'Created by',
|
|
35
|
-
grnet: 'GRNET',
|
|
36
|
-
mindigital: 'Ministry of Digital Governance',
|
|
37
|
-
using: 'using',
|
|
38
|
-
open_source: 'Open Source Software',
|
|
39
|
-
creative_commons: 'Creative Commons'
|
|
40
|
-
},
|
|
41
|
-
notfound: {
|
|
42
|
-
page_not_found: 'Page not found',
|
|
43
|
-
wrong_key_address: 'If you typed the web address, check it is correct.',
|
|
44
|
-
wrong_cp_address: 'If you pasted the web address, check you copied the entire address..',
|
|
45
|
-
service_contact: 'If the web address is correct or you selected a link or button, contact the Service Helpline if you need to speak to someone about your tax credits.'
|
|
46
|
-
},
|
|
47
|
-
outdated: {
|
|
48
|
-
mobile: 'This site may not work properly because your browser is either not supported or outdated. Please update your browser',
|
|
49
|
-
web: 'This site may not work properly because your browser outdated. To update your browser visit: '
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
exports["default"] = _default;
|
package/router/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type RouterInterface = {
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
router?: any;
|
|
5
|
-
};
|
|
6
|
-
export declare const RouterContext: React.Context<RouterInterface>;
|
|
7
|
-
export declare const useRouter: () => RouterInterface;
|
|
8
|
-
export declare const RouterProvider: React.FC<RouterInterface>;
|
|
9
|
-
export default RouterContext;
|
package/router/index.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.useRouter = exports["default"] = exports.RouterProvider = exports.RouterContext = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
|
|
14
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
-
|
|
16
|
-
var RouterContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
17
|
-
exports.RouterContext = RouterContext;
|
|
18
|
-
|
|
19
|
-
var useRouter = function useRouter() {
|
|
20
|
-
return (0, _react.useContext)(RouterContext);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
exports.useRouter = useRouter;
|
|
24
|
-
|
|
25
|
-
var RouterProvider = function RouterProvider(_ref) {
|
|
26
|
-
var router = _ref.router,
|
|
27
|
-
children = _ref.children;
|
|
28
|
-
return /*#__PURE__*/_react["default"].createElement(RouterContext.Provider, {
|
|
29
|
-
value: {
|
|
30
|
-
router: router
|
|
31
|
-
}
|
|
32
|
-
}, children);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
exports.RouterProvider = RouterProvider;
|
|
36
|
-
var _default = RouterContext;
|
|
37
|
-
exports["default"] = _default;
|
package/router/index.mdx
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: RouterProvider
|
|
3
|
-
parent: docs/ui/components
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
The `@digigov/ui` SDK uses [Nextjs](https://nextjs.org) and its routing solution under the hood. RouterProvider allows app developers to inject the router instance of the app without having to resort to hacky solutions.
|
|
7
|
-
|
|
8
|
-
## How to use
|
|
9
|
-
|
|
10
|
-
First you have to import the React component called `RouterProvider` and the Nextjs router hook.
|
|
11
|
-
|
|
12
|
-
```jsx
|
|
13
|
-
import { RouterProvider } from '@digigov/ui/router';
|
|
14
|
-
import { useRouter } from 'next/router';
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Then you can wrap the whole layout of your app and you're good to go.
|
|
18
|
-
|
|
19
|
-
```jsx
|
|
20
|
-
const Layout = (props) => {
|
|
21
|
-
const { t } = useTranslation();
|
|
22
|
-
const router = useRouter();
|
|
23
|
-
return (
|
|
24
|
-
<RouterProvider router={router}>
|
|
25
|
-
<BasicLayout>
|
|
26
|
-
<Head>
|
|
27
|
-
<title>{t('app.name')}</title>
|
|
28
|
-
</Head>
|
|
29
|
-
<EpathlaTop />
|
|
30
|
-
<Content direction="row">
|
|
31
|
-
<Main>{props.children}</Main>
|
|
32
|
-
</Content>
|
|
33
|
-
<Bottom>
|
|
34
|
-
<GovGRFooter />
|
|
35
|
-
</Bottom>
|
|
36
|
-
</BasicLayout>
|
|
37
|
-
</RouterProvider>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
```
|