@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,54 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
var _excluded = ["skipToContentLabel", "children"];
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { makeStyles } from '@material-ui/core';
|
|
5
|
-
export var useLayoutStyles = makeStyles(function () {
|
|
6
|
-
return {
|
|
7
|
-
root: {
|
|
8
|
-
display: 'flex',
|
|
9
|
-
flexDirection: 'column',
|
|
10
|
-
flexWrap: 'wrap',
|
|
11
|
-
minHeight: '100vh'
|
|
12
|
-
},
|
|
13
|
-
skipToContent: {
|
|
14
|
-
display: 'inline-block',
|
|
15
|
-
position: 'absolute',
|
|
16
|
-
left: '-9999em',
|
|
17
|
-
'&:focus': {
|
|
18
|
-
left: 0,
|
|
19
|
-
zIndex: 1
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
}, {
|
|
24
|
-
name: 'MuiBasicLayout'
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* *Layout* component for the basic layout.
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
export var Layout = function Layout(_ref) {
|
|
32
|
-
var _ref$skipToContentLab = _ref.skipToContentLabel,
|
|
33
|
-
skipToContentLabel = _ref$skipToContentLab === void 0 ? 'skip to nav' : _ref$skipToContentLab,
|
|
34
|
-
children = _ref.children,
|
|
35
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
-
|
|
37
|
-
var styles = useLayoutStyles({
|
|
38
|
-
props: props
|
|
39
|
-
});
|
|
40
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("a", {
|
|
41
|
-
className: styles.skipToContent,
|
|
42
|
-
href: "#content"
|
|
43
|
-
}, skipToContentLabel), /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
className: styles.root
|
|
45
|
-
}, children));
|
|
46
|
-
};
|
|
47
|
-
var BasicLayout = Layout;
|
|
48
|
-
export default BasicLayout;
|
|
1
|
+
import Layout from '@digigov/react-core/Layout';
|
|
49
2
|
export * from '@digigov/ui/layouts/Basic/Top';
|
|
50
3
|
export * from '@digigov/ui/layouts/Basic/Side';
|
|
51
4
|
export * from '@digigov/ui/layouts/Basic/Main';
|
|
52
5
|
export * from '@digigov/ui/layouts/Basic/Content';
|
|
53
6
|
export * from '@digigov/ui/layouts/Basic/Bottom';
|
|
54
|
-
export * from '@digigov/ui/layouts/Basic/Masthead';
|
|
7
|
+
export * from '@digigov/ui/layouts/Basic/Masthead';
|
|
8
|
+
export default Layout;
|
package/es/themes/grnet.js
CHANGED
|
@@ -8,7 +8,7 @@ import Title from '@digigov/ui/typography/Title';
|
|
|
8
8
|
import Container from '@material-ui/core/Container';
|
|
9
9
|
import Toolbar from '@material-ui/core/Toolbar';
|
|
10
10
|
import Typography from '@material-ui/core/Typography';
|
|
11
|
-
import Grid from '@
|
|
11
|
+
import Grid from '@digigov/react-core/Grid';
|
|
12
12
|
import MuiAppBar from '@material-ui/core/AppBar';
|
|
13
13
|
var useStyles = makeStyles(function (theme) {
|
|
14
14
|
return {
|
package/es/typography/Caption.js
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var useStyles = makeStyles(function () {
|
|
7
|
-
return {
|
|
8
|
-
caption: {
|
|
9
|
-
color: '#4d4d4d',
|
|
10
|
-
fontWeight: 'normal'
|
|
11
|
-
}
|
|
12
|
-
};
|
|
1
|
+
import HeadingCaption from '@digigov/react-core/HeadingCaption';
|
|
2
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
+
export var Caption = withDeprecation(HeadingCaption, {
|
|
4
|
+
name: 'Caption',
|
|
5
|
+
rename: 'HeadingCaption'
|
|
13
6
|
});
|
|
14
|
-
export var Caption = function Caption(_ref) {
|
|
15
|
-
var props = _extends({}, _ref);
|
|
16
|
-
|
|
17
|
-
var classes = useStyles(props);
|
|
18
|
-
return /*#__PURE__*/React.createElement(Typography, {
|
|
19
|
-
className: clsx(props.className, classes.caption),
|
|
20
|
-
variant: "h6"
|
|
21
|
-
}, props.children);
|
|
22
|
-
};
|
|
23
7
|
export default Caption;
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import Typography from '@material-ui/core/Typography';
|
|
5
|
-
export var NormalText = function NormalText(props) {
|
|
6
|
-
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
7
|
-
component: "span",
|
|
8
|
-
variant: "body1"
|
|
9
|
-
}, props), props.children);
|
|
10
|
-
};
|
|
1
|
+
import NormalText from '@digigov/react-core/NormalText';
|
|
2
|
+
export { NormalText };
|
|
11
3
|
export default NormalText;
|
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["paragraph"];
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
6
|
-
import Typography from '@material-ui/core/Typography';
|
|
7
|
-
export var useParagraphStyles = makeStyles(function (theme) {
|
|
8
|
-
return {
|
|
9
|
-
paragraph: {
|
|
10
|
-
// here be thy styles
|
|
11
|
-
margin: theme.spacing(0, 0, 2),
|
|
12
|
-
marginBottom: theme.spacing(4)
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
}, {
|
|
16
|
-
name: 'MuiParagraph'
|
|
17
|
-
});
|
|
18
|
-
;
|
|
19
|
-
export var Paragraph = function Paragraph(props) {
|
|
20
|
-
var _useParagraphStyles = useParagraphStyles(),
|
|
21
|
-
paragraph = _useParagraphStyles.paragraph,
|
|
22
|
-
classes = _objectWithoutProperties(_useParagraphStyles, _excluded);
|
|
23
|
-
|
|
24
|
-
return /*#__PURE__*/React.createElement(Typography, _extends({
|
|
25
|
-
className: paragraph,
|
|
26
|
-
variant: "body1",
|
|
27
|
-
classes: classes
|
|
28
|
-
}, props), props.children);
|
|
29
|
-
};
|
|
1
|
+
import Paragraph from '@digigov/react-core/Paragraph';
|
|
30
2
|
export default Paragraph;
|
package/es/typography/Title.js
CHANGED
|
@@ -1,95 +1,48 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
|
|
4
|
-
var _excluded = ["size", "children", "dense", "classes", "component"],
|
|
5
|
-
_excluded2 = ["className"];
|
|
3
|
+
var _excluded = ["size", "component", "children"];
|
|
6
4
|
import React from 'react';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
var
|
|
10
|
-
|
|
5
|
+
import Heading from '@digigov/react-core/Heading';
|
|
6
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
7
|
+
var sizeMappings = {
|
|
8
|
+
xl: 'xl',
|
|
9
|
+
lg: 'l',
|
|
10
|
+
md: 'm',
|
|
11
|
+
sm: 's'
|
|
12
|
+
};
|
|
13
|
+
export var Title = withDeprecation(function (_ref) {
|
|
14
|
+
var _ref$size = _ref.size,
|
|
15
|
+
size = _ref$size === void 0 ? 'xl' : _ref$size,
|
|
16
|
+
component = _ref.component,
|
|
17
|
+
children = _ref.children,
|
|
18
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
19
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
fontSize: '2.25rem'
|
|
24
|
-
},
|
|
25
|
-
md: {
|
|
26
|
-
margin: theme.spacing(0, 0, 3, 0),
|
|
27
|
-
fontSize: '1.5rem'
|
|
28
|
-
},
|
|
29
|
-
sm: {
|
|
30
|
-
margin: theme.spacing(0, 0, 2, 0),
|
|
31
|
-
fontSize: '1.2rem'
|
|
20
|
+
var newSize = sizeMappings[size];
|
|
21
|
+
return /*#__PURE__*/React.createElement(Heading, _extends({
|
|
22
|
+
size: newSize,
|
|
23
|
+
element: component
|
|
24
|
+
}, props), children);
|
|
25
|
+
}, {
|
|
26
|
+
name: 'Title',
|
|
27
|
+
rename: 'Heading',
|
|
28
|
+
props: {
|
|
29
|
+
dense: {
|
|
30
|
+
error: true
|
|
32
31
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
size: {
|
|
33
|
+
values: {
|
|
34
|
+
xs: {
|
|
35
|
+
error: true
|
|
36
|
+
}
|
|
37
|
+
}
|
|
36
38
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
component: {
|
|
40
|
+
values: {
|
|
41
|
+
h5: {
|
|
42
|
+
error: true
|
|
43
|
+
}
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
|
-
};
|
|
41
|
-
}, {
|
|
42
|
-
name: 'MuiDigigovTitle'
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
var getComponentBySize = function getComponentBySize(size) {
|
|
46
|
-
switch (size) {
|
|
47
|
-
case 'xl':
|
|
48
|
-
return 'h1';
|
|
49
|
-
|
|
50
|
-
case 'lg':
|
|
51
|
-
return 'h2';
|
|
52
|
-
|
|
53
|
-
case 'md':
|
|
54
|
-
return 'h3';
|
|
55
|
-
|
|
56
|
-
case 'sm':
|
|
57
|
-
return 'h4';
|
|
58
|
-
|
|
59
|
-
case 'xs':
|
|
60
|
-
return 'h5';
|
|
61
|
-
|
|
62
|
-
default:
|
|
63
|
-
return 'h4';
|
|
64
46
|
}
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
var Title = function Title(_ref, ref) {
|
|
68
|
-
var size = _ref.size,
|
|
69
|
-
children = _ref.children,
|
|
70
|
-
dense = _ref.dense,
|
|
71
|
-
classesObj = _ref.classes,
|
|
72
|
-
component = _ref.component,
|
|
73
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
74
|
-
|
|
75
|
-
var classes = useStyles({
|
|
76
|
-
classes: classesObj
|
|
77
|
-
});
|
|
78
|
-
var cls = classes[size || 'sm'];
|
|
79
|
-
var Tag = component || getComponentBySize(size);
|
|
80
|
-
|
|
81
|
-
var className = props.className,
|
|
82
|
-
otherProps = _objectWithoutProperties(props, _excluded2);
|
|
83
|
-
|
|
84
|
-
return /*#__PURE__*/React.createElement(Tag, _extends({
|
|
85
|
-
ref: ref,
|
|
86
|
-
className: clsx(className, classes.root, cls, dense && classes.dense)
|
|
87
|
-
}, otherProps), children);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
var RefTitle = /*#__PURE__*/React.forwardRef(Title);
|
|
91
|
-
RefTitle.defaultProps = {
|
|
92
|
-
size: 'sm',
|
|
93
|
-
dense: false
|
|
94
|
-
};
|
|
95
|
-
export default RefTitle;
|
|
47
|
+
});
|
|
48
|
+
export default Title;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
|
|
6
|
+
|
|
7
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
|
+
|
|
9
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
+
|
|
11
|
+
import React from 'react';
|
|
12
|
+
|
|
13
|
+
var DigigovError = /*#__PURE__*/function (_Error) {
|
|
14
|
+
_inherits(DigigovError, _Error);
|
|
15
|
+
|
|
16
|
+
var _super = _createSuper(DigigovError);
|
|
17
|
+
|
|
18
|
+
function DigigovError(message) {
|
|
19
|
+
var _this;
|
|
20
|
+
|
|
21
|
+
_classCallCheck(this, DigigovError);
|
|
22
|
+
|
|
23
|
+
_this = _super.call(this, message); // (1)
|
|
24
|
+
|
|
25
|
+
_this.name = 'DigigovError'; // (2)
|
|
26
|
+
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return DigigovError;
|
|
31
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
32
|
+
|
|
33
|
+
var loggedDeprecations = new Set();
|
|
34
|
+
|
|
35
|
+
var handleErrorWarning = function handleErrorWarning(componentName, name, _ref, type) {
|
|
36
|
+
var error = _ref.error,
|
|
37
|
+
warning = _ref.warning;
|
|
38
|
+
|
|
39
|
+
if (warning === true) {
|
|
40
|
+
console.warn("\u26A0\uFE0F ".concat(componentName, ": ").concat(name, " ").concat(type, " will be deprecated."));
|
|
41
|
+
} else if (typeof warning === 'string') {
|
|
42
|
+
console.warn(warning);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (error === true) {
|
|
46
|
+
throw new DigigovError("".concat(componentName, ": !! ").concat(name, " ").concat(type, " is deprecated."));
|
|
47
|
+
} else if (typeof error === 'string') {
|
|
48
|
+
throw new DigigovError("Component `".concat(componentName, "` with `").concat(name, "` prop: ").concat(error));
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default function withDeprecation(Component, deprecations) {
|
|
53
|
+
var _Component$render;
|
|
54
|
+
|
|
55
|
+
var componentName = // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
deprecations.name || Component.name || (Component === null || Component === void 0 ? void 0 : (_Component$render = Component.render) === null || _Component$render === void 0 ? void 0 : _Component$render.name);
|
|
58
|
+
|
|
59
|
+
if (loggedDeprecations.has(componentName)) {
|
|
60
|
+
return Component;
|
|
61
|
+
} else {
|
|
62
|
+
loggedDeprecations.add(componentName);
|
|
63
|
+
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
return function withDeprecationComponent(props) {
|
|
68
|
+
if (deprecations.rename) {
|
|
69
|
+
console.warn("\u267B\uFE0F ".concat(componentName, " is renamed to ").concat(deprecations.rename, "\n"));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
handleErrorWarning(componentName, componentName, deprecations, 'component');
|
|
73
|
+
|
|
74
|
+
if (deprecations.props) {
|
|
75
|
+
Object.keys(deprecations.props).forEach(function (propName) {
|
|
76
|
+
var _deprecations$props, _propDeprecation$valu;
|
|
77
|
+
|
|
78
|
+
var value = props[propName];
|
|
79
|
+
|
|
80
|
+
if (!value) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
var propDeprecation = deprecations === null || deprecations === void 0 ? void 0 : (_deprecations$props = deprecations.props) === null || _deprecations$props === void 0 ? void 0 : _deprecations$props[propName];
|
|
85
|
+
|
|
86
|
+
if (propDeprecation !== null && propDeprecation !== void 0 && (_propDeprecation$valu = propDeprecation.values) !== null && _propDeprecation$valu !== void 0 && _propDeprecation$valu[value]) {
|
|
87
|
+
var _propDeprecation$valu2;
|
|
88
|
+
|
|
89
|
+
return handleErrorWarning(componentName, "".concat(propName, " ").concat(value), propDeprecation === null || propDeprecation === void 0 ? void 0 : (_propDeprecation$valu2 = propDeprecation.values) === null || _propDeprecation$valu2 === void 0 ? void 0 : _propDeprecation$valu2[value], 'property value');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (propDeprecation !== null && propDeprecation !== void 0 && propDeprecation.error || propDeprecation !== null && propDeprecation !== void 0 && propDeprecation.warning) {
|
|
93
|
+
return handleErrorWarning(componentName, propName, propDeprecation, 'property');
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
97
|
+
// @ts-ignore
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
return /*#__PURE__*/React.createElement(Component, props);
|
|
101
|
+
};
|
|
102
|
+
}
|
package/esm/app/App.js
CHANGED
|
@@ -5,25 +5,23 @@ export var useAppStyles = makeStyles({
|
|
|
5
5
|
root: {}
|
|
6
6
|
});
|
|
7
7
|
|
|
8
|
-
var _ref2 = /*#__PURE__*/React.createElement(CssBaseline, null);
|
|
9
|
-
|
|
10
8
|
var App = function App(_ref) {
|
|
11
9
|
var theme = _ref.theme,
|
|
12
10
|
children = _ref.children;
|
|
13
11
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
14
12
|
theme: theme
|
|
15
|
-
},
|
|
13
|
+
}, /*#__PURE__*/React.createElement(Suspense, {
|
|
16
14
|
fallback: 'loading...'
|
|
17
15
|
}, children));
|
|
18
16
|
};
|
|
19
17
|
|
|
20
|
-
var
|
|
18
|
+
var _ref3 = /*#__PURE__*/React.createElement(CssBaseline, null);
|
|
21
19
|
|
|
22
|
-
export var StaticApp = function StaticApp(
|
|
23
|
-
var theme =
|
|
24
|
-
children =
|
|
20
|
+
export var StaticApp = function StaticApp(_ref2) {
|
|
21
|
+
var theme = _ref2.theme,
|
|
22
|
+
children = _ref2.children;
|
|
25
23
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
26
24
|
theme: theme
|
|
27
|
-
},
|
|
25
|
+
}, _ref3, children);
|
|
28
26
|
};
|
|
29
27
|
export default App;
|
|
@@ -1,32 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import CoreHeaderLogo from '@digigov/react-core/HeaderLogo';
|
|
2
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
+
export var HeaderLogo = withDeprecation(CoreHeaderLogo, {
|
|
4
|
+
name: 'HeaderLogo',
|
|
5
|
+
props: {
|
|
6
|
+
height: {
|
|
7
|
+
warning: true
|
|
8
|
+
},
|
|
9
|
+
linkprops: {
|
|
10
|
+
warning: true
|
|
11
|
+
},
|
|
12
|
+
label: {
|
|
13
|
+
warning: true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
11
16
|
});
|
|
12
|
-
export var HeaderLogo = function HeaderLogo(_ref) {
|
|
13
|
-
var _ref$href = _ref.href,
|
|
14
|
-
href = _ref$href === void 0 ? '' : _ref$href,
|
|
15
|
-
src = _ref.src,
|
|
16
|
-
label = _ref.label,
|
|
17
|
-
height = _ref.height,
|
|
18
|
-
className = _ref.className,
|
|
19
|
-
children = _ref.children,
|
|
20
|
-
linkProps = _ref.linkProps;
|
|
21
|
-
var styles = useHeaderLogoStyles();
|
|
22
|
-
return /*#__PURE__*/React.createElement(HeaderTitle, {
|
|
23
|
-
linkComponent: "a",
|
|
24
|
-
href: href,
|
|
25
|
-
linkProps: linkProps,
|
|
26
|
-
className: clsx(className, styles.root)
|
|
27
|
-
}, src ? /*#__PURE__*/React.createElement("img", {
|
|
28
|
-
src: src,
|
|
29
|
-
height: height || 40
|
|
30
|
-
}) : children || label || '');
|
|
31
|
-
};
|
|
32
17
|
export default HeaderLogo;
|
|
@@ -1,38 +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
|
-
export var useHeaderSectionStyles = makeStyles(function (theme) {
|
|
9
|
-
return {
|
|
10
|
-
root: {
|
|
11
|
-
display: 'flex',
|
|
12
|
-
alignItems: 'center',
|
|
13
|
-
padding: theme.spacing(2, 0)
|
|
14
|
-
},
|
|
15
|
-
container: {
|
|
16
|
-
padding: theme.spacing(2, 0)
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}, {
|
|
20
|
-
name: 'MuiHeaderSection'
|
|
1
|
+
import CoreHeaderSection from '@digigov/react-core/HeaderSection';
|
|
2
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
+
export var HeaderSection = withDeprecation(CoreHeaderSection, {
|
|
4
|
+
name: 'HeaderSection',
|
|
5
|
+
rename: 'HeaderSection'
|
|
21
6
|
});
|
|
22
|
-
export var HeaderSection = function HeaderSection(_ref) {
|
|
23
|
-
var children = _ref.children,
|
|
24
|
-
className = _ref.className,
|
|
25
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
-
|
|
27
|
-
var styles = useHeaderSectionStyles();
|
|
28
|
-
return /*#__PURE__*/React.createElement(Grid, _extends({
|
|
29
|
-
item: true,
|
|
30
|
-
className: clsx(className, styles.root)
|
|
31
|
-
}, props), /*#__PURE__*/React.createElement(Grid, {
|
|
32
|
-
container: true,
|
|
33
|
-
alignItems: "center",
|
|
34
|
-
spacing: 2,
|
|
35
|
-
className: styles.container
|
|
36
|
-
}, children));
|
|
37
|
-
};
|
|
38
7
|
export default HeaderSection;
|
|
@@ -1,82 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import Title from '@digigov/ui/typography/Title';
|
|
9
|
-
import Link from '@digigov/ui/core/Link';
|
|
10
|
-
import Grid from '@material-ui/core/Grid';
|
|
11
|
-
import { makeStyles } from '@material-ui/core';
|
|
12
|
-
export var useHeaderTitleStyles = makeStyles(function (theme) {
|
|
13
|
-
return {
|
|
14
|
-
link: {},
|
|
15
|
-
grid: {
|
|
16
|
-
display: 'flex',
|
|
17
|
-
alignItems: 'center'
|
|
1
|
+
import CoreHeaderTitle from '@digigov/react-core/HeaderTitle';
|
|
2
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
+
export var HeaderTitle = withDeprecation(CoreHeaderTitle, {
|
|
4
|
+
name: 'Header',
|
|
5
|
+
props: {
|
|
6
|
+
xs: {
|
|
7
|
+
error: true
|
|
18
8
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
lineHeight: '1.5rem'
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}, {
|
|
28
|
-
name: 'MuiHeaderTitle'
|
|
29
|
-
});
|
|
30
|
-
export var HeaderTitle = function HeaderTitle(_ref) {
|
|
31
|
-
var children = _ref.children,
|
|
32
|
-
className = _ref.className,
|
|
33
|
-
_ref$href = _ref.href,
|
|
34
|
-
href = _ref$href === void 0 ? '/' : _ref$href,
|
|
35
|
-
_ref$linkComponent = _ref.linkComponent,
|
|
36
|
-
linkComponent = _ref$linkComponent === void 0 ? Link : _ref$linkComponent,
|
|
37
|
-
linkProps = _ref.linkProps,
|
|
38
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
39
|
-
|
|
40
|
-
var styles = useHeaderTitleStyles(props);
|
|
41
|
-
var xs = props.xs === undefined ? 'auto' : props.xs;
|
|
42
|
-
return /*#__PURE__*/React.createElement(Grid, {
|
|
43
|
-
item: true,
|
|
44
|
-
xs: xs,
|
|
45
|
-
className: clsx(className, styles.grid)
|
|
46
|
-
}, /*#__PURE__*/React.createElement(MuiButton, _extends({
|
|
47
|
-
className: styles.link,
|
|
48
|
-
disableRipple: true,
|
|
49
|
-
component: linkComponent,
|
|
50
|
-
href: href
|
|
51
|
-
}, linkProps), /*#__PURE__*/React.createElement(Title, {
|
|
52
|
-
className: styles.root,
|
|
53
|
-
size: "md"
|
|
54
|
-
}, children)));
|
|
55
|
-
};
|
|
56
|
-
export var useHeaderSubtitleStyles = makeStyles(function (theme) {
|
|
57
|
-
return {
|
|
58
|
-
root: {
|
|
59
|
-
marginLeft: theme.spacing(1),
|
|
60
|
-
fontSize: '1.2rem',
|
|
61
|
-
'& a': {
|
|
62
|
-
color: theme.palette.common.white,
|
|
63
|
-
'&:visited': {
|
|
64
|
-
color: theme.palette.common.white
|
|
65
|
-
}
|
|
66
|
-
}
|
|
9
|
+
linkProps: {
|
|
10
|
+
error: 'The `linkProps` property is deprecated. You can use native anchor link props instead.'
|
|
11
|
+
},
|
|
12
|
+
linkComponent: {
|
|
13
|
+
error: 'The `linkComponent` property is deprecated.'
|
|
67
14
|
}
|
|
68
|
-
}
|
|
69
|
-
}, {
|
|
70
|
-
name: 'MuiHeaderSubtitle'
|
|
15
|
+
}
|
|
71
16
|
});
|
|
72
|
-
export var HeaderSubtitle = function HeaderSubtitle(_ref2) {
|
|
73
|
-
var children = _ref2.children,
|
|
74
|
-
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
75
|
-
|
|
76
|
-
var styles = useHeaderSubtitleStyles(props);
|
|
77
|
-
return /*#__PURE__*/React.createElement(Grid, {
|
|
78
|
-
item: true,
|
|
79
|
-
className: styles.root
|
|
80
|
-
}, children);
|
|
81
|
-
};
|
|
82
17
|
export default HeaderTitle;
|
package/esm/app/Header/index.js
CHANGED
|
@@ -1,61 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import Container from '@material-ui/core/Container';
|
|
7
|
-
import AppBar from '@material-ui/core/AppBar';
|
|
8
|
-
import Toolbar from '@material-ui/core/Toolbar';
|
|
9
|
-
import { makeStyles, useTheme } from '@material-ui/core';
|
|
10
|
-
import useMediaQuery from '@material-ui/core/useMediaQuery';
|
|
11
|
-
export var useHeaderStyles = makeStyles(function (theme) {
|
|
12
|
-
return {
|
|
13
|
-
root: {
|
|
14
|
-
backgroundColor: theme.palette.primary.main
|
|
15
|
-
},
|
|
16
|
-
toolbar: {
|
|
17
|
-
minHeight: 75
|
|
18
|
-
},
|
|
19
|
-
coloredBar: {
|
|
20
|
-
background: theme.palette.secondary.main,
|
|
21
|
-
width: '100%',
|
|
22
|
-
height: theme.spacing(1),
|
|
23
|
-
marginLeft: 'auto',
|
|
24
|
-
marginRight: 'auto'
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}, {
|
|
28
|
-
name: 'MuiHeader'
|
|
1
|
+
import CoreHeader from '@digigov/react-core/Header';
|
|
2
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
+
export var Header = withDeprecation(CoreHeader, {
|
|
4
|
+
name: 'Header',
|
|
5
|
+
props: {}
|
|
29
6
|
});
|
|
30
|
-
export var Header = function Header(_ref) {
|
|
31
|
-
var children = _ref.children,
|
|
32
|
-
className = _ref.className,
|
|
33
|
-
maxWidth = _ref.maxWidth,
|
|
34
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
35
|
-
|
|
36
|
-
var styles = useHeaderStyles(props);
|
|
37
|
-
var theme = useTheme();
|
|
38
|
-
var xs = useMediaQuery(theme.breakpoints.down('xs'));
|
|
39
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AppBar, {
|
|
40
|
-
elevation: 0,
|
|
41
|
-
className: clsx(styles.root, className),
|
|
42
|
-
position: "static"
|
|
43
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
44
|
-
maxWidth: maxWidth
|
|
45
|
-
}, /*#__PURE__*/React.createElement(Toolbar, {
|
|
46
|
-
variant: "dense",
|
|
47
|
-
disableGutters: true,
|
|
48
|
-
className: styles.toolbar
|
|
49
|
-
}, /*#__PURE__*/React.createElement(Grid, {
|
|
50
|
-
container: true,
|
|
51
|
-
alignItems: "center",
|
|
52
|
-
justify: xs ? 'space-between' : 'flex-start',
|
|
53
|
-
spacing: 1
|
|
54
|
-
}, children))), /*#__PURE__*/React.createElement("div", {
|
|
55
|
-
className: styles.coloredBar
|
|
56
|
-
})));
|
|
57
|
-
};
|
|
58
7
|
export * from '@digigov/ui/app/Header/HeaderTitle';
|
|
8
|
+
export * from '@digigov/react-core/HeaderSubtitle';
|
|
59
9
|
export * from '@digigov/ui/app/Header/HeaderLogo';
|
|
60
10
|
export * from '@digigov/ui/app/Header/HeaderSection';
|
|
61
11
|
export default Header;
|