@digigov/ui 0.8.3 → 0.9.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/CHANGELOG.md +34 -1
- package/app/App.js +6 -8
- package/app/Header/HeaderLogo.js +19 -39
- package/app/Header/HeaderSection.js +6 -43
- package/app/Header/HeaderTitle.js +14 -91
- package/app/Header/index.js +20 -67
- package/app/Header/index.spec.js +0 -1
- package/app/PageTitle.js +45 -81
- package/core/Accordion/index.js +103 -57
- package/core/Blockquote/index.js +17 -47
- package/core/Button/BackButton.js +20 -42
- package/core/Button/ButtonLink.js +28 -0
- package/core/Button/CallToAction.js +21 -12
- package/core/Button/Icon.js +5 -47
- package/core/Button/index.js +49 -99
- package/core/Details/index.js +22 -70
- package/core/Divider/index.js +9 -9
- package/core/ErrorSummary/index.js +8 -28
- package/core/List/List.js +8 -34
- package/core/List/ListItem.js +8 -38
- package/core/List/ListItemTitle.js +1 -3
- package/core/NavList/NavListItem.js +2 -2
- package/core/NotificationBanner/index.js +49 -48
- package/core/NotificationBanner/index.spec.js +3 -1
- package/core/ServiceBadge/index.js +17 -28
- package/core/SummaryList/index.js +57 -124
- package/core/Tabs/index.js +65 -98
- package/core/WarningText/index.js +8 -41
- package/es/app/App.js +6 -8
- package/es/app/Header/HeaderLogo.js +15 -30
- package/es/app/Header/HeaderSection.js +5 -36
- package/es/app/Header/HeaderTitle.js +13 -78
- package/es/app/Header/index.js +6 -56
- package/es/app/Header/index.spec.js +0 -1
- package/es/app/PageTitle.js +46 -74
- package/es/core/Accordion/index.js +64 -52
- package/es/core/Blockquote/index.js +13 -39
- package/es/core/Button/BackButton.js +18 -36
- package/es/core/Button/ButtonLink.js +16 -0
- package/es/core/Button/CallToAction.js +19 -9
- package/es/core/Button/Icon.js +5 -35
- package/es/core/Button/index.js +26 -87
- package/es/core/Details/index.js +5 -62
- package/es/core/Divider/index.js +7 -6
- package/es/core/ErrorSummary/index.js +2 -21
- package/es/core/List/List.js +2 -26
- package/es/core/List/ListItem.js +2 -30
- package/es/core/List/ListItemTitle.js +1 -3
- package/es/core/NavList/NavListItem.js +1 -1
- package/es/core/NotificationBanner/index.js +27 -45
- package/es/core/NotificationBanner/index.spec.js +3 -1
- package/es/core/ServiceBadge/index.js +15 -25
- package/es/core/SummaryList/index.js +7 -119
- package/es/core/Tabs/index.js +33 -93
- package/es/core/WarningText/index.js +2 -33
- package/es/govgr/Footer/Copyright.js +14 -36
- package/es/govgr/Footer/HellenicRepublicLogo.js +2 -30
- package/es/govgr/Footer/LicenseCCSA.js +2 -17
- package/es/govgr/Footer/index.js +23 -69
- package/es/govgr/Logo/index.js +2 -14
- package/es/hooks/useTogglableSections.js +96 -0
- package/es/layouts/Basic/Bottom/index.js +3 -13
- package/es/layouts/Basic/Content/index.js +14 -51
- package/es/layouts/Basic/Content/index.mdx +1 -1
- package/es/layouts/Basic/Main/index.js +3 -21
- package/es/layouts/Basic/Masthead/index.js +4 -47
- package/es/layouts/Basic/Masthead/index.mdx +1 -1
- package/es/layouts/Basic/Side/index.js +6 -28
- package/es/layouts/Basic/Top/index.js +7 -36
- package/es/layouts/Basic/index.js +3 -49
- package/es/themes/grnet.js +1 -1
- package/es/typography/Caption.js +5 -21
- package/es/typography/NormalText.js +2 -10
- package/es/typography/Paragraph.js +1 -29
- package/es/typography/Title.js +40 -87
- package/es/utils/withDeprecation.js +102 -0
- package/esm/app/App.js +6 -8
- package/esm/app/Header/HeaderLogo.js +15 -30
- package/esm/app/Header/HeaderSection.js +5 -36
- package/esm/app/Header/HeaderTitle.js +13 -78
- package/esm/app/Header/index.js +6 -56
- package/esm/app/Header/index.spec.js +0 -1
- package/esm/app/PageTitle.js +46 -74
- package/esm/core/Accordion/index.js +64 -52
- package/esm/core/Blockquote/index.js +13 -39
- package/esm/core/Button/BackButton.js +18 -36
- package/esm/core/Button/ButtonLink.js +16 -0
- package/esm/core/Button/CallToAction.js +19 -9
- package/esm/core/Button/Icon.js +5 -35
- package/esm/core/Button/index.js +26 -87
- package/esm/core/Details/index.js +5 -62
- package/esm/core/Divider/index.js +7 -6
- package/esm/core/ErrorSummary/index.js +2 -21
- package/esm/core/List/List.js +2 -26
- package/esm/core/List/ListItem.js +2 -30
- package/esm/core/List/ListItemTitle.js +1 -3
- package/esm/core/NavList/NavListItem.js +1 -1
- package/esm/core/NotificationBanner/index.js +27 -45
- package/esm/core/NotificationBanner/index.spec.js +3 -1
- package/esm/core/ServiceBadge/index.js +15 -25
- package/esm/core/SummaryList/index.js +7 -119
- package/esm/core/Tabs/index.js +33 -93
- package/esm/core/WarningText/index.js +2 -33
- package/esm/govgr/Footer/Copyright.js +14 -36
- package/esm/govgr/Footer/HellenicRepublicLogo.js +2 -30
- package/esm/govgr/Footer/LicenseCCSA.js +2 -17
- package/esm/govgr/Footer/index.js +23 -69
- package/esm/govgr/Logo/index.js +2 -14
- package/esm/hooks/useTogglableSections.js +96 -0
- package/esm/index.js +1 -1
- package/esm/layouts/Basic/Bottom/index.js +3 -13
- package/esm/layouts/Basic/Content/index.js +14 -51
- package/esm/layouts/Basic/Content/index.mdx +1 -1
- package/esm/layouts/Basic/Main/index.js +3 -21
- package/esm/layouts/Basic/Masthead/index.js +4 -47
- package/esm/layouts/Basic/Masthead/index.mdx +1 -1
- package/esm/layouts/Basic/Side/index.js +6 -28
- package/esm/layouts/Basic/Top/index.js +7 -36
- package/esm/layouts/Basic/index.js +3 -49
- package/esm/themes/grnet.js +1 -1
- package/esm/typography/Caption.js +5 -21
- package/esm/typography/NormalText.js +2 -10
- package/esm/typography/Paragraph.js +1 -29
- package/esm/typography/Title.js +40 -87
- package/esm/utils/withDeprecation.js +102 -0
- package/govgr/Footer/Copyright.js +15 -42
- package/govgr/Footer/HellenicRepublicLogo.js +8 -39
- package/govgr/Footer/LicenseCCSA.js +2 -19
- package/govgr/Footer/index.js +23 -72
- package/govgr/Logo/index.js +9 -28
- package/hooks/useTogglableSections.js +108 -0
- package/layouts/Basic/Bottom/index.js +10 -19
- package/layouts/Basic/Content/index.js +17 -68
- package/layouts/Basic/Content/index.mdx +1 -1
- package/layouts/Basic/Main/index.js +10 -23
- package/layouts/Basic/Masthead/index.js +17 -54
- package/layouts/Basic/Masthead/index.mdx +1 -1
- package/layouts/Basic/Side/index.js +9 -35
- package/layouts/Basic/Top/index.js +7 -40
- package/layouts/Basic/index.js +4 -57
- package/{api → libs/ui/src/api}/APIErrors.d.ts +0 -0
- package/{api → libs/ui/src/api}/APIProvider.d.ts +0 -0
- package/{api → libs/ui/src/api}/fetchAPI.d.ts +0 -0
- package/{api → libs/ui/src/api}/index.d.ts +0 -0
- package/{api → libs/ui/src/api}/index.spec.d.ts +0 -0
- package/{api → libs/ui/src/api}/useResource.d.ts +0 -0
- package/{api → libs/ui/src/api}/useResourceAction.d.ts +0 -0
- package/{api → libs/ui/src/api}/useResourceQuery.d.ts +0 -0
- package/{api → libs/ui/src/api}/utils.d.ts +0 -0
- package/{app → libs/ui/src/app}/App.d.ts +0 -0
- package/libs/ui/src/app/Header/HeaderLogo.d.ts +3 -0
- package/libs/ui/src/app/Header/HeaderSection.d.ts +5 -0
- package/libs/ui/src/app/Header/HeaderTitle.d.ts +5 -0
- package/libs/ui/src/app/Header/index.d.ts +9 -0
- package/{app → libs/ui/src/app}/Header/index.spec.d.ts +0 -0
- package/{app → libs/ui/src/app}/NotFound/index.d.ts +0 -0
- package/{app → libs/ui/src/app}/OutdatedBrowserBanner.d.ts +0 -0
- package/libs/ui/src/app/PageTitle.d.ts +10 -0
- package/{app → libs/ui/src/app}/QrCodeScanner/index.d.ts +0 -0
- package/{app → libs/ui/src/app}/QrCodeScanner/index.spec.d.ts +0 -0
- package/{app → libs/ui/src/app}/i18n.d.ts +0 -0
- package/{app → libs/ui/src/app}/index.d.ts +0 -0
- package/libs/ui/src/core/Accordion/index.d.ts +21 -0
- package/{core → libs/ui/src/core}/Accordion/index.spec.d.ts +0 -0
- package/libs/ui/src/core/Blockquote/index.d.ts +3 -0
- package/{core → libs/ui/src/core}/Blockquote/index.spec.d.ts +0 -0
- package/libs/ui/src/core/Button/BackButton.d.ts +3 -0
- package/libs/ui/src/core/Button/ButtonLink.d.ts +4 -0
- package/libs/ui/src/core/Button/CallToAction.d.ts +7 -0
- package/libs/ui/src/core/Button/Icon.d.ts +2 -0
- package/libs/ui/src/core/Button/index.d.ts +14 -0
- package/{core → libs/ui/src/core}/Button/index.spec.d.ts +0 -0
- package/libs/ui/src/core/Details/index.d.ts +5 -0
- package/{core → libs/ui/src/core}/Details/index.spec.d.ts +0 -0
- package/libs/ui/src/core/Divider/index.d.ts +5 -0
- package/libs/ui/src/core/ErrorSummary/index.d.ts +3 -0
- package/{core → libs/ui/src/core}/ErrorSummary/index.spec.d.ts +0 -0
- package/{core → libs/ui/src/core}/Link/index.d.ts +0 -0
- package/{core → libs/ui/src/core}/Link/index.spec.d.ts +0 -0
- package/libs/ui/src/core/List/List.d.ts +3 -0
- package/libs/ui/src/core/List/ListItem.d.ts +3 -0
- package/{core → libs/ui/src/core}/List/ListItemContent.d.ts +0 -0
- package/{core → libs/ui/src/core}/List/ListItemIcon.d.ts +0 -0
- package/{core → libs/ui/src/core}/List/ListItemText.d.ts +1 -0
- package/{core → libs/ui/src/core}/List/ListItemTitle.d.ts +0 -0
- package/{core → libs/ui/src/core}/List/index.d.ts +0 -0
- package/{core → libs/ui/src/core}/List/index.spec.d.ts +0 -0
- package/{core → libs/ui/src/core}/NavList/NavList.d.ts +1 -1
- package/{core → libs/ui/src/core}/NavList/NavListContext.d.ts +0 -0
- package/{core → libs/ui/src/core}/NavList/NavListItem.d.ts +0 -0
- package/{core → libs/ui/src/core}/NavList/NavListItemBase.d.ts +1 -1
- package/{core → libs/ui/src/core}/NavList/NavListSubMenu.d.ts +0 -0
- package/{core → libs/ui/src/core}/NavList/index.d.ts +0 -0
- package/{core → libs/ui/src/core}/NavList/index.spec.d.ts +0 -0
- package/libs/ui/src/core/NotificationBanner/index.d.ts +17 -0
- package/{core → libs/ui/src/core}/NotificationBanner/index.spec.d.ts +0 -0
- package/libs/ui/src/core/ServiceBadge/index.d.ts +8 -0
- package/libs/ui/src/core/SummaryList/index.d.ts +7 -0
- package/{core → libs/ui/src/core}/SummaryList/index.spec.d.ts +0 -0
- package/libs/ui/src/core/Tabs/index.d.ts +16 -0
- package/libs/ui/src/core/WarningText/index.d.ts +3 -0
- package/{core → libs/ui/src/core}/WarningText/index.spec.d.ts +0 -0
- package/{core → libs/ui/src/core}/index.d.ts +0 -0
- package/{govgr → libs/ui/src/govgr}/Footer/Copyright.d.ts +1 -1
- package/libs/ui/src/govgr/Footer/HellenicRepublicLogo.d.ts +3 -0
- package/{govgr → libs/ui/src/govgr}/Footer/LicenseCCSA.d.ts +0 -0
- package/{govgr → libs/ui/src/govgr}/Footer/index.d.ts +3 -3
- package/{govgr → libs/ui/src/govgr}/Footer/logo.d.ts +0 -0
- package/libs/ui/src/govgr/Footer/logos/logo-el.d.ts +2 -0
- package/libs/ui/src/govgr/Footer/logos/logo-en.d.ts +2 -0
- package/libs/ui/src/govgr/Logo/index.d.ts +3 -0
- package/{govgr → libs/ui/src/govgr}/Logo/logo.d.ts +0 -0
- package/{govgr → libs/ui/src/govgr}/index.d.ts +0 -0
- package/{hooks → libs/ui/src/hooks}/useDebounce.d.ts +0 -0
- package/{hooks → libs/ui/src/hooks}/useLatest.d.ts +0 -0
- package/{hooks → libs/ui/src/hooks}/useOutdatedBrowserCheck.d.ts +0 -0
- package/{hooks → libs/ui/src/hooks}/useSearch.d.ts +0 -0
- package/libs/ui/src/hooks/useTogglableSections.d.ts +18 -0
- package/{index.d.ts → libs/ui/src/index.d.ts} +0 -0
- package/libs/ui/src/layouts/Basic/Bottom/index.d.ts +3 -0
- package/libs/ui/src/layouts/Basic/Content/index.d.ts +5 -0
- package/libs/ui/src/layouts/Basic/Main/index.d.ts +3 -0
- package/libs/ui/src/layouts/Basic/Masthead/index.d.ts +4 -0
- package/libs/ui/src/layouts/Basic/Side/index.d.ts +3 -0
- package/libs/ui/src/layouts/Basic/Top/index.d.ts +3 -0
- package/libs/ui/src/layouts/Basic/index.d.ts +8 -0
- package/{layouts → libs/ui/src/layouts}/Basic/index.spec.d.ts +0 -0
- package/{layouts → libs/ui/src/layouts}/index.d.ts +0 -0
- package/{locales → libs/ui/src/locales}/el.d.ts +0 -0
- package/{locales → libs/ui/src/locales}/en.d.ts +0 -0
- package/{router → libs/ui/src/router}/index.d.ts +0 -0
- package/{test-utils → libs/ui/src/test-utils}/delay.d.ts +0 -0
- package/{test-utils → libs/ui/src/test-utils}/mountWithTheme.d.ts +0 -0
- package/{themes → libs/ui/src/themes}/govgr.d.ts +0 -0
- package/{themes → libs/ui/src/themes}/grnet.d.ts +0 -0
- package/{themes → libs/ui/src/themes}/index.d.ts +0 -0
- package/libs/ui/src/typography/Caption.d.ts +7 -0
- package/libs/ui/src/typography/NormalText.d.ts +5 -0
- package/libs/ui/src/typography/Paragraph.d.ts +6 -0
- package/libs/ui/src/typography/Title.d.ts +9 -0
- package/{typography → libs/ui/src/typography}/index.d.ts +0 -0
- package/{utils → libs/ui/src/utils}/evaluateBrowserVersion.d.ts +0 -0
- package/libs/ui/src/utils/withDeprecation.d.ts +16 -0
- package/libs-ui/react-core/src/Accordion/index.d.ts +10 -0
- package/libs-ui/react-core/src/AccordionControls/index.d.ts +9 -0
- package/libs-ui/react-core/src/AccordionSection/index.d.ts +15 -0
- package/libs-ui/react-core/src/AccordionSectionContent/index.d.ts +10 -0
- package/libs-ui/react-core/src/AccordionSectionHeader/index.d.ts +9 -0
- package/libs-ui/react-core/src/Aside/index.d.ts +10 -0
- package/libs-ui/react-core/src/BackLink/index.d.ts +13 -0
- package/libs-ui/react-core/src/Blockquote/index.d.ts +9 -0
- package/libs-ui/react-core/src/Bottom/index.d.ts +9 -0
- package/libs-ui/react-core/src/Button/index.d.ts +21 -0
- package/libs-ui/react-core/src/ButtonLink/index.d.ts +17 -0
- package/libs-ui/react-core/src/CallToAction/index.d.ts +10 -0
- package/libs-ui/react-core/src/Container/index.d.ts +9 -0
- package/libs-ui/react-core/src/Copyright/index.d.ts +10 -0
- package/libs-ui/react-core/src/Details/index.d.ts +10 -0
- package/libs-ui/react-core/src/DetailsContent/index.d.ts +10 -0
- package/libs-ui/react-core/src/DetailsSummary/index.d.ts +9 -0
- package/libs-ui/react-core/src/ErrorSummary/index.d.ts +9 -0
- package/libs-ui/react-core/src/Footer/index.d.ts +9 -0
- package/libs-ui/react-core/src/FooterContainer/index.d.ts +9 -0
- package/libs-ui/react-core/src/FooterMeta/index.d.ts +11 -0
- package/libs-ui/react-core/src/FooterMetaItem/index.d.ts +14 -0
- package/libs-ui/react-core/src/GovGRLogo/index.d.ts +9 -0
- package/libs-ui/react-core/src/Grid/index.d.ts +20 -0
- package/libs-ui/react-core/src/Header/index.d.ts +10 -0
- package/libs-ui/react-core/src/HeaderLogo/index.d.ts +17 -0
- package/libs-ui/react-core/src/HeaderSection/index.d.ts +9 -0
- package/libs-ui/react-core/src/HeaderSubtitle/index.d.ts +9 -0
- package/libs-ui/react-core/src/HeaderTitle/index.d.ts +13 -0
- package/libs-ui/react-core/src/Heading/index.d.ts +21 -0
- package/libs-ui/react-core/src/HeadingCaption/index.d.ts +15 -0
- package/libs-ui/react-core/src/HellenicRepublicLogo/index.d.ts +20 -0
- package/{govgr/Footer/logos → libs-ui/react-core/src/HellenicRepublicLogo}/logo-el.d.ts +0 -0
- package/{govgr/Footer/logos → libs-ui/react-core/src/HellenicRepublicLogo}/logo-en.d.ts +0 -0
- package/libs-ui/react-core/src/Layout/index.d.ts +10 -0
- package/libs-ui/react-core/src/List/index.d.ts +18 -0
- package/libs-ui/react-core/src/ListItem/index.d.ts +9 -0
- package/libs-ui/react-core/src/Main/index.d.ts +9 -0
- package/libs-ui/react-core/src/Masthead/index.d.ts +9 -0
- package/libs-ui/react-core/src/MastheadBody/index.d.ts +9 -0
- package/libs-ui/react-core/src/NormalText/index.d.ts +28 -0
- package/libs-ui/react-core/src/NotificationBanner/index.d.ts +17 -0
- package/libs-ui/react-core/src/NotificationBannerContent/index.d.ts +12 -0
- package/libs-ui/react-core/src/NotificationBannerHeader/index.d.ts +11 -0
- package/libs-ui/react-core/src/NotificationBannerHeading/index.d.ts +11 -0
- package/libs-ui/react-core/src/Paragraph/index.d.ts +26 -0
- package/libs-ui/react-core/src/PhaseBanner/index.d.ts +15 -0
- package/libs-ui/react-core/src/PhaseBannerTag/index.d.ts +9 -0
- package/libs-ui/react-core/src/SectionBreak/index.d.ts +18 -0
- package/libs-ui/react-core/src/SummaryList/index.d.ts +10 -0
- package/libs-ui/react-core/src/SummaryListItem/index.d.ts +10 -0
- package/libs-ui/react-core/src/SummaryListItemAction/index.d.ts +10 -0
- package/libs-ui/react-core/src/SummaryListItemKey/index.d.ts +10 -0
- package/libs-ui/react-core/src/SummaryListItemValue/index.d.ts +9 -0
- package/libs-ui/react-core/src/Tabs/index.d.ts +10 -0
- package/libs-ui/react-core/src/TabsHeading/index.d.ts +15 -0
- package/libs-ui/react-core/src/TabsList/index.d.ts +10 -0
- package/libs-ui/react-core/src/TabsListItem/index.d.ts +20 -0
- package/libs-ui/react-core/src/TabsPanel/index.d.ts +16 -0
- package/libs-ui/react-core/src/Top/index.d.ts +9 -0
- package/libs-ui/react-core/src/WarningText/index.d.ts +11 -0
- package/package.json +3 -2
- package/themes/grnet.js +1 -1
- package/typography/Caption.js +5 -25
- package/typography/NormalText.js +9 -16
- package/typography/Paragraph.js +3 -39
- package/typography/Title.js +42 -88
- package/utils/withDeprecation.js +114 -0
- package/app/Header/HeaderLogo.d.ts +0 -12
- package/app/Header/HeaderSection.d.ts +0 -6
- package/app/Header/HeaderTitle.d.ts +0 -26
- package/app/Header/index.d.ts +0 -20
- package/app/PageTitle.d.ts +0 -21
- package/core/Accordion/index.d.ts +0 -23
- package/core/Blockquote/index.d.ts +0 -9
- package/core/Button/BackButton.d.ts +0 -4
- package/core/Button/CallToAction.d.ts +0 -8
- package/core/Button/Icon.d.ts +0 -9
- package/core/Button/__snapshots__/index.spec.tsx.snap +0 -145
- package/core/Button/index.d.js +0 -1
- package/core/Button/index.d.ts +0 -26
- package/core/Details/index.d.ts +0 -17
- package/core/Divider/index.d.ts +0 -6
- package/core/ErrorSummary/index.d.ts +0 -8
- package/core/List/List.d.ts +0 -10
- package/core/List/ListItem.d.ts +0 -10
- package/core/NotificationBanner/index.d.ts +0 -7
- package/core/ServiceBadge/index.d.ts +0 -7
- package/core/SummaryList/index.d.ts +0 -29
- package/core/Tabs/index.d.ts +0 -21
- package/core/WarningText/index.d.ts +0 -8
- package/es/core/Button/__snapshots__/index.spec.tsx.snap +0 -145
- package/es/core/Button/index.d.js +0 -0
- package/esm/core/Button/__snapshots__/index.spec.tsx.snap +0 -145
- package/esm/core/Button/index.d.js +0 -0
- package/govgr/Footer/HellenicRepublicLogo.d.ts +0 -6
- package/govgr/Logo/index.d.ts +0 -3
- package/layouts/Basic/Bottom/index.d.ts +0 -5
- package/layouts/Basic/Content/index.d.ts +0 -9
- package/layouts/Basic/Main/index.d.ts +0 -8
- package/layouts/Basic/Masthead/index.d.ts +0 -7
- package/layouts/Basic/Side/index.d.ts +0 -14
- package/layouts/Basic/Top/index.d.ts +0 -13
- package/layouts/Basic/index.d.ts +0 -31
- package/typography/Caption.d.ts +0 -10
- package/typography/NormalText.d.ts +0 -6
- package/typography/Paragraph.d.ts +0 -7
- package/typography/Title.d.ts +0 -16
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import NormalText from '@digigov/ui/typography/NormalText';
|
|
2
|
+
import CoreCopyright from '@digigov/react-core/Copyright';
|
|
4
3
|
import { useTranslation } from '@digigov/ui/app';
|
|
5
|
-
var useStyles = makeStyles(function (theme) {
|
|
6
|
-
return {
|
|
7
|
-
text: {
|
|
8
|
-
color: theme.palette.grey['700'],
|
|
9
|
-
fontSize: '0.875rem'
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
}, {
|
|
13
|
-
name: 'MuiCopyright'
|
|
14
|
-
});
|
|
15
4
|
|
|
16
5
|
var getCopyright = function getCopyright() {
|
|
17
6
|
var year = new Date().getFullYear();
|
|
@@ -21,38 +10,27 @@ var getCopyright = function getCopyright() {
|
|
|
21
10
|
export var Copyright = function Copyright(_ref) {
|
|
22
11
|
var _ref$copyright = _ref.copyright,
|
|
23
12
|
copyright = _ref$copyright === void 0 ? getCopyright() : _ref$copyright,
|
|
24
|
-
createdBy = _ref.createdBy
|
|
25
|
-
|
|
13
|
+
createdBy = _ref.createdBy,
|
|
14
|
+
minDigitalCopyright = _ref.minDigitalCopyright;
|
|
26
15
|
|
|
27
16
|
var _useTranslation = useTranslation(),
|
|
28
17
|
t = _useTranslation.t;
|
|
29
18
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
var copyrightInfo = minDigitalCopyright ? {
|
|
20
|
+
url: 'https://mindigital.gr',
|
|
21
|
+
label: t('footer.mindigital')
|
|
22
|
+
} : {
|
|
23
|
+
url: 'https://grnet.gr',
|
|
24
|
+
label: t('footer.grnet')
|
|
25
|
+
};
|
|
26
|
+
return /*#__PURE__*/React.createElement(CoreCopyright, null, copyright, ' - ', createdBy || /*#__PURE__*/React.createElement(React.Fragment, null, t('footer.created_by'), ' ', /*#__PURE__*/React.createElement("a", {
|
|
27
|
+
href: copyrightInfo.url,
|
|
34
28
|
target: "_blank",
|
|
35
29
|
rel: "noopener noreferrer"
|
|
36
|
-
},
|
|
30
|
+
}, copyrightInfo.label), ' ', !minDigitalCopyright && /*#__PURE__*/React.createElement(React.Fragment, null, t('footer.using'), ' ', /*#__PURE__*/React.createElement("a", {
|
|
37
31
|
href: "https://mathe.ellak.gr/",
|
|
38
32
|
target: "_blank",
|
|
39
33
|
rel: "noopener noreferrer"
|
|
40
|
-
}, t('footer.open_source'))));
|
|
41
|
-
};
|
|
42
|
-
export var MinDigitalCopyright = function MinDigitalCopyright(_ref2) {
|
|
43
|
-
var _ref2$copyright = _ref2.copyright,
|
|
44
|
-
copyright = _ref2$copyright === void 0 ? getCopyright() : _ref2$copyright;
|
|
45
|
-
var classes = useStyles();
|
|
46
|
-
|
|
47
|
-
var _useTranslation2 = useTranslation(),
|
|
48
|
-
t = _useTranslation2.t;
|
|
49
|
-
|
|
50
|
-
return /*#__PURE__*/React.createElement(NormalText, {
|
|
51
|
-
className: classes.text
|
|
52
|
-
}, copyright, ' - ', /*#__PURE__*/React.createElement(React.Fragment, null, t('footer.created_by'), ' ', /*#__PURE__*/React.createElement("a", {
|
|
53
|
-
href: "https://mindigital.gr",
|
|
54
|
-
target: "_blank",
|
|
55
|
-
rel: "noopener noreferrer"
|
|
56
|
-
}, t('footer.mindigital')), ' '));
|
|
34
|
+
}, t('footer.open_source')))));
|
|
57
35
|
};
|
|
58
36
|
export default Copyright;
|
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { useTranslation } from '@digigov/ui/app/i18n';
|
|
4
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
5
|
-
import logoEl from '@digigov/ui/govgr/Footer/logos/logo-el';
|
|
6
|
-
import logoEn from '@digigov/ui/govgr/Footer/logos/logo-en';
|
|
7
|
-
var useStyles = makeStyles(function () {
|
|
8
|
-
return {
|
|
9
|
-
logo: {
|
|
10
|
-
width: '100%',
|
|
11
|
-
maxWidth: 225
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
}, {
|
|
15
|
-
name: 'MuiHellenicRepublicLogo'
|
|
16
|
-
});
|
|
17
|
-
export var HellenicRepublicLogo = function HellenicRepublicLogo(_ref) {
|
|
18
|
-
var _ref$className = _ref.className,
|
|
19
|
-
className = _ref$className === void 0 ? '' : _ref$className;
|
|
20
|
-
var classes = useStyles();
|
|
21
|
-
|
|
22
|
-
var _useTranslation = useTranslation(),
|
|
23
|
-
i18n = _useTranslation.i18n;
|
|
24
|
-
|
|
25
|
-
var logo = (i18n === null || i18n === void 0 ? void 0 : i18n.language) === 'en' ? logoEn : logoEl;
|
|
26
|
-
return /*#__PURE__*/React.createElement("img", {
|
|
27
|
-
className: clsx(className, classes.logo),
|
|
28
|
-
src: logo
|
|
29
|
-
});
|
|
30
|
-
};
|
|
1
|
+
import HellenicRepublicLogo from '@digigov/react-core/HellenicRepublicLogo';
|
|
2
|
+
export { HellenicRepublicLogo };
|
|
31
3
|
export default HellenicRepublicLogo;
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import NormalText from '@digigov/ui/typography/NormalText';
|
|
2
|
+
import NormalText from '@digigov/react-core/NormalText';
|
|
4
3
|
import { useTranslation } from '@digigov/ui/app';
|
|
5
|
-
var useStyles = makeStyles(function (theme) {
|
|
6
|
-
return {
|
|
7
|
-
text: {
|
|
8
|
-
color: theme.palette.grey['700'],
|
|
9
|
-
fontSize: '0.875rem'
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
}, {
|
|
13
|
-
name: 'MuiLicense'
|
|
14
|
-
});
|
|
15
4
|
|
|
16
5
|
var _ref = /*#__PURE__*/React.createElement("a", {
|
|
17
6
|
href: "https://creativecommons.org/licenses/by-sa/4.0/deed.el",
|
|
@@ -20,13 +9,9 @@ var _ref = /*#__PURE__*/React.createElement("a", {
|
|
|
20
9
|
}, "CC-BY-SA");
|
|
21
10
|
|
|
22
11
|
export var LicenseCCSA = function LicenseCCSA() {
|
|
23
|
-
var classes = useStyles();
|
|
24
|
-
|
|
25
12
|
var _useTranslation = useTranslation(),
|
|
26
13
|
t = _useTranslation.t;
|
|
27
14
|
|
|
28
|
-
return /*#__PURE__*/React.createElement(NormalText,
|
|
29
|
-
className: classes.text
|
|
30
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, t('footer.creative_commons'), ' ', _ref, ' '));
|
|
15
|
+
return /*#__PURE__*/React.createElement(NormalText, null, /*#__PURE__*/React.createElement(React.Fragment, null, t('footer.creative_commons'), ' ', _ref, ' '));
|
|
31
16
|
};
|
|
32
17
|
export default LicenseCCSA;
|
package/es/govgr/Footer/index.js
CHANGED
|
@@ -1,72 +1,30 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["
|
|
4
|
-
_excluded2 = ["reportBugs"];
|
|
2
|
+
var _excluded = ["reportBugs"];
|
|
5
3
|
import React from 'react';
|
|
6
4
|
import clsx from 'clsx';
|
|
7
5
|
import { makeStyles } from '@material-ui/core/styles';
|
|
8
|
-
import Grid from '@
|
|
6
|
+
import Grid from '@digigov/react-core/Grid';
|
|
9
7
|
import { Content } from '@digigov/ui/layouts/Basic';
|
|
10
8
|
import Button from '@digigov/ui/core/Button';
|
|
11
9
|
import Title from '@digigov/ui/typography/Title';
|
|
12
|
-
import Copyright
|
|
10
|
+
import Copyright from '@digigov/ui/govgr/Footer/Copyright';
|
|
13
11
|
import HellenicRepublicLogo from '@digigov/ui/govgr/Footer/HellenicRepublicLogo';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
padding: theme.spacing(4, 0),
|
|
19
|
-
width: '100%',
|
|
20
|
-
borderTop: "\n ".concat(theme.spacing(0.5), "px solid ").concat(theme.palette.secondary.main, "\n ")
|
|
21
|
-
},
|
|
22
|
-
text: {
|
|
23
|
-
color: theme.palette.grey['700'],
|
|
24
|
-
fontSize: '0.875rem'
|
|
25
|
-
},
|
|
26
|
-
logoContainer: {
|
|
27
|
-
display: 'flex',
|
|
28
|
-
justifyContent: 'flex-end'
|
|
29
|
-
},
|
|
30
|
-
logo: {
|
|
31
|
-
width: '100%',
|
|
32
|
-
maxWidth: 225
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}, {
|
|
36
|
-
name: 'MuiGovGRFooter'
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
var _ref2 = /*#__PURE__*/React.createElement(MinDigitalCopyright, null);
|
|
12
|
+
import Footer from '@digigov/react-core/Footer';
|
|
13
|
+
import FooterContainer from '@digigov/react-core/FooterContainer';
|
|
14
|
+
import FooterMeta from '@digigov/react-core/FooterMeta';
|
|
15
|
+
import FooterMetaItem from '@digigov/react-core/FooterMetaItem';
|
|
40
16
|
|
|
41
|
-
var
|
|
17
|
+
var _ref2 = /*#__PURE__*/React.createElement(FooterMetaItem, null, /*#__PURE__*/React.createElement(HellenicRepublicLogo, null));
|
|
42
18
|
|
|
43
19
|
export var GovGRFooter = function GovGRFooter(_ref) {
|
|
44
20
|
var copyright = _ref.copyright,
|
|
45
|
-
_ref$className = _ref.className,
|
|
46
|
-
className = _ref$className === void 0 ? '' : _ref$className,
|
|
47
21
|
children = _ref.children,
|
|
48
22
|
createdBy = _ref.createdBy,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
55
|
-
className: clsx(className, classes.root)
|
|
56
|
-
}, /*#__PURE__*/React.createElement(Content, _extends({}, props, {
|
|
57
|
-
spacing: 2
|
|
58
|
-
}), children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Grid, {
|
|
59
|
-
item: true,
|
|
60
|
-
xs: 12,
|
|
61
|
-
sm: 8
|
|
62
|
-
}, copyright ? copyright : minDigitalCopyright ? _ref2 : /*#__PURE__*/React.createElement(Copyright, {
|
|
63
|
-
createdBy: createdBy
|
|
64
|
-
})), /*#__PURE__*/React.createElement(Grid, {
|
|
65
|
-
item: true,
|
|
66
|
-
xs: 12,
|
|
67
|
-
sm: 4,
|
|
68
|
-
className: classes.logoContainer
|
|
69
|
-
}, _ref3))));
|
|
23
|
+
minDigitalCopyright = _ref.minDigitalCopyright;
|
|
24
|
+
return /*#__PURE__*/React.createElement(Footer, null, /*#__PURE__*/React.createElement(FooterContainer, null, children || /*#__PURE__*/React.createElement(FooterMeta, null, /*#__PURE__*/React.createElement(FooterMetaItem, null, copyright ? copyright : /*#__PURE__*/React.createElement(Copyright, {
|
|
25
|
+
createdBy: createdBy,
|
|
26
|
+
minDigitalCopyright: minDigitalCopyright
|
|
27
|
+
})), _ref2)));
|
|
70
28
|
};
|
|
71
29
|
var useFeedbackStyles = makeStyles(function (theme) {
|
|
72
30
|
return {
|
|
@@ -101,15 +59,17 @@ var useFeedbackStyles = makeStyles(function (theme) {
|
|
|
101
59
|
}, {
|
|
102
60
|
name: 'MuiFeedback'
|
|
103
61
|
});
|
|
104
|
-
export var Feedback = function Feedback(
|
|
105
|
-
var
|
|
106
|
-
reportBugs =
|
|
107
|
-
props = _objectWithoutProperties(
|
|
62
|
+
export var Feedback = function Feedback(_ref3) {
|
|
63
|
+
var _ref3$reportBugs = _ref3.reportBugs,
|
|
64
|
+
reportBugs = _ref3$reportBugs === void 0 ? false : _ref3$reportBugs,
|
|
65
|
+
props = _objectWithoutProperties(_ref3, _excluded);
|
|
108
66
|
|
|
109
67
|
var classes = useFeedbackStyles();
|
|
110
68
|
return /*#__PURE__*/React.createElement("div", {
|
|
111
69
|
className: classes.root
|
|
112
70
|
}, /*#__PURE__*/React.createElement(Content, props, /*#__PURE__*/React.createElement(Grid, {
|
|
71
|
+
container: true
|
|
72
|
+
}, /*#__PURE__*/React.createElement(Grid, {
|
|
113
73
|
item: true,
|
|
114
74
|
xs: 12,
|
|
115
75
|
sm: 6,
|
|
@@ -123,22 +83,16 @@ export var Feedback = function Feedback(_ref4) {
|
|
|
123
83
|
sm: 6,
|
|
124
84
|
md: 6
|
|
125
85
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
126
|
-
|
|
127
|
-
className: classes.link,
|
|
128
|
-
href: ""
|
|
86
|
+
className: classes.link
|
|
129
87
|
}, "\u039D\u03B1\u03B9"), /*#__PURE__*/React.createElement(Button, {
|
|
130
|
-
|
|
131
|
-
className: classes.link,
|
|
132
|
-
href: ""
|
|
88
|
+
className: classes.link
|
|
133
89
|
}, "\u038C\u03C7\u03B9")), reportBugs && /*#__PURE__*/React.createElement(Grid, {
|
|
134
90
|
item: true,
|
|
135
91
|
xs: 12,
|
|
136
92
|
sm: 12,
|
|
137
93
|
md: 4
|
|
138
94
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
href: ""
|
|
142
|
-
}, "\u03A5\u03C0\u03AC\u03C1\u03C7\u03B5\u03B9 \u03BA\u03AC\u03C0\u03BF\u03B9\u03BF \u03BB\u03AC\u03B8\u03BF\u03C2 \u03C3\u03C4\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1"))));
|
|
95
|
+
className: clsx(classes.link, classes.wrong)
|
|
96
|
+
}, "\u03A5\u03C0\u03AC\u03C1\u03C7\u03B5\u03B9 \u03BA\u03AC\u03C0\u03BF\u03B9\u03BF \u03BB\u03AC\u03B8\u03BF\u03C2 \u03C3\u03C4\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1")))));
|
|
143
97
|
};
|
|
144
98
|
export default GovGRFooter;
|
package/es/govgr/Logo/index.js
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { useTheme } from '@material-ui/core';
|
|
4
|
-
import useMediaQuery from '@material-ui/core/useMediaQuery';
|
|
5
|
-
import logo from '@digigov/ui/govgr/Logo/logo';
|
|
6
|
-
export var GovGRLogo = function GovGRLogo() {
|
|
7
|
-
var theme = useTheme();
|
|
8
|
-
var matches = useMediaQuery(theme.breakpoints.down('xs'));
|
|
9
|
-
return /*#__PURE__*/React.createElement(HeaderLogo, {
|
|
10
|
-
src: logo,
|
|
11
|
-
height: matches ? '40' : '50',
|
|
12
|
-
href: "https://gov.gr"
|
|
13
|
-
});
|
|
14
|
-
};
|
|
1
|
+
import GovGRLogo from '@digigov/react-core/GovGRLogo';
|
|
2
|
+
export { GovGRLogo };
|
|
15
3
|
export default GovGRLogo;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
|
|
5
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
6
|
+
import { useRef, useState, useCallback, useMemo } from 'react';
|
|
7
|
+
export function useTogglableSections(_ref) {
|
|
8
|
+
var toggleProperty = _ref.toggleProperty,
|
|
9
|
+
singleOpen = _ref.singleOpen,
|
|
10
|
+
onToggleProperty = _ref.onToggleProperty,
|
|
11
|
+
initial = _ref.initial,
|
|
12
|
+
firstOpen = _ref.firstOpen,
|
|
13
|
+
ariaNavigation = _ref.ariaNavigation;
|
|
14
|
+
|
|
15
|
+
var _useState = useState(initial || {}),
|
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
+
opened = _useState2[0],
|
|
18
|
+
setOpened = _useState2[1];
|
|
19
|
+
|
|
20
|
+
var registered = useRef({});
|
|
21
|
+
var sectionsOrder = useRef([]);
|
|
22
|
+
var registerRef = useCallback(function (el) {
|
|
23
|
+
if (!el) return;
|
|
24
|
+
var key = el.getAttribute('aria-controls');
|
|
25
|
+
if (registered.current[key]) return;
|
|
26
|
+
registered.current[key] = el;
|
|
27
|
+
sectionsOrder.current.push(key);
|
|
28
|
+
|
|
29
|
+
if (firstOpen && sectionsOrder.current.length === 1) {
|
|
30
|
+
setOpened(_defineProperty({}, key, true));
|
|
31
|
+
}
|
|
32
|
+
}, []);
|
|
33
|
+
var toggle = useCallback(function (e) {
|
|
34
|
+
var key = e.currentTarget.getAttribute('aria-controls');
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
|
|
37
|
+
if (singleOpen) {
|
|
38
|
+
setOpened(_defineProperty({}, key, true));
|
|
39
|
+
} else {
|
|
40
|
+
setOpened(function (prev) {
|
|
41
|
+
return _extends({}, prev, _defineProperty({}, key, !prev[key]));
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}, []);
|
|
45
|
+
var onKeyDown = useCallback(function (e) {
|
|
46
|
+
var key = e.target.getAttribute('aria-controls');
|
|
47
|
+
var currentIndex = sectionsOrder.current.findIndex(function (k) {
|
|
48
|
+
return k === key;
|
|
49
|
+
});
|
|
50
|
+
var nextKey = sectionsOrder.current[currentIndex + 1];
|
|
51
|
+
var previousKey = sectionsOrder.current[currentIndex - 1];
|
|
52
|
+
|
|
53
|
+
switch (e.key) {
|
|
54
|
+
case 'ArrowRight':
|
|
55
|
+
case 'ArrowDown':
|
|
56
|
+
if (nextKey) {
|
|
57
|
+
registered.current[nextKey].focus();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
break;
|
|
61
|
+
|
|
62
|
+
case 'ArrowLeft':
|
|
63
|
+
case 'ArrowUp':
|
|
64
|
+
if (previousKey) {
|
|
65
|
+
registered.current[previousKey].focus();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
break;
|
|
69
|
+
|
|
70
|
+
case ' ':
|
|
71
|
+
case 'Enter':
|
|
72
|
+
toggle(e);
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
}, []);
|
|
76
|
+
var register = useCallback(function (key) {
|
|
77
|
+
var _extends3;
|
|
78
|
+
|
|
79
|
+
var isOpen = !!opened[key];
|
|
80
|
+
return _extends((_extends3 = {
|
|
81
|
+
ref: registerRef
|
|
82
|
+
}, _defineProperty(_extends3, toggleProperty, isOpen), _defineProperty(_extends3, onToggleProperty, toggle), _defineProperty(_extends3, 'aria-controls', "".concat(key)), _extends3), ariaNavigation && {
|
|
83
|
+
onKeyDown: onKeyDown,
|
|
84
|
+
tabIndex: opened[key] ? 0 : -1
|
|
85
|
+
});
|
|
86
|
+
}, [opened]);
|
|
87
|
+
return useMemo(function () {
|
|
88
|
+
return {
|
|
89
|
+
register: register,
|
|
90
|
+
registered: registered,
|
|
91
|
+
opened: opened,
|
|
92
|
+
toggle: toggle,
|
|
93
|
+
setOpened: setOpened
|
|
94
|
+
};
|
|
95
|
+
}, [opened]);
|
|
96
|
+
}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import Grid from '@material-ui/core/Grid';
|
|
6
|
-
export var Bottom = function Bottom(_ref) {
|
|
7
|
-
var children = _ref.children,
|
|
8
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
9
|
-
|
|
10
|
-
return /*#__PURE__*/React.createElement(Grid, _extends({
|
|
11
|
-
container: true
|
|
12
|
-
}, props), children);
|
|
13
|
-
};
|
|
1
|
+
import Bottom from '@digigov/react-core/Bottom';
|
|
2
|
+
export { Bottom };
|
|
3
|
+
export default Bottom;
|
|
@@ -1,55 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
root: {
|
|
14
|
-
marginBottom: theme.spacing(2)
|
|
1
|
+
import CoreContainer from '@digigov/react-core/Container';
|
|
2
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
+
export var Content = withDeprecation(CoreContainer, {
|
|
4
|
+
name: 'Content',
|
|
5
|
+
rename: 'Container',
|
|
6
|
+
props: {
|
|
7
|
+
maxWidth: {
|
|
8
|
+
error: true
|
|
9
|
+
},
|
|
10
|
+
flex: {
|
|
11
|
+
error: true
|
|
15
12
|
},
|
|
16
13
|
dense: {
|
|
17
|
-
|
|
14
|
+
error: true
|
|
18
15
|
}
|
|
19
|
-
}
|
|
20
|
-
}, {
|
|
21
|
-
name: 'MuiBasicLayoutContent'
|
|
16
|
+
}
|
|
22
17
|
});
|
|
23
|
-
export
|
|
24
|
-
var children = _ref.children,
|
|
25
|
-
className = _ref.className,
|
|
26
|
-
_ref$flex = _ref.flex,
|
|
27
|
-
flex = _ref$flex === void 0 ? 1 : _ref$flex,
|
|
28
|
-
_ref$dense = _ref.dense,
|
|
29
|
-
dense = _ref$dense === void 0 ? false : _ref$dense,
|
|
30
|
-
maxWidth = _ref.maxWidth,
|
|
31
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
|
|
33
|
-
// modify direction in order for main/side to shrink in mobile screens
|
|
34
|
-
var theme = useTheme();
|
|
35
|
-
var matches = useMediaQuery(theme.breakpoints.up('sm'));
|
|
36
|
-
var direction = useMemo(function () {
|
|
37
|
-
return matches ? 'row' : 'column';
|
|
38
|
-
}, [matches]);
|
|
39
|
-
var styles = useContentStyles();
|
|
40
|
-
return /*#__PURE__*/React.createElement(Container, {
|
|
41
|
-
className: clsx(styles.root, dense && styles.dense, className),
|
|
42
|
-
style: {
|
|
43
|
-
flex: flex
|
|
44
|
-
},
|
|
45
|
-
maxWidth: maxWidth
|
|
46
|
-
}, /*#__PURE__*/React.createElement(Grid, _extends({
|
|
47
|
-
style: {
|
|
48
|
-
flex: flex
|
|
49
|
-
},
|
|
50
|
-
container: true,
|
|
51
|
-
alignContent: "stretch",
|
|
52
|
-
spacing: 4,
|
|
53
|
-
direction: direction
|
|
54
|
-
}, props), children));
|
|
55
|
-
};
|
|
18
|
+
export default Content;
|
|
@@ -12,7 +12,7 @@ import StylesDoc from '@docs-components/stylesDoc';
|
|
|
12
12
|
```jsx live path=layouts/Basic/index.tsx
|
|
13
13
|
import Header, { HeaderTitle } from '@digigov/ui/app/Header';
|
|
14
14
|
import GovGRLogo from '@digigov/ui/govgr/Logo';
|
|
15
|
-
import Grid from '@
|
|
15
|
+
import Grid from '@digigov/react-core/Grid';
|
|
16
16
|
import Paragraph from '@digigov/ui/typography/Paragraph';
|
|
17
17
|
|
|
18
18
|
function Side{
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import Grid from '@material-ui/core/Grid';
|
|
6
|
-
/**
|
|
7
|
-
* The *Main* section of the layout.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export var Main = function Main(_ref) {
|
|
11
|
-
var children = _ref.children,
|
|
12
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
-
|
|
14
|
-
return /*#__PURE__*/React.createElement(Grid, _extends({
|
|
15
|
-
zeroMinWidth: true,
|
|
16
|
-
id: props.id || 'content',
|
|
17
|
-
item: true,
|
|
18
|
-
xs: 12,
|
|
19
|
-
md: 8
|
|
20
|
-
}, props), children);
|
|
21
|
-
};
|
|
1
|
+
import Main from '@digigov/react-core/Main';
|
|
2
|
+
export { Main };
|
|
3
|
+
export default Main;
|
|
@@ -1,47 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { Content } from '@digigov/ui/layouts/Basic';
|
|
6
|
-
import { makeStyles } from '@material-ui/core';
|
|
7
|
-
import clsx from 'clsx';
|
|
8
|
-
var useMastheadStyles = makeStyles(function (theme) {
|
|
9
|
-
return {
|
|
10
|
-
banner: {
|
|
11
|
-
backgroundColor: theme.palette.secondary.main,
|
|
12
|
-
color: theme.palette.common.white,
|
|
13
|
-
padding: theme.spacing(2, 0),
|
|
14
|
-
width: '100%'
|
|
15
|
-
},
|
|
16
|
-
bannerTitle: {
|
|
17
|
-
margin: theme.spacing(0, 0, 1, 0)
|
|
18
|
-
},
|
|
19
|
-
grey: {
|
|
20
|
-
backgroundColor: theme.palette.grey['300'],
|
|
21
|
-
color: theme.palette.getContrastText(theme.palette.grey['300'])
|
|
22
|
-
},
|
|
23
|
-
button: {
|
|
24
|
-
backgroundColor: theme.palette.success.main,
|
|
25
|
-
'&:hover': {
|
|
26
|
-
backgroundColor: theme.palette.success.dark
|
|
27
|
-
},
|
|
28
|
-
border: "1px solid ".concat(theme.palette.grey['500'])
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}, {
|
|
32
|
-
name: 'MuiMasthead'
|
|
33
|
-
});
|
|
34
|
-
export var Masthead = function Masthead(_ref) {
|
|
35
|
-
var children = _ref.children,
|
|
36
|
-
className = _ref.className,
|
|
37
|
-
_ref$variant = _ref.variant,
|
|
38
|
-
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
39
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
40
|
-
|
|
41
|
-
var classes = useMastheadStyles();
|
|
42
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className: clsx(className, classes.banner)
|
|
44
|
-
}, /*#__PURE__*/React.createElement(Content, _extends({
|
|
45
|
-
dense: true
|
|
46
|
-
}, props), children));
|
|
47
|
-
};
|
|
1
|
+
import Masthead from '@digigov/react-core/Masthead';
|
|
2
|
+
import MastheadBody from '@digigov/react-core/MastheadBody';
|
|
3
|
+
export { Masthead, MastheadBody };
|
|
4
|
+
export default Masthead;
|
|
@@ -13,7 +13,7 @@ import StylesDoc from '@docs-components/stylesDoc';
|
|
|
13
13
|
import PropsDoc from '@docs-components/propsDoc';
|
|
14
14
|
import Header, { HeaderTitle } from '@digigov/ui/app/Header';
|
|
15
15
|
import GovGRLogo from '@digigov/ui/govgr/Logo';
|
|
16
|
-
import Grid from '@
|
|
16
|
+
import Grid from '@digigov/react-core/Grid';
|
|
17
17
|
import Paragraph from '@digigov/ui/typography/Paragraph';
|
|
18
18
|
|
|
19
19
|
function Masthead{
|
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import Grid from '@material-ui/core/Grid';
|
|
7
|
-
import { makeStyles } from '@material-ui/core';
|
|
8
|
-
var useSideStyles = makeStyles(function (theme) {
|
|
9
|
-
return {
|
|
10
|
-
root: {
|
|
11
|
-
paddingTop: theme.spacing(1)
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
}, {
|
|
15
|
-
name: 'MuiBasicLayoutSide'
|
|
1
|
+
import Aside from '@digigov/react-core/Aside';
|
|
2
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
+
export var Side = withDeprecation(Aside, {
|
|
4
|
+
name: 'Side',
|
|
5
|
+
rename: 'Aside'
|
|
16
6
|
});
|
|
17
|
-
export
|
|
18
|
-
var children = _ref.children,
|
|
19
|
-
className = _ref.className,
|
|
20
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
-
|
|
22
|
-
var styles = useSideStyles();
|
|
23
|
-
return /*#__PURE__*/React.createElement(Grid, _extends({
|
|
24
|
-
className: clsx(className, styles.root),
|
|
25
|
-
item: true,
|
|
26
|
-
xs: 12,
|
|
27
|
-
md: 4
|
|
28
|
-
}, props), children);
|
|
29
|
-
};
|
|
7
|
+
export default Side;
|
|
@@ -1,40 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import clsx from 'clsx';
|
|
7
|
-
import { makeStyles } from '@material-ui/core';
|
|
8
|
-
var useTopStyles = makeStyles(function (theme) {
|
|
9
|
-
return {
|
|
10
|
-
root: {
|
|
11
|
-
marginBottom: theme.spacing(2)
|
|
12
|
-
},
|
|
1
|
+
import CoreTop from '@digigov/react-core/Top';
|
|
2
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
+
export var Top = withDeprecation(CoreTop, {
|
|
4
|
+
name: 'Top',
|
|
5
|
+
props: {
|
|
13
6
|
dense: {
|
|
14
|
-
|
|
7
|
+
error: true
|
|
15
8
|
}
|
|
16
|
-
}
|
|
17
|
-
}, {
|
|
18
|
-
name: 'MuiBasicLayoutTop'
|
|
9
|
+
}
|
|
19
10
|
});
|
|
20
|
-
/**
|
|
21
|
-
* The *Top* section of the layout.
|
|
22
|
-
*
|
|
23
|
-
* Top section covers the full width of the page. Suggested height of the
|
|
24
|
-
* elements inside the section is 50-100px.
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
export var Top = function Top(_ref) {
|
|
28
|
-
var children = _ref.children,
|
|
29
|
-
_ref$dense = _ref.dense,
|
|
30
|
-
dense = _ref$dense === void 0 ? false : _ref$dense,
|
|
31
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
|
|
33
|
-
var classes = useTopStyles();
|
|
34
|
-
return /*#__PURE__*/React.createElement(Grid, _extends({
|
|
35
|
-
container: true
|
|
36
|
-
}, props, {
|
|
37
|
-
className: clsx(props.className, classes.root, dense && classes.dense)
|
|
38
|
-
}), children);
|
|
39
|
-
};
|
|
40
11
|
export default Top;
|