@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
|
@@ -8,7 +8,6 @@ import Header, { HeaderTitle, HeaderSubtitle, HeaderLogo } from '@digigov/ui/app
|
|
|
8
8
|
|
|
9
9
|
var _ref = /*#__PURE__*/React.createElement(Header, null, /*#__PURE__*/React.createElement(HeaderLogo, {
|
|
10
10
|
src: logo,
|
|
11
|
-
height: '50',
|
|
12
11
|
href: "https://gov.gr"
|
|
13
12
|
}), /*#__PURE__*/React.createElement(HeaderTitle, {
|
|
14
13
|
href: "/some-url"
|
package/esm/app/PageTitle.js
CHANGED
|
@@ -1,85 +1,57 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["
|
|
4
|
-
_excluded2 = ["children"],
|
|
5
|
-
_excluded3 = ["children"],
|
|
6
|
-
_excluded4 = ["children", "className", "dense"],
|
|
7
|
-
_excluded5 = ["dense"];
|
|
3
|
+
var _excluded = ["component", "children"];
|
|
8
4
|
import React from 'react';
|
|
9
|
-
import clsx from 'clsx';
|
|
10
5
|
import Caption from '@digigov/ui/typography/Caption';
|
|
11
6
|
import Title from '@digigov/ui/typography/Title';
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
return
|
|
16
|
-
preserveHeight: {
|
|
17
|
-
maxWidth: '100vh'
|
|
18
|
-
},
|
|
19
|
-
root: {
|
|
20
|
-
margin: theme.spacing(3, 0)
|
|
21
|
-
}
|
|
22
|
-
};
|
|
7
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
8
|
+
export var PageTitle = withDeprecation(function (_ref) {
|
|
9
|
+
var children = _ref.children;
|
|
10
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
23
11
|
}, {
|
|
24
|
-
name: '
|
|
12
|
+
name: 'PageTitle',
|
|
13
|
+
warning: 'There is no need to use PageTitle components anymore. It will be removed in a later version'
|
|
25
14
|
});
|
|
26
|
-
export var PageTitle = function PageTitle(_ref) {
|
|
27
|
-
var children = _ref.children,
|
|
28
|
-
_ref$preserveHeight = _ref.preserveHeight,
|
|
29
|
-
preserveHeight = _ref$preserveHeight === void 0 ? true : _ref$preserveHeight,
|
|
30
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
-
|
|
32
|
-
var styles = usePageTitleStyles(props);
|
|
33
|
-
return /*#__PURE__*/React.createElement(Grid, _extends({
|
|
34
|
-
container: true,
|
|
35
|
-
className: clsx(styles.root, preserveHeight && styles.preserveHeight)
|
|
36
|
-
}, props), children);
|
|
37
|
-
};
|
|
38
15
|
export default PageTitle;
|
|
39
|
-
export var PageTitleSection = function
|
|
40
|
-
var children = _ref2.children
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return /*#__PURE__*/React.createElement(Grid, _extends({
|
|
44
|
-
container: true,
|
|
45
|
-
justify: "space-between"
|
|
46
|
-
}, props, {
|
|
47
|
-
className: clsx('MuiPageTitleSection', props.className)
|
|
48
|
-
}), children);
|
|
49
|
-
};
|
|
50
|
-
export var PageTitleCaption = function PageTitleCaption(_ref3) {
|
|
51
|
-
var children = _ref3.children,
|
|
52
|
-
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
53
|
-
|
|
54
|
-
return /*#__PURE__*/React.createElement(Caption, props, children);
|
|
55
|
-
};
|
|
56
|
-
var usePageTitleHeadingStyles = makeStyles(function (theme) {
|
|
57
|
-
return {
|
|
58
|
-
dense: {
|
|
59
|
-
margin: theme.spacing(0)
|
|
60
|
-
}
|
|
61
|
-
};
|
|
16
|
+
export var PageTitleSection = withDeprecation(function (_ref2) {
|
|
17
|
+
var children = _ref2.children;
|
|
18
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
62
19
|
}, {
|
|
63
|
-
name: '
|
|
20
|
+
name: 'PageTitleSection',
|
|
21
|
+
warning: 'There is no need to use PageTitleSection components anymore. It will be removed in a later version'
|
|
64
22
|
});
|
|
65
|
-
export var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
denseClass = _usePageTitleHeadingS.dense,
|
|
74
|
-
classes = _objectWithoutProperties(_usePageTitleHeadingS, _excluded5);
|
|
23
|
+
export var PageTitleCaption = withDeprecation(Caption, {
|
|
24
|
+
name: 'PageTitleCaption',
|
|
25
|
+
rename: 'Caption'
|
|
26
|
+
});
|
|
27
|
+
export var PageTitleHeading = withDeprecation(function (_ref3) {
|
|
28
|
+
var component = _ref3.component,
|
|
29
|
+
children = _ref3.children,
|
|
30
|
+
props = _objectWithoutProperties(_ref3, _excluded);
|
|
75
31
|
|
|
76
|
-
return /*#__PURE__*/React.createElement(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
32
|
+
return /*#__PURE__*/React.createElement(Title, _extends({
|
|
33
|
+
size: "xl",
|
|
34
|
+
element: component
|
|
35
|
+
}, props), children);
|
|
36
|
+
}, {
|
|
37
|
+
name: 'PageTitleHeading',
|
|
38
|
+
props: {
|
|
39
|
+
dense: {
|
|
40
|
+
error: true
|
|
41
|
+
},
|
|
42
|
+
size: {
|
|
43
|
+
values: {
|
|
44
|
+
xs: {
|
|
45
|
+
error: true
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
component: {
|
|
50
|
+
values: {
|
|
51
|
+
h5: {
|
|
52
|
+
error: true
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
@@ -1,55 +1,67 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';
|
|
6
|
-
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
|
|
7
|
-
import clsx from 'clsx';
|
|
8
|
-
export var AccordionItemDetails = function AccordionItemDetails(_ref) {
|
|
9
|
-
var children = _ref.children,
|
|
10
|
-
className = _ref.className;
|
|
11
|
-
return /*#__PURE__*/React.createElement(ExpansionPanelDetails, {
|
|
12
|
-
className: className
|
|
13
|
-
}, children);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
var _ref3 = /*#__PURE__*/React.createElement(ExpandMoreIcon, null);
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["register", "setOpened", "opened", "registered"];
|
|
17
5
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
root: {}
|
|
31
|
-
};
|
|
6
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
7
|
+
import Accordion from '@digigov/react-core/Accordion';
|
|
8
|
+
import AccordionSection from '@digigov/react-core/AccordionSection';
|
|
9
|
+
import AccordionSectionContent from '@digigov/react-core/AccordionSectionContent';
|
|
10
|
+
import AccordionSectionHeader from '@digigov/react-core/AccordionSectionHeader';
|
|
11
|
+
import AccordionControls from '@digigov/react-core/AccordionControls';
|
|
12
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
13
|
+
import { useTogglableSections } from '@digigov/ui/hooks/useTogglableSections';
|
|
14
|
+
import React, { useCallback, useMemo } from 'react';
|
|
15
|
+
export var AccordionItemDetails = withDeprecation(AccordionSectionContent, {
|
|
16
|
+
name: 'AccordionItemDetails',
|
|
17
|
+
rename: 'AccordionSectionContent'
|
|
32
18
|
});
|
|
33
|
-
export var
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return {
|
|
43
|
-
root: {
|
|
44
|
-
width: '100%'
|
|
45
|
-
}
|
|
46
|
-
};
|
|
19
|
+
export var AccordionItemSummary = withDeprecation(AccordionSectionHeader, {
|
|
20
|
+
name: 'AccordionItemSummary',
|
|
21
|
+
rename: 'AccordionSectionHeader'
|
|
22
|
+
});
|
|
23
|
+
export var AccordionItem = withDeprecation( /*#__PURE__*/React.memo(AccordionSection, function (prev, next) {
|
|
24
|
+
return prev.open === next.open;
|
|
25
|
+
}), {
|
|
26
|
+
name: 'AccordionItem',
|
|
27
|
+
rename: 'AccordionSection'
|
|
47
28
|
});
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
|
|
29
|
+
|
|
30
|
+
var useAccordion = function useAccordion(props) {
|
|
31
|
+
var _useTogglableSections = useTogglableSections({
|
|
32
|
+
toggleProperty: 'open',
|
|
33
|
+
onToggleProperty: 'onClick',
|
|
34
|
+
singleOpen: props && !!props.singleOpen
|
|
35
|
+
}),
|
|
36
|
+
register = _useTogglableSections.register,
|
|
37
|
+
setOpened = _useTogglableSections.setOpened,
|
|
38
|
+
opened = _useTogglableSections.opened,
|
|
39
|
+
registered = _useTogglableSections.registered,
|
|
40
|
+
rest = _objectWithoutProperties(_useTogglableSections, _excluded);
|
|
41
|
+
|
|
42
|
+
var keys = useMemo(function () {
|
|
43
|
+
return Object.keys(registered.current);
|
|
44
|
+
}, [registered.current.length]);
|
|
45
|
+
var openAll = useCallback(function () {
|
|
46
|
+
setOpened(keys.reduce(function (newOpened, key) {
|
|
47
|
+
return _extends({}, newOpened, _defineProperty({}, key, true));
|
|
48
|
+
}, {}));
|
|
49
|
+
}, [keys]);
|
|
50
|
+
var closeAll = useCallback(function () {
|
|
51
|
+
return setOpened({});
|
|
52
|
+
}, []);
|
|
53
|
+
return _extends({
|
|
54
|
+
register: register,
|
|
55
|
+
openAll: openAll,
|
|
56
|
+
closeAll: closeAll,
|
|
57
|
+
isOpenAll: keys.length ? keys.every(function (v) {
|
|
58
|
+
return opened[v];
|
|
59
|
+
}) : false,
|
|
60
|
+
setOpened: setOpened,
|
|
61
|
+
opened: opened,
|
|
62
|
+
registered: registered
|
|
63
|
+
}, rest);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export { Accordion, AccordionControls, AccordionSection, AccordionSectionContent, AccordionSectionHeader, useAccordion };
|
|
67
|
+
export default Accordion;
|
|
@@ -1,42 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
borderLeftColor: theme.palette.grey['500']
|
|
14
|
-
},
|
|
15
|
-
warning: {
|
|
16
|
-
borderLeftColor: theme.palette.warning.main
|
|
17
|
-
},
|
|
18
|
-
error: {
|
|
19
|
-
borderLeftColor: theme.palette.error.main
|
|
20
|
-
},
|
|
21
|
-
success: {
|
|
22
|
-
borderLeftColor: theme.palette.success.main
|
|
1
|
+
import CoreBlockquote from '@digigov/react-core/Blockquote';
|
|
2
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
+
export var Blockquote = withDeprecation(CoreBlockquote, {
|
|
4
|
+
name: 'Blockquote',
|
|
5
|
+
props: {
|
|
6
|
+
variant: {
|
|
7
|
+
values: {
|
|
8
|
+
info: {
|
|
9
|
+
warning: true
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
error: true
|
|
23
13
|
}
|
|
24
|
-
}
|
|
25
|
-
}, {
|
|
26
|
-
name: 'MuiBlockquote'
|
|
14
|
+
}
|
|
27
15
|
});
|
|
28
|
-
export var Blockquote = function Blockquote(_ref) {
|
|
29
|
-
var className = _ref.className,
|
|
30
|
-
_ref$variant = _ref.variant,
|
|
31
|
-
variant = _ref$variant === void 0 ? 'info' : _ref$variant,
|
|
32
|
-
children = _ref.children;
|
|
33
|
-
var classes = useBlockquoteStyles();
|
|
34
|
-
var variantCls = classes[variant];
|
|
35
|
-
return /*#__PURE__*/React.createElement("blockquote", {
|
|
36
|
-
className: clsx(className, variantCls, classes.root)
|
|
37
|
-
}, children);
|
|
38
|
-
};
|
|
39
|
-
Blockquote.defaultProps = {
|
|
40
|
-
variant: 'info'
|
|
41
|
-
};
|
|
42
16
|
export default Blockquote;
|
|
@@ -1,39 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import BackLink from '@digigov/react-core/BackLink';
|
|
2
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
+
export var BackButton = withDeprecation(BackLink, {
|
|
4
|
+
name: 'BackButton',
|
|
5
|
+
rename: 'BackLink',
|
|
6
|
+
props: {
|
|
7
|
+
variant: {
|
|
8
|
+
error: true
|
|
9
|
+
},
|
|
10
|
+
size: {
|
|
11
|
+
error: true
|
|
12
|
+
},
|
|
13
|
+
xsFullWidth: {
|
|
14
|
+
error: true
|
|
15
|
+
},
|
|
16
|
+
startIcon: {
|
|
17
|
+
error: true
|
|
18
18
|
}
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
var _ref = /*#__PURE__*/React.createElement(ArrowLeftIcon, null);
|
|
23
|
-
|
|
24
|
-
export var BackButton = function BackButton(props) {
|
|
25
|
-
var classes = useBackButtonStyles();
|
|
26
|
-
|
|
27
|
-
var goBack = function goBack() {
|
|
28
|
-
window.history.back();
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
32
|
-
variant: "text",
|
|
33
|
-
onClick: props.onClick || goBack,
|
|
34
|
-
color: "default",
|
|
35
|
-
classes: classes,
|
|
36
|
-
startIcon: _ref
|
|
37
|
-
}, props), props.children);
|
|
38
|
-
};
|
|
39
21
|
export default BackButton;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import CoreButtonLink from '@digigov/react-core/ButtonLink';
|
|
2
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
3
|
+
export var ButtonLink = withDeprecation(CoreButtonLink, {
|
|
4
|
+
name: 'ButtonLink',
|
|
5
|
+
props: {
|
|
6
|
+
variant: {
|
|
7
|
+
error: true
|
|
8
|
+
},
|
|
9
|
+
size: {
|
|
10
|
+
error: true
|
|
11
|
+
},
|
|
12
|
+
xsFullWidth: {
|
|
13
|
+
error: true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["label", "children"];
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
var _ref2 = /*#__PURE__*/React.createElement(ChevronRightIcon, null);
|
|
8
|
-
|
|
9
|
-
export var ButtonIcon = function ButtonIcon(_ref) {
|
|
4
|
+
import CoreCallToAction from '@digigov/react-core/CallToAction';
|
|
5
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
6
|
+
export var CallToAction = withDeprecation(function (_ref) {
|
|
10
7
|
var _ref$label = _ref.label,
|
|
11
8
|
label = _ref$label === void 0 ? 'Start here' : _ref$label,
|
|
12
9
|
children = _ref.children,
|
|
13
10
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
11
|
|
|
15
|
-
return /*#__PURE__*/React.createElement(
|
|
16
|
-
}
|
|
17
|
-
|
|
12
|
+
return /*#__PURE__*/React.createElement(CoreCallToAction, props, children || label);
|
|
13
|
+
}, {
|
|
14
|
+
name: 'CallToAction',
|
|
15
|
+
props: {
|
|
16
|
+
variant: {
|
|
17
|
+
error: true
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
error: true
|
|
21
|
+
},
|
|
22
|
+
xsFullWidth: {
|
|
23
|
+
error: true
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export default CallToAction;
|
package/esm/core/Button/Icon.js
CHANGED
|
@@ -1,37 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
var _excluded = ["Icon", "icon", "children"];
|
|
3
|
-
// @flow
|
|
4
|
-
import React, { useMemo } from 'react';
|
|
5
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
6
|
-
import Button from '@digigov/ui/core/Button';
|
|
7
|
-
import Box from '@material-ui/core/Box';
|
|
8
|
-
import MuiIcon from '@material-ui/core/Icon';
|
|
9
|
-
var useStyles = makeStyles(function () {
|
|
10
|
-
return {
|
|
11
|
-
textInButton: {
|
|
12
|
-
whiteSpace: 'nowrap'
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
export var ButtonIcon = function ButtonIcon(_ref) {
|
|
17
|
-
var Icon = _ref.Icon,
|
|
18
|
-
icon = _ref.icon,
|
|
19
|
-
children = _ref.children,
|
|
20
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
-
|
|
22
|
-
var classes = useStyles();
|
|
23
|
-
var IconComponent = useMemo(function () {
|
|
24
|
-
var IconComponent = function IconComponent(props) {
|
|
25
|
-
return /*#__PURE__*/React.createElement(MuiIcon, props, icon);
|
|
26
|
-
};
|
|
1
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation'; // eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
27
2
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
display: "flex"
|
|
33
|
-
}, /*#__PURE__*/React.createElement(IconComponent, null)), /*#__PURE__*/React.createElement("div", {
|
|
34
|
-
className: classes.textInButton
|
|
35
|
-
}, children));
|
|
36
|
-
};
|
|
3
|
+
export var ButtonIcon = withDeprecation(function () {}, {
|
|
4
|
+
name: 'ButtonIcon',
|
|
5
|
+
error: true
|
|
6
|
+
});
|
|
37
7
|
export default ButtonIcon;
|
package/esm/core/Button/index.js
CHANGED
|
@@ -1,96 +1,35 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import
|
|
12
|
-
export var useButtonStyles = makeStyles(function (theme) {
|
|
13
|
-
return {
|
|
14
|
-
// Styles applied to the root element.
|
|
15
|
-
root: {
|
|
16
|
-
textTransform: 'none'
|
|
2
|
+
var _excluded = ["label", "children"];
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import CoreButton from '@digigov/react-core/Button';
|
|
5
|
+
import withDeprecation from '@digigov/ui/utils/withDeprecation';
|
|
6
|
+
export var Button = withDeprecation(CoreButton, {
|
|
7
|
+
name: 'Button',
|
|
8
|
+
props: {
|
|
9
|
+
href: {
|
|
10
|
+
error: 'To use a button with a link import ButtonLink instead'
|
|
17
11
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
color: theme.palette.common.white,
|
|
21
|
-
'&:hover': {
|
|
22
|
-
color: theme.palette.common.white,
|
|
23
|
-
background: theme.palette.success.dark
|
|
24
|
-
},
|
|
25
|
-
'&:visited': {
|
|
26
|
-
color: theme.palette.common.white
|
|
27
|
-
}
|
|
12
|
+
variant: {
|
|
13
|
+
error: true
|
|
28
14
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
color: theme.palette.text.primary,
|
|
32
|
-
'&:hover': {
|
|
33
|
-
color: theme.palette.text.primary,
|
|
34
|
-
background: theme.palette.grey['400']
|
|
35
|
-
},
|
|
36
|
-
'&:visited': {
|
|
37
|
-
color: theme.palette.text.primary
|
|
38
|
-
}
|
|
15
|
+
size: {
|
|
16
|
+
error: true
|
|
39
17
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Styles applied if the xsFullWidth property is true
|
|
46
|
-
**/
|
|
47
|
-
responsive: _defineProperty({
|
|
48
|
-
textTransform: 'none'
|
|
49
|
-
}, theme.breakpoints.down('xs'), {
|
|
50
|
-
width: '100%'
|
|
51
|
-
})
|
|
52
|
-
};
|
|
53
|
-
}, {
|
|
54
|
-
name: 'MuiButton'
|
|
55
|
-
});
|
|
56
|
-
// A component used for call to action
|
|
57
|
-
export var Button = function Button(_ref) {
|
|
58
|
-
var children = _ref.children,
|
|
59
|
-
xsFullWidth = _ref.xsFullWidth,
|
|
60
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
61
|
-
|
|
62
|
-
var _useButtonStyles = useButtonStyles(),
|
|
63
|
-
responsive = _useButtonStyles.responsive,
|
|
64
|
-
buttonClasses = _objectWithoutProperties(_useButtonStyles, _excluded2);
|
|
65
|
-
|
|
66
|
-
var classes = useMemo(function () {
|
|
67
|
-
if (xsFullWidth) {
|
|
68
|
-
buttonClasses.root = clsx(buttonClasses.root, responsive);
|
|
18
|
+
xsFullWidth: {
|
|
19
|
+
error: true
|
|
69
20
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}, [xsFullWidth]);
|
|
73
|
-
var component = useMemo(function () {
|
|
74
|
-
return props.href ? Link : props.type === 'submit' ? 'button' : undefined;
|
|
75
|
-
}, [props.href, props.type]);
|
|
76
|
-
return /*#__PURE__*/React.createElement(MuiButton, _extends({
|
|
77
|
-
component: component,
|
|
78
|
-
classes: classes
|
|
79
|
-
}, props), children);
|
|
80
|
-
};
|
|
81
|
-
Button.defaultProps = {
|
|
82
|
-
color: 'primary',
|
|
83
|
-
variant: 'contained',
|
|
84
|
-
size: 'large',
|
|
85
|
-
xsFullWidth: false
|
|
86
|
-
};
|
|
21
|
+
}
|
|
22
|
+
});
|
|
87
23
|
export default Button;
|
|
88
|
-
export var ContinueButton = function ContinueButton(
|
|
89
|
-
var
|
|
90
|
-
label =
|
|
91
|
-
|
|
24
|
+
export var ContinueButton = function ContinueButton(_ref) {
|
|
25
|
+
var _ref$label = _ref.label,
|
|
26
|
+
label = _ref$label === void 0 ? 'Continue' : _ref$label,
|
|
27
|
+
children = _ref.children,
|
|
28
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
92
29
|
|
|
93
|
-
return /*#__PURE__*/React.createElement(Button, props, label);
|
|
30
|
+
return /*#__PURE__*/React.createElement(Button, props, label || children);
|
|
94
31
|
};
|
|
95
32
|
export * from '@digigov/ui/core/Button/BackButton';
|
|
96
|
-
export * from '@digigov/ui/core/Button/CallToAction';
|
|
33
|
+
export * from '@digigov/ui/core/Button/CallToAction';
|
|
34
|
+
export * from '@digigov/ui/core/Button/ButtonLink';
|
|
35
|
+
export * from '@digigov/ui/core/Button/Icon';
|
|
@@ -1,62 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
root: {
|
|
7
|
-
outline: 'none',
|
|
8
|
-
cursor: 'pointer'
|
|
9
|
-
},
|
|
10
|
-
text: {
|
|
11
|
-
textDecoration: 'underline'
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
}, {
|
|
15
|
-
name: 'MuiDetailsSummary'
|
|
16
|
-
});
|
|
17
|
-
export var DetailsSummary = function DetailsSummary(_ref) {
|
|
18
|
-
var children = _ref.children,
|
|
19
|
-
className = _ref.className;
|
|
20
|
-
var classes = useDetailsSummaryStyles();
|
|
21
|
-
return /*#__PURE__*/React.createElement("summary", {
|
|
22
|
-
className: clsx(className, classes.root)
|
|
23
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
24
|
-
className: classes.text
|
|
25
|
-
}, children));
|
|
26
|
-
};
|
|
27
|
-
var useDetailsContentStyles = makeStyles(function (theme) {
|
|
28
|
-
return {
|
|
29
|
-
root: {
|
|
30
|
-
borderLeft: "2px solid ".concat(theme.palette.grey['500']),
|
|
31
|
-
margin: theme.spacing(0.5),
|
|
32
|
-
padding: theme.spacing(2)
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}, {
|
|
36
|
-
name: 'MuiDetailsContent'
|
|
37
|
-
});
|
|
38
|
-
export var DetailsContent = function DetailsContent(_ref2) {
|
|
39
|
-
var children = _ref2.children,
|
|
40
|
-
className = _ref2.className;
|
|
41
|
-
var classes = useDetailsContentStyles();
|
|
42
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className: clsx(className, classes.root)
|
|
44
|
-
}, children);
|
|
45
|
-
};
|
|
46
|
-
var useDetailsStyles = makeStyles(function () {
|
|
47
|
-
return {
|
|
48
|
-
root: {}
|
|
49
|
-
};
|
|
50
|
-
}, {
|
|
51
|
-
name: 'MuiDetails'
|
|
52
|
-
});
|
|
53
|
-
export var Details = function Details(_ref3) {
|
|
54
|
-
var children = _ref3.children,
|
|
55
|
-
open = _ref3.open,
|
|
56
|
-
className = _ref3.className;
|
|
57
|
-
var classes = useDetailsStyles();
|
|
58
|
-
return /*#__PURE__*/React.createElement("details", {
|
|
59
|
-
className: clsx(className, classes.root),
|
|
60
|
-
open: open
|
|
61
|
-
}, children);
|
|
62
|
-
};
|
|
1
|
+
import Details from '@digigov/react-core/Details';
|
|
2
|
+
import DetailsContent from '@digigov/react-core/DetailsContent';
|
|
3
|
+
import DetailsSummary from '@digigov/react-core/DetailsSummary';
|
|
4
|
+
export { Details, DetailsContent, DetailsSummary };
|
|
5
|
+
export default Details;
|