@digigov/ui 0.12.2 → 0.14.0
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/CHANGELOG.md +26 -1
- package/{src/core/ServiceBadge/ServiceBadge.mdx → LICENSE} +0 -0
- package/api/APIErrors.d.ts +22 -0
- package/api/APIErrors.js +117 -0
- package/api/APIProvider.d.ts +15 -0
- package/api/APIProvider.js +43 -0
- package/api/fetchAPI.d.ts +18 -0
- package/api/fetchAPI.js +64 -0
- package/api/index.d.ts +9 -0
- package/api/index.js +104 -0
- package/api/index.spec.d.ts +1 -0
- package/api/index.spec.js +584 -0
- package/{src/api → api}/introduction.md +0 -0
- package/api/useResource.d.ts +11 -0
- package/api/useResource.js +144 -0
- package/api/useResourceAction.d.ts +2 -0
- package/api/useResourceAction.js +157 -0
- package/api/useResourceQuery.d.ts +18 -0
- package/api/useResourceQuery.js +229 -0
- package/api/utils.d.ts +6 -0
- package/api/utils.js +250 -0
- package/app/App.d.ts +14 -0
- package/app/App.js +49 -0
- package/{src/app/Confirmation/index.tsx → app/Confirmation/index.d.ts} +0 -0
- package/app/Confirmation/index.js +44 -0
- package/{src/app/Footer/index.tsx → app/Footer/index.d.ts} +0 -0
- package/app/Footer/index.js +200 -0
- package/app/Header/HeaderContent.d.ts +3 -0
- package/app/Header/HeaderContent.js +19 -0
- package/app/Header/HeaderLogo.d.ts +3 -0
- package/app/Header/HeaderLogo.js +30 -0
- package/app/Header/HeaderSection.d.ts +5 -0
- package/app/Header/HeaderSection.js +20 -0
- package/app/Header/HeaderTitle.d.ts +5 -0
- package/app/Header/HeaderTitle.js +30 -0
- package/{src/app → app}/Header/__snapshots__/index.spec.tsx.snap +0 -0
- package/app/Header/index.d.ts +11 -0
- package/app/Header/index.js +106 -0
- package/{src/app → app}/Header/index.mdx +0 -0
- package/app/Header/index.spec.d.ts +1 -0
- package/app/Header/index.spec.js +45 -0
- package/app/NotFound/index.d.ts +3 -0
- package/app/NotFound/index.js +29 -0
- package/app/OutdatedBrowserBanner.d.ts +2 -0
- package/app/OutdatedBrowserBanner.js +41 -0
- package/app/PageTitle.d.ts +10 -0
- package/app/PageTitle.js +76 -0
- package/{src/app → app}/QrCodeScanner/__snapshots__/index.spec.tsx.snap +0 -0
- package/app/QrCodeScanner/index.d.ts +29 -0
- package/app/QrCodeScanner/index.js +85 -0
- package/{src/app → app}/QrCodeScanner/index.mdx +0 -0
- package/app/QrCodeScanner/index.spec.d.ts +1 -0
- package/app/QrCodeScanner/index.spec.js +26 -0
- package/app/i18n.d.ts +10 -0
- package/app/i18n.js +63 -0
- package/{src/app/index.ts → app/index.d.ts} +0 -0
- package/app/index.js +70 -0
- package/{src/core → core}/Accordion/__snapshots__/index.spec.tsx.snap +0 -0
- package/core/Accordion/index.d.ts +18 -0
- package/core/Accordion/index.js +102 -0
- package/{src/core → core}/Accordion/index.mdx +0 -0
- package/core/Accordion/index.spec.d.ts +1 -0
- package/core/Accordion/index.spec.js +19 -0
- package/{src/core → core}/Blockquote/__snapshots__/index.spec.tsx.snap +0 -0
- package/core/Blockquote/index.d.ts +3 -0
- package/core/Blockquote/index.js +29 -0
- package/{src/core → core}/Blockquote/index.mdx +0 -0
- package/core/Blockquote/index.spec.d.ts +1 -0
- package/core/Blockquote/index.spec.js +21 -0
- package/{src/core/Breadcrumbs/index.tsx → core/Breadcrumbs/index.d.ts} +0 -0
- package/core/Breadcrumbs/index.js +44 -0
- package/core/Button/BackButton.d.ts +3 -0
- package/core/Button/BackButton.js +34 -0
- package/core/Button/ButtonLink.d.ts +4 -0
- package/core/Button/ButtonLink.js +28 -0
- package/core/Button/CallToAction.d.ts +7 -0
- package/core/Button/CallToAction.js +41 -0
- package/core/Button/Icon.d.ts +2 -0
- package/core/Button/Icon.js +19 -0
- package/{src/core → core}/Button/__snapshots__/index.spec.tsx.snap +0 -0
- package/core/Button/index.d.ts +15 -0
- package/core/Button/index.js +122 -0
- package/{src/core → core}/Button/index.mdx +0 -0
- package/core/Button/index.spec.d.ts +1 -0
- package/core/Button/index.spec.js +21 -0
- package/{src/core/Card/index.tsx → core/Card/index.d.ts} +0 -0
- package/core/Card/index.js +57 -0
- package/{src/core → core}/Details/__snapshots__/index.spec.tsx.snap +0 -0
- package/{src/core/Details/index.tsx → core/Details/index.d.ts} +0 -2
- package/core/Details/index.js +35 -0
- package/{src/core → core}/Details/index.mdx +0 -0
- package/core/Details/index.spec.d.ts +1 -0
- package/core/Details/index.spec.js +27 -0
- package/core/Divider/index.d.ts +5 -0
- package/core/Divider/index.js +20 -0
- package/{src/core → core}/ErrorSummary/__snapshots__/index.spec.tsx.snap +0 -0
- package/{src/core/ErrorSummary/index.tsx → core/ErrorSummary/index.d.ts} +0 -1
- package/core/ErrorSummary/index.js +19 -0
- package/{src/core → core}/ErrorSummary/index.mdx +0 -0
- package/core/ErrorSummary/index.spec.d.ts +1 -0
- package/core/ErrorSummary/index.spec.js +21 -0
- package/{src/core/Hidden/index.tsx → core/Hidden/index.d.ts} +0 -0
- package/core/Hidden/index.js +18 -0
- package/{src/core → core}/Link/__snapshots__/index.spec.tsx.snap +0 -0
- package/core/Link/index.d.ts +12 -0
- package/core/Link/index.js +52 -0
- package/core/Link/index.spec.d.ts +1 -0
- package/core/Link/index.spec.js +31 -0
- package/{src/core/List/List.tsx → core/List/List.d.ts} +0 -2
- package/core/List/List.js +19 -0
- package/{src/core/List/ListItem.tsx → core/List/ListItem.d.ts} +0 -2
- package/core/List/ListItem.js +19 -0
- package/core/List/ListItemContent.d.ts +7 -0
- package/core/List/ListItemContent.js +45 -0
- package/core/List/ListItemIcon.d.ts +7 -0
- package/core/List/ListItemIcon.js +48 -0
- package/core/List/ListItemText.d.ts +8 -0
- package/core/List/ListItemText.js +36 -0
- package/core/List/ListItemTitle.d.ts +10 -0
- package/core/List/ListItemTitle.js +44 -0
- package/{src/core → core}/List/__snapshots__/index.spec.tsx.snap +0 -0
- package/{src/core/List/index.tsx → core/List/index.d.ts} +0 -0
- package/core/List/index.js +96 -0
- package/{src/core → core}/List/index.mdx +0 -0
- package/core/List/index.spec.d.ts +1 -0
- package/core/List/index.spec.js +21 -0
- package/core/NavList/NavList.d.ts +17 -0
- package/core/NavList/NavList.js +99 -0
- package/core/NavList/NavListContext.d.ts +20 -0
- package/core/NavList/NavListContext.js +102 -0
- package/core/NavList/NavListItem.d.ts +13 -0
- package/core/NavList/NavListItem.js +171 -0
- package/core/NavList/NavListItemBase.d.ts +16 -0
- package/core/NavList/NavListItemBase.js +161 -0
- package/core/NavList/NavListSubMenu.d.ts +8 -0
- package/core/NavList/NavListSubMenu.js +52 -0
- package/{src/core → core}/NavList/__snapshots__/index.spec.tsx.snap +0 -0
- package/{src/core/NavList/index.tsx → core/NavList/index.d.ts} +0 -0
- package/core/NavList/index.js +68 -0
- package/{src/core → core}/NavList/index.mdx +0 -0
- package/core/NavList/index.spec.d.ts +1 -0
- package/core/NavList/index.spec.js +21 -0
- package/{src/core → core}/NotificationBanner/__snapshots__/index.spec.tsx.snap +0 -0
- package/core/NotificationBanner/index.d.ts +18 -0
- package/core/NotificationBanner/index.js +78 -0
- package/{src/core → core}/NotificationBanner/index.mdx +0 -0
- package/core/NotificationBanner/index.spec.d.ts +1 -0
- package/core/NotificationBanner/index.spec.js +32 -0
- package/core/PaginationLabel/index.d.ts +21 -0
- package/core/PaginationLabel/index.js +34 -0
- package/core/ServiceBadge/ServiceBadge.mdx +0 -0
- package/core/ServiceBadge/index.d.ts +9 -0
- package/core/ServiceBadge/index.js +36 -0
- package/{src/core → core}/ServiceBadge/index.mdx +0 -0
- package/{src/core → core}/SummaryList/__snapshots__/index.spec.tsx.snap +0 -0
- package/{src/core/SummaryList/index.tsx → core/SummaryList/index.d.ts} +0 -2
- package/core/SummaryList/index.js +79 -0
- package/{src/core → core}/SummaryList/index.mdx +0 -0
- package/core/SummaryList/index.spec.d.ts +1 -0
- package/core/SummaryList/index.spec.js +19 -0
- package/{src/core/Table/index.tsx → core/Table/index.d.ts} +0 -0
- package/core/Table/index.js +96 -0
- package/core/Tabs/index.d.ts +16 -0
- package/core/Tabs/index.js +88 -0
- package/{src/core → core}/Tabs/index.mdx +0 -0
- package/{src/core/VisuallyHidden/index.tsx → core/VisuallyHidden/index.d.ts} +0 -0
- package/core/VisuallyHidden/index.js +18 -0
- package/{src/core → core}/WarningText/__snapshots__/index.spec.tsx.snap +0 -0
- package/{src/core/WarningText/index.tsx → core/WarningText/index.d.ts} +0 -1
- package/core/WarningText/index.js +19 -0
- package/{src/core → core}/WarningText/index.mdx +0 -0
- package/core/WarningText/index.spec.d.ts +1 -0
- package/core/WarningText/index.spec.js +21 -0
- package/core/index.d.ts +18 -0
- package/core/index.js +241 -0
- package/custom.d.js +1 -0
- package/es/api/APIErrors.js +96 -0
- package/es/api/APIProvider.js +25 -0
- package/es/api/fetchAPI.js +49 -0
- package/{src/api/index.tsx → es/api/index.js} +3 -6
- package/es/api/index.spec.js +546 -0
- package/es/api/introduction.md +6 -0
- package/es/api/useResource.js +128 -0
- package/es/api/useResourceAction.js +141 -0
- package/es/api/useResourceQuery.js +208 -0
- package/es/api/utils.js +233 -0
- package/es/app/App.js +27 -0
- package/es/app/Confirmation/index.js +3 -0
- package/es/app/Footer/index.js +15 -0
- package/es/app/Header/HeaderContent.js +3 -0
- package/{src/app/Header/HeaderLogo.tsx → es/app/Header/HeaderLogo.js} +7 -9
- package/es/app/Header/HeaderSection.js +7 -0
- package/es/app/Header/HeaderTitle.js +17 -0
- package/es/app/Header/__snapshots__/index.spec.tsx.snap +393 -0
- package/{src/app/Header/index.tsx → es/app/Header/index.js} +4 -10
- package/es/app/Header/index.mdx +50 -0
- package/es/app/Header/index.spec.js +32 -0
- package/es/app/NotFound/index.js +12 -0
- package/es/app/OutdatedBrowserBanner.js +24 -0
- package/es/app/PageTitle.js +57 -0
- package/es/app/QrCodeScanner/__snapshots__/index.spec.tsx.snap +22 -0
- package/es/app/QrCodeScanner/index.js +64 -0
- package/es/app/QrCodeScanner/index.mdx +22 -0
- package/es/app/QrCodeScanner/index.spec.js +13 -0
- package/es/app/i18n.js +42 -0
- package/es/app/index.js +5 -0
- package/es/core/Accordion/__snapshots__/index.spec.tsx.snap +78 -0
- package/es/core/Accordion/index.js +50 -0
- package/es/core/Accordion/index.mdx +104 -0
- package/es/core/Accordion/index.spec.js +9 -0
- package/es/core/Blockquote/__snapshots__/index.spec.tsx.snap +13 -0
- package/{src/core/Blockquote/index.tsx → es/core/Blockquote/index.js} +7 -9
- package/es/core/Blockquote/index.mdx +61 -0
- package/es/core/Blockquote/index.spec.js +9 -0
- package/es/core/Breadcrumbs/index.js +3 -0
- package/{src/core/Button/BackButton.tsx → es/core/Button/BackButton.js} +8 -10
- package/es/core/Button/ButtonLink.js +16 -0
- package/es/core/Button/CallToAction.js +27 -0
- package/es/core/Button/Icon.js +7 -0
- package/es/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
- package/es/core/Button/index.js +37 -0
- package/es/core/Button/index.mdx +65 -0
- package/es/core/Button/index.spec.js +9 -0
- package/es/core/Card/index.js +4 -0
- package/es/core/Details/__snapshots__/index.spec.tsx.snap +50 -0
- package/es/core/Details/index.js +5 -0
- package/es/core/Details/index.mdx +34 -0
- package/es/core/Details/index.spec.js +17 -0
- package/es/core/Divider/index.js +7 -0
- package/es/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +322 -0
- package/es/core/ErrorSummary/index.js +3 -0
- package/es/core/ErrorSummary/index.mdx +61 -0
- package/es/core/ErrorSummary/index.spec.js +9 -0
- package/es/core/Hidden/index.js +1 -0
- package/es/core/Link/__snapshots__/index.spec.tsx.snap +31 -0
- package/es/core/Link/index.js +27 -0
- package/es/core/Link/index.spec.js +21 -0
- package/es/core/List/List.js +3 -0
- package/es/core/List/ListItem.js +3 -0
- package/es/core/List/ListItemContent.js +27 -0
- package/es/core/List/ListItemIcon.js +29 -0
- package/es/core/List/ListItemText.js +19 -0
- package/es/core/List/ListItemTitle.js +25 -0
- package/es/core/List/__snapshots__/index.spec.tsx.snap +322 -0
- package/es/core/List/index.js +7 -0
- package/es/core/List/index.mdx +40 -0
- package/es/core/List/index.spec.js +9 -0
- package/es/core/NavList/NavList.js +78 -0
- package/es/core/NavList/NavListContext.js +80 -0
- package/es/core/NavList/NavListItem.js +141 -0
- package/es/core/NavList/NavListItemBase.js +133 -0
- package/es/core/NavList/NavListSubMenu.js +27 -0
- package/es/core/NavList/__snapshots__/index.spec.tsx.snap +334 -0
- package/es/core/NavList/index.js +5 -0
- package/es/core/NavList/index.mdx +185 -0
- package/es/core/NavList/index.spec.js +9 -0
- package/es/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +737 -0
- package/es/core/NotificationBanner/index.js +35 -0
- package/es/core/NotificationBanner/index.mdx +77 -0
- package/es/core/NotificationBanner/index.spec.js +20 -0
- package/es/core/PaginationLabel/index.js +20 -0
- package/es/core/ServiceBadge/ServiceBadge.mdx +0 -0
- package/es/core/ServiceBadge/index.js +20 -0
- package/es/core/ServiceBadge/index.mdx +42 -0
- package/es/core/SummaryList/__snapshots__/index.spec.tsx.snap +57 -0
- package/es/core/SummaryList/index.js +7 -0
- package/es/core/SummaryList/index.mdx +82 -0
- package/es/core/SummaryList/index.spec.js +9 -0
- package/es/core/Table/index.js +7 -0
- package/es/core/Tabs/index.js +37 -0
- package/es/core/Tabs/index.mdx +54 -0
- package/es/core/VisuallyHidden/index.js +1 -0
- package/es/core/WarningText/__snapshots__/index.spec.tsx.snap +336 -0
- package/es/core/WarningText/index.js +3 -0
- package/es/core/WarningText/index.mdx +46 -0
- package/es/core/WarningText/index.spec.js +9 -0
- package/{src/core/index.ts → es/core/index.js} +1 -0
- package/es/custom.d.js +0 -0
- package/{src → es}/form/inputs/Input/index.mdx +0 -0
- package/es/govgr/Footer/Copyright.js +37 -0
- package/es/govgr/Footer/HellenicRepublicLogo.js +3 -0
- package/es/govgr/Footer/LicenseCCSA.js +18 -0
- package/es/govgr/Footer/index.js +21 -0
- package/{src → es}/govgr/Footer/index.mdx +0 -0
- package/{src/govgr/Footer/logo.ts → es/govgr/Footer/logo.js} +1 -1
- package/{src/govgr/Footer/logos/logo-el.ts → es/govgr/Footer/logos/logo-el.js} +1 -1
- package/{src/govgr/Footer/logos/logo-en.ts → es/govgr/Footer/logos/logo-en.js} +1 -1
- package/{src → es}/govgr/Logo/govgr-logo.svg +0 -0
- package/es/govgr/Logo/index.js +3 -0
- package/{src/govgr/Logo/logo.ts → es/govgr/Logo/logo.js} +1 -1
- package/es/govgr/index.js +4 -0
- package/es/hooks/useDebounce.js +41 -0
- package/es/hooks/useLatest.js +12 -0
- package/{src/hooks/useOutdatedBrowserCheck.ts → es/hooks/useOutdatedBrowserCheck.js} +15 -16
- package/es/hooks/useSearch.js +25 -0
- package/es/hooks/useTogglableSections.js +96 -0
- package/es/index.js +5 -0
- package/es/layouts/Basic/Bottom/index.js +3 -0
- package/{src → es}/layouts/Basic/Bottom/index.mdx +0 -0
- package/es/layouts/Basic/Content/index.js +18 -0
- package/{src → es}/layouts/Basic/Content/index.mdx +0 -0
- package/es/layouts/Basic/Main/index.js +3 -0
- package/{src → es}/layouts/Basic/Main/index.mdx +0 -0
- package/es/layouts/Basic/Masthead/index.js +4 -0
- package/{src → es}/layouts/Basic/Masthead/index.mdx +0 -0
- package/{src/layouts/Basic/Side/index.tsx → es/layouts/Basic/Side/index.js} +3 -5
- package/{src → es}/layouts/Basic/Side/index.mdx +0 -0
- package/{src/layouts/Basic/Top/index.tsx → es/layouts/Basic/Top/index.js} +5 -7
- package/{src → es}/layouts/Basic/Top/index.mdx +0 -0
- package/{src → es}/layouts/Basic/__snapshots__/index.spec.tsx.snap +0 -0
- package/es/layouts/Basic/index.js +8 -0
- package/{src → es}/layouts/Basic/index.mdx +0 -0
- package/es/layouts/Basic/index.spec.js +10 -0
- package/es/layouts/Grid/index.js +1 -0
- package/es/layouts/index.js +2 -0
- package/{src/locales/el.ts → es/locales/el.js} +19 -18
- package/{src/locales/en.ts → es/locales/en.js} +18 -16
- package/es/router/index.js +15 -0
- package/{src → es}/router/index.mdx +0 -0
- package/es/test-utils/delay.js +31 -0
- package/es/test-utils/mountWithTheme.js +30 -0
- package/{src → es}/themes/govgr.js +29 -33
- package/es/themes/grnet.js +110 -0
- package/es/themes/index.js +2 -0
- package/es/typography/Caption.js +7 -0
- package/es/typography/NormalText.js +3 -0
- package/es/typography/Paragraph.js +2 -0
- package/es/typography/Title.js +48 -0
- package/es/typography/index.js +8 -0
- package/{src → es}/typography/index.mdx +0 -0
- package/es/utils/evaluateBrowserVersion.js +201 -0
- package/es/utils/withDeprecation.js +103 -0
- package/esm/api/APIErrors.js +96 -0
- package/esm/api/APIProvider.js +25 -0
- package/esm/api/fetchAPI.js +49 -0
- package/esm/api/index.js +13 -0
- package/esm/api/index.spec.js +546 -0
- package/esm/api/introduction.md +6 -0
- package/esm/api/useResource.js +128 -0
- package/esm/api/useResourceAction.js +141 -0
- package/esm/api/useResourceQuery.js +208 -0
- package/esm/api/utils.js +233 -0
- package/esm/app/App.js +27 -0
- package/esm/app/Confirmation/index.js +3 -0
- package/esm/app/Footer/index.js +15 -0
- package/esm/app/Header/HeaderContent.js +3 -0
- package/esm/app/Header/HeaderLogo.js +17 -0
- package/esm/app/Header/HeaderSection.js +7 -0
- package/esm/app/Header/HeaderTitle.js +17 -0
- package/esm/app/Header/__snapshots__/index.spec.tsx.snap +393 -0
- package/esm/app/Header/index.js +13 -0
- package/esm/app/Header/index.mdx +50 -0
- package/esm/app/Header/index.spec.js +32 -0
- package/esm/app/NotFound/index.js +12 -0
- package/esm/app/OutdatedBrowserBanner.js +24 -0
- package/esm/app/PageTitle.js +57 -0
- package/esm/app/QrCodeScanner/__snapshots__/index.spec.tsx.snap +22 -0
- package/esm/app/QrCodeScanner/index.js +64 -0
- package/esm/app/QrCodeScanner/index.mdx +22 -0
- package/esm/app/QrCodeScanner/index.spec.js +13 -0
- package/esm/app/i18n.js +42 -0
- package/esm/app/index.js +5 -0
- package/esm/core/Accordion/__snapshots__/index.spec.tsx.snap +78 -0
- package/esm/core/Accordion/index.js +50 -0
- package/esm/core/Accordion/index.mdx +104 -0
- package/esm/core/Accordion/index.spec.js +9 -0
- package/esm/core/Blockquote/__snapshots__/index.spec.tsx.snap +13 -0
- package/esm/core/Blockquote/index.js +16 -0
- package/esm/core/Blockquote/index.mdx +61 -0
- package/esm/core/Blockquote/index.spec.js +9 -0
- package/esm/core/Breadcrumbs/index.js +3 -0
- package/esm/core/Button/BackButton.js +21 -0
- package/esm/core/Button/ButtonLink.js +16 -0
- package/esm/core/Button/CallToAction.js +27 -0
- package/esm/core/Button/Icon.js +7 -0
- package/esm/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
- package/esm/core/Button/index.js +37 -0
- package/esm/core/Button/index.mdx +65 -0
- package/esm/core/Button/index.spec.js +9 -0
- package/esm/core/Card/index.js +4 -0
- package/esm/core/Details/__snapshots__/index.spec.tsx.snap +50 -0
- package/esm/core/Details/index.js +5 -0
- package/esm/core/Details/index.mdx +34 -0
- package/esm/core/Details/index.spec.js +17 -0
- package/esm/core/Divider/index.js +7 -0
- package/esm/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +322 -0
- package/esm/core/ErrorSummary/index.js +3 -0
- package/esm/core/ErrorSummary/index.mdx +61 -0
- package/esm/core/ErrorSummary/index.spec.js +9 -0
- package/esm/core/Hidden/index.js +1 -0
- package/esm/core/Link/__snapshots__/index.spec.tsx.snap +31 -0
- package/esm/core/Link/index.js +27 -0
- package/esm/core/Link/index.spec.js +21 -0
- package/esm/core/List/List.js +3 -0
- package/esm/core/List/ListItem.js +3 -0
- package/esm/core/List/ListItemContent.js +27 -0
- package/esm/core/List/ListItemIcon.js +29 -0
- package/esm/core/List/ListItemText.js +19 -0
- package/esm/core/List/ListItemTitle.js +25 -0
- package/esm/core/List/__snapshots__/index.spec.tsx.snap +322 -0
- package/esm/core/List/index.js +7 -0
- package/esm/core/List/index.mdx +40 -0
- package/esm/core/List/index.spec.js +9 -0
- package/esm/core/NavList/NavList.js +78 -0
- package/esm/core/NavList/NavListContext.js +80 -0
- package/esm/core/NavList/NavListItem.js +141 -0
- package/esm/core/NavList/NavListItemBase.js +133 -0
- package/esm/core/NavList/NavListSubMenu.js +27 -0
- package/esm/core/NavList/__snapshots__/index.spec.tsx.snap +334 -0
- package/esm/core/NavList/index.js +5 -0
- package/esm/core/NavList/index.mdx +185 -0
- package/esm/core/NavList/index.spec.js +9 -0
- package/esm/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +737 -0
- package/esm/core/NotificationBanner/index.js +35 -0
- package/esm/core/NotificationBanner/index.mdx +77 -0
- package/esm/core/NotificationBanner/index.spec.js +20 -0
- package/esm/core/PaginationLabel/index.js +20 -0
- package/esm/core/ServiceBadge/ServiceBadge.mdx +0 -0
- package/esm/core/ServiceBadge/index.js +20 -0
- package/esm/core/ServiceBadge/index.mdx +42 -0
- package/esm/core/SummaryList/__snapshots__/index.spec.tsx.snap +57 -0
- package/esm/core/SummaryList/index.js +7 -0
- package/esm/core/SummaryList/index.mdx +82 -0
- package/esm/core/SummaryList/index.spec.js +9 -0
- package/esm/core/Table/index.js +7 -0
- package/esm/core/Tabs/index.js +37 -0
- package/esm/core/Tabs/index.mdx +54 -0
- package/esm/core/VisuallyHidden/index.js +1 -0
- package/esm/core/WarningText/__snapshots__/index.spec.tsx.snap +336 -0
- package/esm/core/WarningText/index.js +3 -0
- package/esm/core/WarningText/index.mdx +46 -0
- package/esm/core/WarningText/index.spec.js +9 -0
- package/esm/core/index.js +18 -0
- package/esm/custom.d.js +0 -0
- package/esm/form/inputs/Input/index.mdx +10 -0
- package/esm/govgr/Footer/Copyright.js +37 -0
- package/esm/govgr/Footer/HellenicRepublicLogo.js +3 -0
- package/esm/govgr/Footer/LicenseCCSA.js +18 -0
- package/esm/govgr/Footer/index.js +21 -0
- package/esm/govgr/Footer/index.mdx +97 -0
- package/esm/govgr/Footer/logo.js +1 -0
- package/esm/govgr/Footer/logos/logo-el.js +1 -0
- package/esm/govgr/Footer/logos/logo-en.js +1 -0
- package/esm/govgr/Logo/govgr-logo.svg +1 -0
- package/esm/govgr/Logo/index.js +3 -0
- package/esm/govgr/Logo/logo.js +1 -0
- package/esm/govgr/index.js +4 -0
- package/esm/hooks/useDebounce.js +41 -0
- package/esm/hooks/useLatest.js +12 -0
- package/esm/hooks/useOutdatedBrowserCheck.js +46 -0
- package/esm/hooks/useSearch.js +25 -0
- package/esm/hooks/useTogglableSections.js +96 -0
- package/esm/index.js +10 -0
- package/esm/layouts/Basic/Bottom/index.js +3 -0
- package/esm/layouts/Basic/Bottom/index.mdx +37 -0
- package/esm/layouts/Basic/Content/index.js +18 -0
- package/esm/layouts/Basic/Content/index.mdx +64 -0
- package/esm/layouts/Basic/Main/index.js +3 -0
- package/esm/layouts/Basic/Main/index.mdx +64 -0
- package/esm/layouts/Basic/Masthead/index.js +4 -0
- package/esm/layouts/Basic/Masthead/index.mdx +74 -0
- package/esm/layouts/Basic/Side/index.js +7 -0
- package/esm/layouts/Basic/Side/index.mdx +71 -0
- package/esm/layouts/Basic/Top/index.js +11 -0
- package/esm/layouts/Basic/Top/index.mdx +74 -0
- package/esm/layouts/Basic/__snapshots__/index.spec.tsx.snap +54 -0
- package/esm/layouts/Basic/index.js +8 -0
- package/esm/layouts/Basic/index.mdx +62 -0
- package/esm/layouts/Basic/index.spec.js +10 -0
- package/esm/layouts/Grid/index.js +1 -0
- package/esm/layouts/index.js +2 -0
- package/esm/locales/el.js +61 -0
- package/esm/locales/en.js +61 -0
- package/esm/router/index.js +15 -0
- package/esm/router/index.mdx +40 -0
- package/esm/test-utils/delay.js +31 -0
- package/esm/test-utils/mountWithTheme.js +30 -0
- package/esm/themes/govgr.js +79 -0
- package/esm/themes/grnet.js +110 -0
- package/esm/themes/index.js +2 -0
- package/esm/typography/Caption.js +7 -0
- package/esm/typography/NormalText.js +3 -0
- package/esm/typography/Paragraph.js +2 -0
- package/esm/typography/Title.js +48 -0
- package/esm/typography/index.js +8 -0
- package/esm/typography/index.mdx +32 -0
- package/esm/utils/evaluateBrowserVersion.js +201 -0
- package/esm/utils/withDeprecation.js +103 -0
- package/form/inputs/Input/index.mdx +10 -0
- package/govgr/Footer/Copyright.d.ts +8 -0
- package/govgr/Footer/Copyright.js +52 -0
- package/{src/govgr/Footer/HellenicRepublicLogo.tsx → govgr/Footer/HellenicRepublicLogo.d.ts} +0 -1
- package/govgr/Footer/HellenicRepublicLogo.js +19 -0
- package/govgr/Footer/LicenseCCSA.d.ts +3 -0
- package/govgr/Footer/LicenseCCSA.js +33 -0
- package/govgr/Footer/index.d.ts +13 -0
- package/govgr/Footer/index.js +39 -0
- package/govgr/Footer/index.mdx +97 -0
- package/govgr/Footer/logo.d.ts +2 -0
- package/govgr/Footer/logo.js +8 -0
- package/govgr/Footer/logos/logo-el.d.ts +2 -0
- package/govgr/Footer/logos/logo-el.js +8 -0
- package/govgr/Footer/logos/logo-en.d.ts +2 -0
- package/govgr/Footer/logos/logo-en.js +8 -0
- package/govgr/Logo/govgr-logo.svg +1 -0
- package/{src/govgr/Logo/index.tsx → govgr/Logo/index.d.ts} +0 -2
- package/govgr/Logo/index.js +19 -0
- package/govgr/Logo/logo.d.ts +2 -0
- package/govgr/Logo/logo.js +8 -0
- package/{src/govgr/index.ts → govgr/index.d.ts} +0 -0
- package/govgr/index.js +57 -0
- package/hooks/useDebounce.d.ts +3 -0
- package/hooks/useDebounce.js +63 -0
- package/hooks/useLatest.d.ts +3 -0
- package/hooks/useLatest.js +26 -0
- package/hooks/useOutdatedBrowserCheck.d.ts +2 -0
- package/hooks/useOutdatedBrowserCheck.js +60 -0
- package/hooks/useSearch.d.ts +4 -0
- package/hooks/useSearch.js +40 -0
- package/hooks/useTogglableSections.d.ts +18 -0
- package/hooks/useTogglableSections.js +108 -0
- package/{src/index.ts → index.d.ts} +0 -0
- package/index.js +70 -0
- package/{src/layouts/Basic/Bottom/index.tsx → layouts/Basic/Bottom/index.d.ts} +0 -1
- package/layouts/Basic/Bottom/index.js +19 -0
- package/layouts/Basic/Bottom/index.mdx +37 -0
- package/layouts/Basic/Content/index.d.ts +5 -0
- package/layouts/Basic/Content/index.js +31 -0
- package/layouts/Basic/Content/index.mdx +64 -0
- package/{src/layouts/Basic/Main/index.tsx → layouts/Basic/Main/index.d.ts} +0 -1
- package/layouts/Basic/Main/index.js +19 -0
- package/layouts/Basic/Main/index.mdx +64 -0
- package/{src/layouts/Basic/Masthead/index.tsx → layouts/Basic/Masthead/index.d.ts} +0 -2
- package/layouts/Basic/Masthead/index.js +27 -0
- package/layouts/Basic/Masthead/index.mdx +74 -0
- package/layouts/Basic/Side/index.d.ts +3 -0
- package/layouts/Basic/Side/index.js +20 -0
- package/layouts/Basic/Side/index.mdx +71 -0
- package/layouts/Basic/Top/index.d.ts +3 -0
- package/layouts/Basic/Top/index.js +24 -0
- package/layouts/Basic/Top/index.mdx +74 -0
- package/layouts/Basic/__snapshots__/index.spec.tsx.snap +54 -0
- package/{src/layouts/Basic/index.tsx → layouts/Basic/index.d.ts} +0 -2
- package/layouts/Basic/index.js +97 -0
- package/layouts/Basic/index.mdx +62 -0
- package/layouts/Basic/index.spec.d.ts +1 -0
- package/layouts/Basic/index.spec.js +20 -0
- package/{src/layouts/Grid/index.tsx → layouts/Grid/index.d.ts} +0 -0
- package/layouts/Grid/index.js +18 -0
- package/{src/layouts/index.ts → layouts/index.d.ts} +0 -0
- package/layouts/index.js +34 -0
- package/locales/el.d.ts +62 -0
- package/locales/el.js +68 -0
- package/locales/en.d.ts +62 -0
- package/locales/en.js +68 -0
- package/package.json +9 -31
- package/router/index.d.ts +9 -0
- package/router/index.js +37 -0
- package/router/index.mdx +40 -0
- package/test-utils/delay.d.ts +2 -0
- package/test-utils/delay.js +45 -0
- package/test-utils/mountWithTheme.d.ts +3 -0
- package/test-utils/mountWithTheme.js +43 -0
- package/themes/govgr.d.ts +3 -0
- package/themes/govgr.js +89 -0
- package/themes/grnet.d.ts +2 -0
- package/themes/grnet.js +128 -0
- package/themes/index.d.ts +32 -0
- package/themes/index.js +19 -0
- package/typography/Caption.d.ts +7 -0
- package/typography/Caption.js +20 -0
- package/typography/NormalText.d.ts +5 -0
- package/typography/NormalText.js +19 -0
- package/typography/Paragraph.d.ts +6 -0
- package/typography/Paragraph.js +13 -0
- package/typography/Title.d.ts +9 -0
- package/typography/Title.js +63 -0
- package/{src/typography/index.ts → typography/index.d.ts} +0 -0
- package/typography/index.js +97 -0
- package/typography/index.mdx +32 -0
- package/utils/evaluateBrowserVersion.d.ts +15 -0
- package/utils/evaluateBrowserVersion.js +216 -0
- package/utils/withDeprecation.d.ts +16 -0
- package/utils/withDeprecation.js +116 -0
- package/.eslintrc.js +0 -4
- package/.prettierrc.js +0 -3
- package/.rush/temp/package-deps_build.json +0 -176
- package/.rush/temp/shrinkwrap-deps.json +0 -278
- package/CHANGELOG.json +0 -796
- package/docs/components.mdx +0 -1
- package/docs/create-a-new-service.mdx +0 -93
- package/docs/create-common-page-layout.mdx +0 -205
- package/docs/create-static-page.mdx +0 -179
- package/docs/edit-start-page.mdx +0 -143
- package/docs/index.mdx +0 -66
- package/docs/introduction.mdx +0 -34
- package/src/api/APIErrors.tsx +0 -44
- package/src/api/APIProvider.tsx +0 -27
- package/src/api/fetchAPI.ts +0 -45
- package/src/api/index.spec.tsx +0 -419
- package/src/api/useResource.tsx +0 -96
- package/src/api/useResourceAction.tsx +0 -80
- package/src/api/useResourceQuery.tsx +0 -177
- package/src/api/utils.tsx +0 -156
- package/src/app/App.tsx +0 -33
- package/src/app/Header/HeaderSection.tsx +0 -13
- package/src/app/Header/HeaderTitle.tsx +0 -24
- package/src/app/Header/index.spec.tsx +0 -32
- package/src/app/NotFound/index.tsx +0 -21
- package/src/app/OutdatedBrowserBanner.tsx +0 -37
- package/src/app/PageTitle.tsx +0 -70
- package/src/app/QrCodeScanner/index.spec.tsx +0 -19
- package/src/app/QrCodeScanner/index.tsx +0 -90
- package/src/app/i18n.tsx +0 -44
- package/src/core/Accordion/index.spec.tsx +0 -30
- package/src/core/Accordion/index.tsx +0 -86
- package/src/core/Blockquote/index.spec.tsx +0 -10
- package/src/core/Button/ButtonLink.tsx +0 -20
- package/src/core/Button/CallToAction.tsx +0 -31
- package/src/core/Button/Icon.tsx +0 -9
- package/src/core/Button/index.spec.tsx +0 -8
- package/src/core/Button/index.tsx +0 -46
- package/src/core/Details/index.spec.tsx +0 -38
- package/src/core/Divider/index.tsx +0 -13
- package/src/core/ErrorSummary/index.spec.tsx +0 -10
- package/src/core/Link/index.spec.tsx +0 -22
- package/src/core/Link/index.tsx +0 -41
- package/src/core/List/ListItemContent.tsx +0 -32
- package/src/core/List/ListItemIcon.tsx +0 -31
- package/src/core/List/ListItemText.tsx +0 -23
- package/src/core/List/ListItemTitle.tsx +0 -37
- package/src/core/List/index.spec.tsx +0 -10
- package/src/core/NavList/NavList.tsx +0 -103
- package/src/core/NavList/NavListContext.tsx +0 -85
- package/src/core/NavList/NavListItem.tsx +0 -143
- package/src/core/NavList/NavListItemBase.tsx +0 -146
- package/src/core/NavList/NavListSubMenu.tsx +0 -33
- package/src/core/NavList/index.spec.tsx +0 -10
- package/src/core/NotificationBanner/index.spec.tsx +0 -27
- package/src/core/NotificationBanner/index.tsx +0 -52
- package/src/core/ServiceBadge/index.tsx +0 -35
- package/src/core/SummaryList/index.spec.tsx +0 -28
- package/src/core/Tabs/index.tsx +0 -36
- package/src/core/WarningText/index.spec.tsx +0 -10
- package/src/custom.d.ts +0 -8
- package/src/govgr/Footer/Copyright.tsx +0 -64
- package/src/govgr/Footer/LicenseCCSA.tsx +0 -24
- package/src/govgr/Footer/index.tsx +0 -49
- package/src/hooks/useDebounce.ts +0 -50
- package/src/hooks/useLatest.ts +0 -12
- package/src/hooks/useSearch.ts +0 -47
- package/src/hooks/useTogglableSections.tsx +0 -102
- package/src/layouts/Basic/Content/index.tsx +0 -24
- package/src/layouts/Basic/index.spec.tsx +0 -24
- package/src/router/index.tsx +0 -28
- package/src/test-utils/delay.ts +0 -9
- package/src/test-utils/mountWithTheme.tsx +0 -33
- package/src/themes/grnet.js +0 -109
- package/src/themes/index.tsx +0 -38
- package/src/typography/Caption.tsx +0 -15
- package/src/typography/NormalText.tsx +0 -7
- package/src/typography/Paragraph.tsx +0 -9
- package/src/typography/Title.tsx +0 -51
- package/src/utils/evaluateBrowserVersion.ts +0 -346
- package/src/utils/withDeprecation.tsx +0 -97
- package/tsconfig.json +0 -18
- package/tsconfig.production.json +0 -27
- package/ui.build.log +0 -17
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["variant", "title", "link", "children"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
6
|
+
import CoreNotificationBanner from '@digigov/react-core/NotificationBanner';
|
|
7
|
+
import NotificationBannerHeader from '@digigov/react-core/NotificationBannerHeader';
|
|
8
|
+
import NotificationBannerHeading from '@digigov/react-core/NotificationBannerHeading';
|
|
9
|
+
import NotificationBannerContent from '@digigov/react-core/NotificationBannerContent';
|
|
10
|
+
import NotificationBannerLink from '@digigov/react-core/NotificationBannerLink';
|
|
11
|
+
export var NotificationBanner = withDeprecation(function (_ref) {
|
|
12
|
+
var _ref$variant = _ref.variant,
|
|
13
|
+
variant = _ref$variant === void 0 ? 'important' : _ref$variant,
|
|
14
|
+
title = _ref.title,
|
|
15
|
+
link = _ref.link,
|
|
16
|
+
children = _ref.children,
|
|
17
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
|
|
19
|
+
var success = variant === 'success';
|
|
20
|
+
title = title ? title : success ? 'Success' : 'Important';
|
|
21
|
+
return /*#__PURE__*/React.createElement(CoreNotificationBanner, _extends({
|
|
22
|
+
success: success
|
|
23
|
+
}, props), /*#__PURE__*/React.createElement(NotificationBannerHeader, null, title), /*#__PURE__*/React.createElement(NotificationBannerContent, null, /*#__PURE__*/React.createElement(NotificationBannerHeading, null, children), link && /*#__PURE__*/React.createElement(NotificationBannerLink, {
|
|
24
|
+
href: link.url
|
|
25
|
+
}, link.label)));
|
|
26
|
+
}, {
|
|
27
|
+
name: 'NotificationBanner',
|
|
28
|
+
props: {
|
|
29
|
+
variant: {
|
|
30
|
+
warning: 'variant prop will be deprecated. Use success:boolean instead'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export { NotificationBannerHeader, NotificationBannerContent, NotificationBannerHeading, NotificationBannerLink };
|
|
35
|
+
export default NotificationBanner;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: NotificationBanner
|
|
3
|
+
parent: docs/ui/components
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# NotificationBanner
|
|
7
|
+
|
|
8
|
+
import { NotificationBanner } from '@digigov/ui/core';
|
|
9
|
+
import PropsDoc from '@docs-components/propsDoc';
|
|
10
|
+
import StylesDoc from '@docs-components/stylesDoc';
|
|
11
|
+
|
|
12
|
+
### Example for "Important"
|
|
13
|
+
|
|
14
|
+
```jsx live path=layouts/Basic/index.tsx
|
|
15
|
+
import Header, { HeaderTitle } from '@digigov/ui/app/Header';
|
|
16
|
+
import Paragraph from '@digigov/ui/typography/Paragraph';
|
|
17
|
+
|
|
18
|
+
function NotificationBanner{
|
|
19
|
+
return (
|
|
20
|
+
<NotificationBanner>
|
|
21
|
+
This is important !
|
|
22
|
+
</NotificationBanner>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
export NotificationBanner
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
<br />
|
|
30
|
+
|
|
31
|
+
### Example for "NotificationBanner"
|
|
32
|
+
|
|
33
|
+
```jsx live path=layouts/Basic/index.tsx
|
|
34
|
+
import Header, { HeaderTitle } from '@digigov/ui/app/Header';
|
|
35
|
+
import GovGRLogo from '@digigov/ui/govgr/Logo';
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
function NotificationBanner{
|
|
39
|
+
return (
|
|
40
|
+
<NotificationBanner variant="success">
|
|
41
|
+
Training outcome recorded and trainee withdrawn
|
|
42
|
+
</NotificationBanner>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
export NotificationBanner
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
<br />
|
|
50
|
+
|
|
51
|
+
## When to use this component
|
|
52
|
+
|
|
53
|
+
A notification banner lets you tell the user about something that’s not directly relevant to the thing they’re trying to do on that page of the service. For example:
|
|
54
|
+
|
|
55
|
+
- telling the user about a problem that’s affecting the service as a whole (for example, delays in processing applications because of an emergency)
|
|
56
|
+
- telling the user about something that affects them in particular (for example, an approaching deadline they need to meet)
|
|
57
|
+
- telling the user about the outcome of something they’ve just done on a previous page (for example, confirming that an email has been sent)
|
|
58
|
+
|
|
59
|
+
## When not to use this component
|
|
60
|
+
|
|
61
|
+
Use notification banners sparingly. There’s evidence that people often miss them, and using them too often is likely to make this problem worse.
|
|
62
|
+
|
|
63
|
+
If the information is directly relevant to the thing the user is doing on that page, put the information in the main page content instead. Use inset text or warning text if it needs to stand out.
|
|
64
|
+
|
|
65
|
+
Don’t use a notification banner to tell the user about validation errors (use an error message and error summary instead).
|
|
66
|
+
|
|
67
|
+
### API
|
|
68
|
+
|
|
69
|
+
### Properties
|
|
70
|
+
|
|
71
|
+
<PropsDoc data={NotificationBanner.__doc__} />
|
|
72
|
+
|
|
73
|
+
<br />
|
|
74
|
+
|
|
75
|
+
### Styles
|
|
76
|
+
|
|
77
|
+
<StylesDoc data={NotificationBanner.__doc__} />
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import mountWithTheme from '@digigov/ui/test-utils/mountWithTheme';
|
|
3
|
+
import NotificationBanner from '@digigov/ui/core/NotificationBanner';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(NotificationBanner, {
|
|
6
|
+
title: "Notification Banner Example"
|
|
7
|
+
}, "this is a notification");
|
|
8
|
+
|
|
9
|
+
it('renders the notification banner', function () {
|
|
10
|
+
expect(mountWithTheme(_ref)).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
it('renders the notification banner with title and link', function () {
|
|
13
|
+
expect(mountWithTheme( /*#__PURE__*/React.createElement(NotificationBanner, {
|
|
14
|
+
title: "Notification Banner Example",
|
|
15
|
+
link: {
|
|
16
|
+
url: '/',
|
|
17
|
+
label: 'This is a label'
|
|
18
|
+
}
|
|
19
|
+
}, "this is a notification"))).toMatchSnapshot();
|
|
20
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CorePaginationLabel from '@digigov/react-extensions/admin/PaginationLabel';
|
|
3
|
+
import { useTranslation } from '@digigov/ui/app';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* PaginationLabel component is used for placing the pagination results label.
|
|
7
|
+
*/
|
|
8
|
+
export var PaginationLabel = /*#__PURE__*/React.forwardRef(function PaginationLabel(_ref, ref) {
|
|
9
|
+
var start = _ref.start,
|
|
10
|
+
end = _ref.end,
|
|
11
|
+
total = _ref.total;
|
|
12
|
+
|
|
13
|
+
var _useTranslation = useTranslation(),
|
|
14
|
+
t = _useTranslation.t;
|
|
15
|
+
|
|
16
|
+
return /*#__PURE__*/React.createElement(CorePaginationLabel, {
|
|
17
|
+
ref: ref
|
|
18
|
+
}, t('pagination.show'), " ", /*#__PURE__*/React.createElement("b", null, start), " ", t('pagination.to'), " ", /*#__PURE__*/React.createElement("b", null, end), ' ', t('pagination.of'), " ", /*#__PURE__*/React.createElement("b", null, total), " ", t('pagination.results'));
|
|
19
|
+
});
|
|
20
|
+
export default PaginationLabel;
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["label", "text", "children"];
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
5
|
+
import PhaseBanner from '@digigov/react-core/PhaseBanner';
|
|
6
|
+
import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';
|
|
7
|
+
import PhaseBannerText from '@digigov/react-core/PhaseBannerText';
|
|
8
|
+
export var ServiceBadge = withDeprecation(function (_ref) {
|
|
9
|
+
var _ref$label = _ref.label,
|
|
10
|
+
label = _ref$label === void 0 ? 'BETA' : _ref$label,
|
|
11
|
+
text = _ref.text,
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
|
|
15
|
+
return /*#__PURE__*/React.createElement(PhaseBanner, props, children ? children : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PhaseBannerTag, null, label), text && /*#__PURE__*/React.createElement(PhaseBannerText, null, text)));
|
|
16
|
+
}, {
|
|
17
|
+
name: 'ServiceBadge',
|
|
18
|
+
rename: 'PhaseBanner'
|
|
19
|
+
});
|
|
20
|
+
export default ServiceBadge;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
parent: docs/ui/component
|
|
3
|
+
title: ServiceBadge
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import ServiceBadge from '@digigov/ui/core/ServiceBadge';
|
|
7
|
+
import Header, { HeaderTitle } from '@digigov/ui/app/Header';
|
|
8
|
+
import GovGRLogo from '@digigov/ui/govgr/Logo';
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
<Header>
|
|
13
|
+
<GovGRLogo />
|
|
14
|
+
<HeaderTitle>
|
|
15
|
+
Service Name <ServiceBadge label="ALPHA" />
|
|
16
|
+
</HeaderTitle>
|
|
17
|
+
</Header>
|
|
18
|
+
|
|
19
|
+
## How to use
|
|
20
|
+
|
|
21
|
+
```jsx
|
|
22
|
+
import ServieBadge from '@digigov/ui/core/ServiceBadge';
|
|
23
|
+
|
|
24
|
+
<ServiceBadge label="ALPHA" />;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## When to use this component
|
|
28
|
+
|
|
29
|
+
Use ServiceBadge to indicate the current release cycle of your service. Use
|
|
30
|
+
an alpha badge when your service is in alpha, and a beta badge if your
|
|
31
|
+
service is in private or public beta.
|
|
32
|
+
|
|
33
|
+
## How it works
|
|
34
|
+
|
|
35
|
+
Communicating early release service status can improve the perception of the
|
|
36
|
+
user regarding the overall experience of the service. It also acts as a hint
|
|
37
|
+
that service is in active development and user feedback is needed and
|
|
38
|
+
welcomed by your team.
|
|
39
|
+
|
|
40
|
+
## References
|
|
41
|
+
|
|
42
|
+
- https://designnotes.blog.gov.uk/2014/01/20/why-and-how-were-explaining-beta-to-users/
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`renders the SummaryList with sample data 1`] = `
|
|
4
|
+
<ForwardRef(SummaryList)>
|
|
5
|
+
<dl
|
|
6
|
+
className="govgr-summary-list"
|
|
7
|
+
>
|
|
8
|
+
<ForwardRef(SummaryListItem)>
|
|
9
|
+
<div
|
|
10
|
+
className="govgr-summary-list__row"
|
|
11
|
+
>
|
|
12
|
+
<ForwardRef(SummaryListItemKey)>
|
|
13
|
+
<dt
|
|
14
|
+
className="govgr-summary-list__key"
|
|
15
|
+
>
|
|
16
|
+
Όνομα
|
|
17
|
+
</dt>
|
|
18
|
+
</ForwardRef(SummaryListItemKey)>
|
|
19
|
+
<ForwardRef(SummaryListItemValue)>
|
|
20
|
+
<dd
|
|
21
|
+
className="govgr-summary-list__value"
|
|
22
|
+
>
|
|
23
|
+
Μάριος
|
|
24
|
+
</dd>
|
|
25
|
+
</ForwardRef(SummaryListItemValue)>
|
|
26
|
+
<ForwardRef(SummaryListItemAction)>
|
|
27
|
+
<dd
|
|
28
|
+
className="govgr-summary-list__actions"
|
|
29
|
+
>
|
|
30
|
+
Αλλαγή
|
|
31
|
+
</dd>
|
|
32
|
+
</ForwardRef(SummaryListItemAction)>
|
|
33
|
+
</div>
|
|
34
|
+
</ForwardRef(SummaryListItem)>
|
|
35
|
+
<ForwardRef(SummaryListItem)>
|
|
36
|
+
<div
|
|
37
|
+
className="govgr-summary-list__row"
|
|
38
|
+
>
|
|
39
|
+
<ForwardRef(SummaryListItemKey)>
|
|
40
|
+
<dt
|
|
41
|
+
className="govgr-summary-list__key"
|
|
42
|
+
>
|
|
43
|
+
Επώνυμο
|
|
44
|
+
</dt>
|
|
45
|
+
</ForwardRef(SummaryListItemKey)>
|
|
46
|
+
<ForwardRef(SummaryListItemValue)>
|
|
47
|
+
<dd
|
|
48
|
+
className="govgr-summary-list__value"
|
|
49
|
+
>
|
|
50
|
+
Μενεξές
|
|
51
|
+
</dd>
|
|
52
|
+
</ForwardRef(SummaryListItemValue)>
|
|
53
|
+
</div>
|
|
54
|
+
</ForwardRef(SummaryListItem)>
|
|
55
|
+
</dl>
|
|
56
|
+
</ForwardRef(SummaryList)>
|
|
57
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SummaryList } from '@digigov/react-core/SummaryList';
|
|
2
|
+
export * from '@digigov/react-core/SummaryList';
|
|
3
|
+
export * from '@digigov/react-core/SummaryListItemAction';
|
|
4
|
+
export * from '@digigov/react-core/SummaryListItem';
|
|
5
|
+
export * from '@digigov/react-core/SummaryListItemKey';
|
|
6
|
+
export * from '@digigov/react-core/SummaryListItemValue';
|
|
7
|
+
export default SummaryList;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Summary List
|
|
3
|
+
parent: docs/ui/components
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
SummaryList,
|
|
8
|
+
SummaryListItem,
|
|
9
|
+
SummaryListItemKey,
|
|
10
|
+
SummaryListItemValue,
|
|
11
|
+
SummaryListItemAction,
|
|
12
|
+
} from '@digigov/ui/core/SummaryList';
|
|
13
|
+
import PropsDoc from '@docs-components/propsDoc';
|
|
14
|
+
import StylesDoc from '@docs-components/stylesDoc';
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```jsx live path=core/SummaryList/index.tsx
|
|
19
|
+
<SummaryList>
|
|
20
|
+
<SummaryListItem>
|
|
21
|
+
<SummaryListItemKey>Όνομα</SummaryListItemKey>
|
|
22
|
+
<SummaryListItemValue> Μάριος</SummaryListItemValue>
|
|
23
|
+
<SummaryListItemAction> Αλλαγή</SummaryListItemAction>
|
|
24
|
+
</SummaryListItem>
|
|
25
|
+
<SummaryListItem>
|
|
26
|
+
<SummaryListItemKey>Επώνυμο</SummaryListItemKey>
|
|
27
|
+
<SummaryListItemValue>Μενεξές</SummaryListItemValue>
|
|
28
|
+
</SummaryListItem>
|
|
29
|
+
</SummaryList>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
<br />
|
|
33
|
+
|
|
34
|
+
## When to use this component
|
|
35
|
+
|
|
36
|
+
Use the SummaryList component to present pairs of related information, known
|
|
37
|
+
as key-value pairs, in a list.
|
|
38
|
+
|
|
39
|
+
> The key is a description or label of a piece of
|
|
40
|
+
> information, like `Name`, and the value is the piece of information itself,
|
|
41
|
+
> like `John Smith`.
|
|
42
|
+
|
|
43
|
+
## When not to use this component
|
|
44
|
+
|
|
45
|
+
Only use it to present information that has a key and at least one value.
|
|
46
|
+
|
|
47
|
+
Do not use it for tabular data or a simple list of information or tasks, like
|
|
48
|
+
a task list.
|
|
49
|
+
|
|
50
|
+
## How it works
|
|
51
|
+
|
|
52
|
+
### Summary list with actions
|
|
53
|
+
|
|
54
|
+
You can add actions to a summary list, like a ‘Change’ link to let users go
|
|
55
|
+
back and edit their answer.
|
|
56
|
+
|
|
57
|
+
For sighted users, the actions get their context from the other content in the
|
|
58
|
+
row they appear in.
|
|
59
|
+
|
|
60
|
+
Assistive technology users, like those who use a screen reader, may hear the
|
|
61
|
+
links out of context and not know what they do. To give more context, add
|
|
62
|
+
visually hidden text to the links. This means a screen reader user will hear
|
|
63
|
+
a meaningful action, like `Change name` or `Change date of birth`.
|
|
64
|
+
|
|
65
|
+
## API
|
|
66
|
+
|
|
67
|
+
### Properties
|
|
68
|
+
|
|
69
|
+
<PropsDoc data={SummaryList.__doc__} />
|
|
70
|
+
<PropsDoc data={SummaryListItem.__doc__} />
|
|
71
|
+
<PropsDoc data={SummaryListItemKey.__doc__} />
|
|
72
|
+
<PropsDoc data={SummaryListItemValue.__doc__} />
|
|
73
|
+
<PropsDoc data={SummaryListItemAction.__doc__} />
|
|
74
|
+
<br />
|
|
75
|
+
|
|
76
|
+
### Styles
|
|
77
|
+
|
|
78
|
+
<StylesDoc data={SummaryList.__doc__} />
|
|
79
|
+
<StylesDoc data={SummaryListItem.__doc__} />
|
|
80
|
+
<StylesDoc data={SummaryListItemKey.__doc__} />
|
|
81
|
+
<StylesDoc data={SummaryListItemValue.__doc__} />
|
|
82
|
+
<StylesDoc data={SummaryListItemAction.__doc__} />
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import { SummaryList, SummaryListItem, SummaryListItemKey, SummaryListItemValue, SummaryListItemAction } from '@digigov/ui/core/SummaryList';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(SummaryList, null, /*#__PURE__*/React.createElement(SummaryListItem, null, /*#__PURE__*/React.createElement(SummaryListItemKey, null, "\u038C\u03BD\u03BF\u03BC\u03B1"), /*#__PURE__*/React.createElement(SummaryListItemValue, null, " \u039C\u03AC\u03C1\u03B9\u03BF\u03C2"), /*#__PURE__*/React.createElement(SummaryListItemAction, null, " \u0391\u03BB\u03BB\u03B1\u03B3\u03AE")), /*#__PURE__*/React.createElement(SummaryListItem, null, /*#__PURE__*/React.createElement(SummaryListItemKey, null, "\u0395\u03C0\u03CE\u03BD\u03C5\u03BC\u03BF"), /*#__PURE__*/React.createElement(SummaryListItemValue, null, "\u039C\u03B5\u03BD\u03B5\u03BE\u03AD\u03C2")));
|
|
6
|
+
|
|
7
|
+
it('renders the SummaryList with sample data', function () {
|
|
8
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
9
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from '@digigov/react-core/Table';
|
|
2
|
+
export * from '@digigov/react-core/TableBody';
|
|
3
|
+
export * from '@digigov/react-core/TableCaption';
|
|
4
|
+
export * from '@digigov/react-core/TableDataCell';
|
|
5
|
+
export * from '@digigov/react-core/TableHead';
|
|
6
|
+
export * from '@digigov/react-core/TableHeaderCell';
|
|
7
|
+
export * from '@digigov/react-core/TableRow';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["register", "opened"];
|
|
4
|
+
import { useCallback } from 'react';
|
|
5
|
+
import Tabs from '@digigov/react-core/Tabs';
|
|
6
|
+
import TabsList from '@digigov/react-core/TabsList';
|
|
7
|
+
import TabsListItem from '@digigov/react-core/TabsListItem';
|
|
8
|
+
import TabsPanel from '@digigov/react-core/TabsPanel';
|
|
9
|
+
import TabsHeading from '@digigov/react-core/TabsHeading';
|
|
10
|
+
import { useTogglableSections } from '@digigov/ui/hooks/useTogglableSections';
|
|
11
|
+
export { Tabs, TabsList, TabsListItem, TabsPanel, TabsHeading };
|
|
12
|
+
export var useTabs = function useTabs() {
|
|
13
|
+
var _useTogglableSections = useTogglableSections({
|
|
14
|
+
singleOpen: true,
|
|
15
|
+
toggleProperty: 'selected',
|
|
16
|
+
onToggleProperty: 'onClick',
|
|
17
|
+
firstOpen: true,
|
|
18
|
+
ariaNavigation: true
|
|
19
|
+
}),
|
|
20
|
+
register = _useTogglableSections.register,
|
|
21
|
+
opened = _useTogglableSections.opened,
|
|
22
|
+
rest = _objectWithoutProperties(_useTogglableSections, _excluded);
|
|
23
|
+
|
|
24
|
+
var panel = useCallback(function (key) {
|
|
25
|
+
return {
|
|
26
|
+
active: opened[key],
|
|
27
|
+
id: key,
|
|
28
|
+
tabIndex: opened[key] ? 1 : -1
|
|
29
|
+
};
|
|
30
|
+
}, [opened]);
|
|
31
|
+
return _extends({
|
|
32
|
+
register: register,
|
|
33
|
+
opened: opened,
|
|
34
|
+
panel: panel
|
|
35
|
+
}, rest);
|
|
36
|
+
};
|
|
37
|
+
export default Tabs;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tabs
|
|
3
|
+
parent: docs/ui/components
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import Tabs from '@digigov/ui/core/Tabs';
|
|
7
|
+
import PropsDoc from '@docs-components/propsDoc';
|
|
8
|
+
|
|
9
|
+
## Examples
|
|
10
|
+
|
|
11
|
+
```jsx live path=core/Tabs
|
|
12
|
+
() => {
|
|
13
|
+
const [value, setValue] = React.useState(0);
|
|
14
|
+
const handleChange = (event, nextValue) => {
|
|
15
|
+
setValue(nextValue);
|
|
16
|
+
};
|
|
17
|
+
const tabs = [
|
|
18
|
+
{
|
|
19
|
+
title: 'Home',
|
|
20
|
+
component: <>Home et al</>,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: 'About',
|
|
24
|
+
component: <>About et al</>,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: 'Contact',
|
|
28
|
+
component: <>Contact et al</>,
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
return (
|
|
32
|
+
<>
|
|
33
|
+
<Tabs value={value} onChange={handleChange}>
|
|
34
|
+
{tabs.map(({ title }, index) => (
|
|
35
|
+
<Tab label={title} {...getA11yProps(index)} />
|
|
36
|
+
))}
|
|
37
|
+
</Tabs>
|
|
38
|
+
{tabs.map(({ component }, index) => (
|
|
39
|
+
<TabPanel value={value} index={index}>
|
|
40
|
+
{component}
|
|
41
|
+
</TabPanel>
|
|
42
|
+
))}
|
|
43
|
+
</>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
<br />
|
|
49
|
+
|
|
50
|
+
## API
|
|
51
|
+
|
|
52
|
+
### Properties
|
|
53
|
+
|
|
54
|
+
<PropsDoc data={Tabs.__doc__} />
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@digigov/react-core/VisuallyHidden';
|