@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,48 +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.useListItemIconStyles = exports["default"] = exports.ListItemIcon = void 0;
|
|
9
|
-
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
|
-
|
|
18
|
-
var _styles = require("@material-ui/core/styles");
|
|
19
|
-
|
|
20
|
-
var _Avatar = _interopRequireDefault(require("@material-ui/core/Avatar"));
|
|
21
|
-
|
|
22
|
-
var _excluded = ["className", "children", "style"];
|
|
23
|
-
var useListItemIconStyles = (0, _styles.makeStyles)(function () {
|
|
24
|
-
return {
|
|
25
|
-
root: {}
|
|
26
|
-
};
|
|
27
|
-
}, {
|
|
28
|
-
name: 'MuiListItemIcon'
|
|
29
|
-
});
|
|
30
|
-
exports.useListItemIconStyles = useListItemIconStyles;
|
|
31
|
-
|
|
32
|
-
var ListItemIcon = function ListItemIcon(_ref) {
|
|
33
|
-
var className = _ref.className,
|
|
34
|
-
children = _ref.children,
|
|
35
|
-
style = _ref.style,
|
|
36
|
-
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
37
|
-
var classes = useListItemIconStyles();
|
|
38
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
39
|
-
style: style,
|
|
40
|
-
className: (0, _clsx["default"])(className, classes.root)
|
|
41
|
-
}, /*#__PURE__*/_react["default"].createElement(_Avatar["default"], (0, _extends2["default"])({
|
|
42
|
-
variant: "rounded"
|
|
43
|
-
}, props), children));
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
exports.ListItemIcon = ListItemIcon;
|
|
47
|
-
var _default = ListItemIcon;
|
|
48
|
-
exports["default"] = _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NormalTextProps } from '@digigov/ui/typography/NormalText';
|
|
3
|
-
export declare const useListItemTextStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"root">;
|
|
4
|
-
export interface ListItemTextProps extends NormalTextProps {
|
|
5
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
6
|
-
}
|
|
7
|
-
export declare const ListItemText: React.FC<ListItemTextProps>;
|
|
8
|
-
export default ListItemText;
|
|
@@ -1,36 +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.useListItemTextStyles = exports["default"] = exports.ListItemText = void 0;
|
|
9
|
-
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _styles = require("@material-ui/core/styles");
|
|
15
|
-
|
|
16
|
-
var _NormalText = _interopRequireDefault(require("@digigov/ui/typography/NormalText"));
|
|
17
|
-
|
|
18
|
-
var _excluded = ["children"];
|
|
19
|
-
var useListItemTextStyles = (0, _styles.makeStyles)(function () {
|
|
20
|
-
return {
|
|
21
|
-
root: {}
|
|
22
|
-
};
|
|
23
|
-
}, {
|
|
24
|
-
name: 'MuiListItemText'
|
|
25
|
-
});
|
|
26
|
-
exports.useListItemTextStyles = useListItemTextStyles;
|
|
27
|
-
|
|
28
|
-
var ListItemText = function ListItemText(_ref) {
|
|
29
|
-
var children = _ref.children,
|
|
30
|
-
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
31
|
-
return /*#__PURE__*/_react["default"].createElement(_NormalText["default"], props, children);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
exports.ListItemText = ListItemText;
|
|
35
|
-
var _default = ListItemText;
|
|
36
|
-
exports["default"] = _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TitleProps } from '@digigov/ui/typography/Title';
|
|
3
|
-
import { LinkProps } from '@digigov/ui/core/Link';
|
|
4
|
-
export declare const useListItemTitleStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"root">;
|
|
5
|
-
export interface ListItemTitleProps extends TitleProps {
|
|
6
|
-
href?: string;
|
|
7
|
-
linkProps?: Omit<LinkProps, 'href'>;
|
|
8
|
-
}
|
|
9
|
-
export declare const ListItemTitle: React.FC<ListItemTitleProps>;
|
|
10
|
-
export default ListItemTitle;
|
|
@@ -1,44 +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.useListItemTitleStyles = exports["default"] = exports.ListItemTitle = void 0;
|
|
9
|
-
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
|
-
var _styles = require("@material-ui/core/styles");
|
|
17
|
-
|
|
18
|
-
var _Title = _interopRequireDefault(require("@digigov/ui/typography/Title"));
|
|
19
|
-
|
|
20
|
-
var _Link = _interopRequireDefault(require("@digigov/ui/core/Link"));
|
|
21
|
-
|
|
22
|
-
var _excluded = ["href", "linkProps", "children"];
|
|
23
|
-
var useListItemTitleStyles = (0, _styles.makeStyles)(function () {
|
|
24
|
-
return {
|
|
25
|
-
root: {}
|
|
26
|
-
};
|
|
27
|
-
}, {
|
|
28
|
-
name: 'MuiListItemTitle'
|
|
29
|
-
});
|
|
30
|
-
exports.useListItemTitleStyles = useListItemTitleStyles;
|
|
31
|
-
|
|
32
|
-
var ListItemTitle = function ListItemTitle(_ref) {
|
|
33
|
-
var href = _ref.href,
|
|
34
|
-
linkProps = _ref.linkProps,
|
|
35
|
-
children = _ref.children,
|
|
36
|
-
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
37
|
-
return /*#__PURE__*/_react["default"].createElement(_Title["default"], props, href ? /*#__PURE__*/_react["default"].createElement(_Link["default"], (0, _extends2["default"])({
|
|
38
|
-
href: href
|
|
39
|
-
}, linkProps), children) : children);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
exports.ListItemTitle = ListItemTitle;
|
|
43
|
-
var _default = ListItemTitle;
|
|
44
|
-
exports["default"] = _default;
|
package/core/List/index.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {};
|
|
7
|
-
Object.defineProperty(exports, "default", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function get() {
|
|
10
|
-
return _List.List;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
var _List = require("@digigov/ui/core/List/List");
|
|
15
|
-
|
|
16
|
-
Object.keys(_List).forEach(function (key) {
|
|
17
|
-
if (key === "default" || key === "__esModule") return;
|
|
18
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
|
-
if (key in exports && exports[key] === _List[key]) return;
|
|
20
|
-
Object.defineProperty(exports, key, {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function get() {
|
|
23
|
-
return _List[key];
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
var _ListItem = require("@digigov/ui/core/List/ListItem");
|
|
29
|
-
|
|
30
|
-
Object.keys(_ListItem).forEach(function (key) {
|
|
31
|
-
if (key === "default" || key === "__esModule") return;
|
|
32
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
33
|
-
if (key in exports && exports[key] === _ListItem[key]) return;
|
|
34
|
-
Object.defineProperty(exports, key, {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function get() {
|
|
37
|
-
return _ListItem[key];
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
var _ListItemContent = require("@digigov/ui/core/List/ListItemContent");
|
|
43
|
-
|
|
44
|
-
Object.keys(_ListItemContent).forEach(function (key) {
|
|
45
|
-
if (key === "default" || key === "__esModule") return;
|
|
46
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
47
|
-
if (key in exports && exports[key] === _ListItemContent[key]) return;
|
|
48
|
-
Object.defineProperty(exports, key, {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function get() {
|
|
51
|
-
return _ListItemContent[key];
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
var _ListItemTitle = require("@digigov/ui/core/List/ListItemTitle");
|
|
57
|
-
|
|
58
|
-
Object.keys(_ListItemTitle).forEach(function (key) {
|
|
59
|
-
if (key === "default" || key === "__esModule") return;
|
|
60
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
61
|
-
if (key in exports && exports[key] === _ListItemTitle[key]) return;
|
|
62
|
-
Object.defineProperty(exports, key, {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
get: function get() {
|
|
65
|
-
return _ListItemTitle[key];
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
var _ListItemText = require("@digigov/ui/core/List/ListItemText");
|
|
71
|
-
|
|
72
|
-
Object.keys(_ListItemText).forEach(function (key) {
|
|
73
|
-
if (key === "default" || key === "__esModule") return;
|
|
74
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
75
|
-
if (key in exports && exports[key] === _ListItemText[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function get() {
|
|
79
|
-
return _ListItemText[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
var _ListItemIcon = require("@digigov/ui/core/List/ListItemIcon");
|
|
85
|
-
|
|
86
|
-
Object.keys(_ListItemIcon).forEach(function (key) {
|
|
87
|
-
if (key === "default" || key === "__esModule") return;
|
|
88
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
89
|
-
if (key in exports && exports[key] === _ListItemIcon[key]) return;
|
|
90
|
-
Object.defineProperty(exports, key, {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function get() {
|
|
93
|
-
return _ListItemIcon[key];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/core/List/index.spec.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
|
|
9
|
-
var _mountWithTheme = _interopRequireDefault(require("@digigov/ui/test-utils/mountWithTheme"));
|
|
10
|
-
|
|
11
|
-
var _List = _interopRequireDefault(require("@digigov/ui/core/List"));
|
|
12
|
-
|
|
13
|
-
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); }
|
|
14
|
-
|
|
15
|
-
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; }
|
|
16
|
-
|
|
17
|
-
var _ref = /*#__PURE__*/React.createElement(_List["default"], null, "this is some random warning text");
|
|
18
|
-
|
|
19
|
-
it('renders the ErrorSummary with sample data', function () {
|
|
20
|
-
expect((0, _mountWithTheme["default"])(_ref)).toMatchSnapshot();
|
|
21
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NavLinkInterface } from '@digigov/ui/core/NavList/NavListContext';
|
|
3
|
-
import { BaseCSSProperties } from '@material-ui/core/styles/withStyles';
|
|
4
|
-
export declare const useNavListStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"vertical" | "root" | "subMenu" | "floating" | "floatClear">;
|
|
5
|
-
export interface NavListProps {
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
horizontal?: boolean;
|
|
9
|
-
openSubMenus?: boolean;
|
|
10
|
-
floating?: boolean;
|
|
11
|
-
subMenu?: boolean;
|
|
12
|
-
links?: NavLinkInterface[];
|
|
13
|
-
style?: BaseCSSProperties;
|
|
14
|
-
}
|
|
15
|
-
export declare const NavListBase: React.FC<NavListProps>;
|
|
16
|
-
export declare const NavList: React.FC<NavListProps>;
|
|
17
|
-
export default NavList;
|
package/core/NavList/NavList.js
DELETED
|
@@ -1,99 +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.useNavListStyles = exports["default"] = exports.NavListBase = exports.NavList = void 0;
|
|
9
|
-
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
|
-
|
|
18
|
-
var _styles = require("@material-ui/core/styles");
|
|
19
|
-
|
|
20
|
-
var _NavListContext = require("@digigov/ui/core/NavList/NavListContext");
|
|
21
|
-
|
|
22
|
-
var _excluded = ["className", "children", "floating", "horizontal", "subMenu"],
|
|
23
|
-
_excluded2 = ["horizontal", "openSubMenus", "links"];
|
|
24
|
-
var useNavListStyles = (0, _styles.makeStyles)(function (theme) {
|
|
25
|
-
return {
|
|
26
|
-
root: {
|
|
27
|
-
padding: theme.spacing(0),
|
|
28
|
-
margin: theme.spacing(0),
|
|
29
|
-
display: 'flex',
|
|
30
|
-
'&$vertical': {
|
|
31
|
-
flexDirection: 'column'
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
subMenu: {
|
|
35
|
-
marginLeft: theme.spacing(3)
|
|
36
|
-
},
|
|
37
|
-
floating: {
|
|
38
|
-
left: 0,
|
|
39
|
-
zIndex: 99,
|
|
40
|
-
position: 'absolute',
|
|
41
|
-
background: theme.palette.grey['100'],
|
|
42
|
-
borderTop: "1px solid ".concat(theme.palette.grey['500']),
|
|
43
|
-
borderRight: "1px solid ".concat(theme.palette.grey['500']),
|
|
44
|
-
borderLeft: "1px solid ".concat(theme.palette.grey['500']),
|
|
45
|
-
margin: theme.spacing(1.5, 0, 0, 0),
|
|
46
|
-
boxShadow: theme.shadows[3],
|
|
47
|
-
'& > li': {
|
|
48
|
-
width: '100%',
|
|
49
|
-
borderBottom: "1px solid ".concat(theme.palette.grey['500']),
|
|
50
|
-
margin: 0
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
vertical: {},
|
|
54
|
-
floatClear: {
|
|
55
|
-
clear: 'both'
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}, {
|
|
59
|
-
name: 'MuiNavList'
|
|
60
|
-
});
|
|
61
|
-
exports.useNavListStyles = useNavListStyles;
|
|
62
|
-
|
|
63
|
-
var NavListBase = function NavListBase(_ref) {
|
|
64
|
-
var className = _ref.className,
|
|
65
|
-
children = _ref.children,
|
|
66
|
-
floating = _ref.floating,
|
|
67
|
-
horizontal = _ref.horizontal,
|
|
68
|
-
subMenu = _ref.subMenu,
|
|
69
|
-
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
70
|
-
var classes = useNavListStyles();
|
|
71
|
-
return /*#__PURE__*/_react["default"].createElement("nav", null, /*#__PURE__*/_react["default"].createElement("ul", {
|
|
72
|
-
style: props.style,
|
|
73
|
-
className: (0, _clsx["default"])(className, classes.root, !horizontal && classes.vertical, floating && classes.floating, subMenu && classes.subMenu)
|
|
74
|
-
}, children), /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
|
-
className: classes.floatClear
|
|
76
|
-
}));
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
exports.NavListBase = NavListBase;
|
|
80
|
-
|
|
81
|
-
var NavList = function NavList(_ref2) {
|
|
82
|
-
var horizontal = _ref2.horizontal,
|
|
83
|
-
_ref2$openSubMenus = _ref2.openSubMenus,
|
|
84
|
-
openSubMenus = _ref2$openSubMenus === void 0 ? false : _ref2$openSubMenus,
|
|
85
|
-
_ref2$links = _ref2.links,
|
|
86
|
-
links = _ref2$links === void 0 ? [] : _ref2$links,
|
|
87
|
-
props = (0, _objectWithoutProperties2["default"])(_ref2, _excluded2);
|
|
88
|
-
return /*#__PURE__*/_react["default"].createElement(_NavListContext.NavListProvider, {
|
|
89
|
-
openSubMenus: openSubMenus,
|
|
90
|
-
horizontal: horizontal,
|
|
91
|
-
links: links
|
|
92
|
-
}, /*#__PURE__*/_react["default"].createElement(NavListBase, (0, _extends2["default"])({
|
|
93
|
-
horizontal: horizontal
|
|
94
|
-
}, props)));
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
exports.NavList = NavList;
|
|
98
|
-
var _default = NavList;
|
|
99
|
-
exports["default"] = _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface NavLinkInterface {
|
|
3
|
-
name?: string;
|
|
4
|
-
label?: string;
|
|
5
|
-
href?: string;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
subMenu?: NavLinkInterface[];
|
|
8
|
-
}
|
|
9
|
-
export interface NavListContextInterface {
|
|
10
|
-
openSubMenus?: boolean;
|
|
11
|
-
horizontal?: boolean;
|
|
12
|
-
showDividers?: boolean;
|
|
13
|
-
links: NavLinkInterface[];
|
|
14
|
-
activeLink?: NavLinkInterface;
|
|
15
|
-
activeSubMenu?: NavLinkInterface[];
|
|
16
|
-
onSubMenuActive?: (name: string) => void;
|
|
17
|
-
}
|
|
18
|
-
export declare const NavListContext: React.Context<NavListContextInterface>;
|
|
19
|
-
export declare const NavListProvider: React.FC<NavListContextInterface>;
|
|
20
|
-
export default NavListContext;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports["default"] = exports.NavListProvider = exports.NavListContext = void 0;
|
|
11
|
-
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
20
|
-
var NavListContext = /*#__PURE__*/(0, _react.createContext)({
|
|
21
|
-
horizontal: false,
|
|
22
|
-
openSubMenus: false,
|
|
23
|
-
links: [],
|
|
24
|
-
activeLink: {},
|
|
25
|
-
activeSubMenu: []
|
|
26
|
-
});
|
|
27
|
-
exports.NavListContext = NavListContext;
|
|
28
|
-
var TRAILING_SLASH = /\/$/gm;
|
|
29
|
-
|
|
30
|
-
var NavListProvider = function NavListProvider(_ref) {
|
|
31
|
-
var children = _ref.children,
|
|
32
|
-
_ref$openSubMenus = _ref.openSubMenus,
|
|
33
|
-
openSubMenus = _ref$openSubMenus === void 0 ? false : _ref$openSubMenus,
|
|
34
|
-
_ref$horizontal = _ref.horizontal,
|
|
35
|
-
horizontal = _ref$horizontal === void 0 ? false : _ref$horizontal,
|
|
36
|
-
_ref$showDividers = _ref.showDividers,
|
|
37
|
-
showDividers = _ref$showDividers === void 0 ? false : _ref$showDividers,
|
|
38
|
-
_ref$links = _ref.links,
|
|
39
|
-
links = _ref$links === void 0 ? [] : _ref$links;
|
|
40
|
-
|
|
41
|
-
var _useState = (0, _react.useState)([]),
|
|
42
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
43
|
-
activeSubMenu = _useState2[0],
|
|
44
|
-
setActiveSubMenu = _useState2[1];
|
|
45
|
-
|
|
46
|
-
var _useState3 = (0, _react.useState)({}),
|
|
47
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
48
|
-
activeLink = _useState4[0],
|
|
49
|
-
setActiveLink = _useState4[1];
|
|
50
|
-
|
|
51
|
-
(0, _react.useEffect)(function () {
|
|
52
|
-
var currentActiveLink = links.find(function (link) {
|
|
53
|
-
var _link$subMenu;
|
|
54
|
-
|
|
55
|
-
if ((_link$subMenu = link.subMenu) !== null && _link$subMenu !== void 0 && _link$subMenu.length) {
|
|
56
|
-
return !!~link.subMenu.findIndex(function (subMenuLink) {
|
|
57
|
-
var _window, _subMenuLink$href;
|
|
58
|
-
|
|
59
|
-
return ((_window = window) === null || _window === void 0 ? void 0 : _window.location.pathname.replace(TRAILING_SLASH, '')) === ((_subMenuLink$href = subMenuLink.href) === null || _subMenuLink$href === void 0 ? void 0 : _subMenuLink$href.replace(TRAILING_SLASH, ''));
|
|
60
|
-
});
|
|
61
|
-
} else {
|
|
62
|
-
var _window2, _link$href;
|
|
63
|
-
|
|
64
|
-
return ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.location.pathname.replace(TRAILING_SLASH, '')) === ((_link$href = link.href) === null || _link$href === void 0 ? void 0 : _link$href.replace(TRAILING_SLASH, '')) || false;
|
|
65
|
-
}
|
|
66
|
-
}) || {
|
|
67
|
-
label: '',
|
|
68
|
-
href: ''
|
|
69
|
-
};
|
|
70
|
-
setActiveLink(currentActiveLink);
|
|
71
|
-
}, [links]);
|
|
72
|
-
|
|
73
|
-
var onSubMenuActive = function onSubMenuActive(href) {
|
|
74
|
-
if (href === null) {
|
|
75
|
-
setActiveSubMenu([]);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
var link = links.find(function (link) {
|
|
79
|
-
return link.href === href && link.subMenu && link.subMenu.length;
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
if (link && link.subMenu) {
|
|
83
|
-
setActiveSubMenu(link.subMenu);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
return /*#__PURE__*/_react["default"].createElement(NavListContext.Provider, {
|
|
88
|
-
value: {
|
|
89
|
-
openSubMenus: openSubMenus,
|
|
90
|
-
horizontal: horizontal,
|
|
91
|
-
showDividers: showDividers,
|
|
92
|
-
links: links,
|
|
93
|
-
activeLink: activeLink,
|
|
94
|
-
activeSubMenu: activeSubMenu,
|
|
95
|
-
onSubMenuActive: onSubMenuActive
|
|
96
|
-
}
|
|
97
|
-
}, children);
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
exports.NavListProvider = NavListProvider;
|
|
101
|
-
var _default = NavListContext;
|
|
102
|
-
exports["default"] = _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface NavListItemProps {
|
|
3
|
-
name?: string;
|
|
4
|
-
label?: string;
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
href?: string;
|
|
8
|
-
selected?: boolean;
|
|
9
|
-
expandOn?: 'hover' | 'click';
|
|
10
|
-
}
|
|
11
|
-
export declare const useNavListItemStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"link" | "root" | "selected">;
|
|
12
|
-
export declare const NavListItem: React.FC<NavListItemProps>;
|
|
13
|
-
export default NavListItem;
|