@digigov/react-core 2.0.0-8e254888 → 2.0.0-a0ac149e
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/Accordion/index.native.d.ts +1 -5
- package/AccordionSection/index.native.d.ts +1 -3
- package/AccordionSectionSummaryHeading/index.d.ts +1 -0
- package/AccordionSectionSummaryHeading/index.js +3 -2
- package/AccordionSectionSummaryHeading/index.js.map +2 -2
- package/BackLinkBase/index.d.ts +9 -0
- package/BackLinkBase/index.js +29 -0
- package/BackLinkBase/index.js.map +7 -0
- package/{CallToAction → BackLinkBase}/package.json +1 -1
- package/BannerContainer/index.js +1 -1
- package/BannerContainer/index.js.map +2 -2
- package/Base/compat/Input/CheckboxInput.native.js.map +2 -2
- package/Base/compat/Input/RadioInput.native.js.map +2 -2
- package/Base/index.native.js.map +2 -2
- package/Base/index.web.d.ts +1 -1
- package/Base/index.web.js.map +1 -1
- package/Base/mapping.native.d.ts +1 -1
- package/Base/mapping.native.js.map +2 -2
- package/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.d.ts +5 -5
- package/BreadcrumbsListItemLinkBase/index.js +23 -0
- package/BreadcrumbsListItemLinkBase/index.js.map +7 -0
- package/{AutoCompleteInputTypeahead → BreadcrumbsListItemLinkBase}/package.json +1 -1
- package/Button/index.js +1 -0
- package/Button/index.js.map +2 -2
- package/{ButtonLink → ButtonLinkBase}/index.d.ts +4 -4
- package/ButtonLinkBase/index.js +27 -0
- package/ButtonLinkBase/index.js.map +7 -0
- package/{FooterLink → ButtonLinkBase}/package.json +1 -1
- package/CallToActionBase/index.d.ts +9 -0
- package/{CallToAction → CallToActionBase}/index.js +6 -6
- package/CallToActionBase/index.js.map +7 -0
- package/{CircularProgress → CallToActionBase}/package.json +1 -1
- package/{CircularProgress → CircularProgressBase}/index.d.ts +5 -5
- package/{CircularProgress → CircularProgressBase}/index.js +4 -4
- package/CircularProgressBase/index.js.map +7 -0
- package/CircularProgressBase/package.json +6 -0
- package/CopyToClipboardMessage/index.native.d.ts +1 -3
- package/DateInputItem/index.native.d.ts +1 -3
- package/Details/index.native.d.ts +1 -3
- package/DetailsContent/index.d.ts +1 -0
- package/DetailsContent/index.js +3 -2
- package/DetailsContent/index.js.map +2 -2
- package/FooterLinkBase/index.d.ts +9 -0
- package/FooterLinkBase/index.js +23 -0
- package/FooterLinkBase/index.js.map +7 -0
- package/{ButtonLink → FooterLinkBase}/package.json +1 -1
- package/GovGRLogoBase/govgr-logo-base64/package.json +6 -0
- package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
- package/GovGRLogoBase/govgr-logo-blue-base64/package.json +6 -0
- package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
- package/GovGRLogoBase/index.d.ts +9 -0
- package/GovGRLogoBase/index.js +43 -0
- package/GovGRLogoBase/index.js.map +7 -0
- package/{BackLink → GovGRLogoBase}/package.json +1 -1
- package/Grid/index.d.ts +1 -7
- package/Grid/index.js.map +2 -2
- package/HeaderLogoBase/index.d.ts +19 -0
- package/HeaderLogoBase/index.js +33 -0
- package/HeaderLogoBase/index.js.map +7 -0
- package/HeaderLogoBase/package.json +6 -0
- package/HeaderSecondaryLogoBase/index.d.ts +19 -0
- package/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.js +7 -7
- package/HeaderSecondaryLogoBase/index.js.map +7 -0
- package/{BreadcrumbsListItemLink → HeaderSecondaryLogoBase}/package.json +1 -1
- package/HeaderTitleBase/index.d.ts +9 -0
- package/HeaderTitleBase/index.js +24 -0
- package/HeaderTitleBase/index.js.map +7 -0
- package/HeaderTitleBase/package.json +6 -0
- package/LinkBase/index.js +1 -0
- package/LinkBase/index.js.map +2 -2
- package/{NavListItemAction → NavListItemActionBase}/index.d.ts +6 -6
- package/{NavListItemAction → NavListItemActionBase}/index.js +6 -6
- package/NavListItemActionBase/index.js.map +7 -0
- package/NavListItemActionBase/package.json +6 -0
- package/NavListItemActionContainer/index.native.d.ts +0 -2
- package/{NavListItemLink → NavListItemLinkBase}/index.d.ts +4 -4
- package/{NavListItemLink → NavListItemLinkBase}/index.js +6 -6
- package/NavListItemLinkBase/index.js.map +7 -0
- package/NavListItemLinkBase/package.json +6 -0
- package/NotificationBannerLink/index.native.d.ts +1 -3
- package/Table/index.d.ts +9 -0
- package/Table/index.js +4 -1
- package/Table/index.js.map +2 -2
- package/TableDataCell/index.d.ts +13 -0
- package/TableDataCell/index.js +10 -1
- package/TableDataCell/index.js.map +2 -2
- package/TextArea/index.native.d.ts +1 -3
- package/TextInput/index.native.d.ts +1 -3
- package/Typography/index.d.ts +1 -1
- package/Typography/index.js +15 -17
- package/Typography/index.js.map +2 -2
- package/WarningText/index.d.ts +7 -0
- package/WarningText/index.js +10 -2
- package/WarningText/index.js.map +2 -2
- package/cjs/AccordionSectionSummaryHeading/index.js +3 -2
- package/cjs/AccordionSectionSummaryHeading/index.js.map +2 -2
- package/cjs/BackLinkBase/index.js +62 -0
- package/cjs/BackLinkBase/index.js.map +7 -0
- package/cjs/BannerContainer/index.js +1 -1
- package/cjs/BannerContainer/index.js.map +2 -2
- package/cjs/Base/compat/Input/CheckboxInput.native.js.map +2 -2
- package/cjs/Base/compat/Input/RadioInput.native.js.map +2 -2
- package/cjs/Base/index.native.js.map +2 -2
- package/cjs/Base/index.web.js.map +1 -1
- package/cjs/Base/mapping.native.js.map +2 -2
- package/cjs/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.js +10 -11
- package/cjs/BreadcrumbsListItemLinkBase/index.js.map +7 -0
- package/cjs/Button/index.js +1 -0
- package/cjs/Button/index.js.map +2 -2
- package/cjs/ButtonLinkBase/index.js +60 -0
- package/cjs/ButtonLinkBase/index.js.map +7 -0
- package/cjs/{CallToAction → CallToActionBase}/index.js +10 -10
- package/cjs/CallToActionBase/index.js.map +7 -0
- package/cjs/{CircularProgress → CircularProgressBase}/index.js +8 -8
- package/cjs/CircularProgressBase/index.js.map +7 -0
- package/cjs/DetailsContent/index.js +3 -2
- package/cjs/DetailsContent/index.js.map +2 -2
- package/cjs/FooterLinkBase/index.js +56 -0
- package/cjs/FooterLinkBase/index.js.map +7 -0
- package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
- package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
- package/cjs/{GovGRLogo → GovGRLogoBase}/index.js +41 -43
- package/cjs/GovGRLogoBase/index.js.map +7 -0
- package/cjs/Grid/index.js.map +2 -2
- package/cjs/{HeaderSecondaryLogo → HeaderLogoBase}/index.js +12 -12
- package/cjs/HeaderLogoBase/index.js.map +7 -0
- package/cjs/HeaderSecondaryLogoBase/index.js +66 -0
- package/cjs/HeaderSecondaryLogoBase/index.js.map +7 -0
- package/cjs/{HeaderTitle → HeaderTitleBase}/index.js +11 -11
- package/cjs/HeaderTitleBase/index.js.map +7 -0
- package/cjs/LinkBase/index.js +1 -0
- package/cjs/LinkBase/index.js.map +2 -2
- package/cjs/{NavListItemAction → NavListItemActionBase}/index.js +10 -10
- package/cjs/NavListItemActionBase/index.js.map +7 -0
- package/cjs/{NavListItemLink → NavListItemLinkBase}/index.js +10 -10
- package/cjs/NavListItemLinkBase/index.js.map +7 -0
- package/cjs/Table/index.js +4 -1
- package/cjs/Table/index.js.map +2 -2
- package/cjs/TableDataCell/index.js +10 -1
- package/cjs/TableDataCell/index.js.map +2 -2
- package/cjs/Typography/index.js +15 -17
- package/cjs/Typography/index.js.map +2 -2
- package/cjs/WarningText/index.js +10 -2
- package/cjs/WarningText/index.js.map +2 -2
- package/cjs/index.js +22 -24
- package/cjs/index.js.map +2 -2
- package/cjs/lazy/index.js +13 -14
- package/cjs/lazy.js.map +2 -2
- package/cjs/registry/index.js +36 -38
- package/cjs/registry.js.map +2 -2
- package/cjs/utils/index.native/index.js +32 -34
- package/cjs/utils/index.native.js.map +2 -2
- package/index.d.ts +11 -12
- package/index.js +12 -13
- package/index.js.map +2 -2
- package/lazy/index.js +13 -14
- package/package.json +5 -5
- package/registry/index.js +36 -38
- package/src/AccordionSectionSummaryHeading/index.tsx +9 -2
- package/src/AdminAside/__snapshots__/index.test.tsx.snap +1 -1
- package/src/AdminContainer/__snapshots__/index.test.tsx.snap +2 -2
- package/src/AdminMain/__snapshots__/index.test.tsx.snap +1 -1
- package/src/AdminTopSection/__snapshots__/index.test.tsx.snap +1 -1
- package/src/Aside/__snapshots__/index.test.tsx.snap +1 -1
- package/src/{BackLink → BackLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
- package/src/BackLinkBase/index.test.tsx +15 -0
- package/src/BackLinkBase/index.tsx +36 -0
- package/src/BannerContainer/__snapshots__/index.test.tsx.snap +1 -1
- package/src/BannerContainer/index.tsx +1 -1
- package/src/Base/compat/Input/CheckboxInput.native.tsx +2 -6
- package/src/Base/compat/Input/RadioInput.native.tsx +2 -6
- package/src/Base/index.native.tsx +2 -2
- package/src/Base/index.web.tsx +2 -2
- package/src/Base/mapping.native.tsx +1 -1
- package/src/BottomInfo/__snapshots__/index.test.tsx.snap +1 -1
- package/src/BottomInfoContainer/__snapshots__/index.test.tsx.snap +1 -1
- package/src/BottomInfoContent/__snapshots__/index.test.tsx.snap +1 -1
- package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/__snapshots__/index.test.tsx.snap +4 -4
- package/src/BreadcrumbsListItemLinkBase/index.test.tsx +18 -0
- package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.tsx +10 -11
- package/src/Button/index.tsx +1 -0
- package/src/{ButtonLink → ButtonLinkBase}/__snapshots__/index.test.tsx.snap +22 -22
- package/src/ButtonLinkBase/index.test.tsx +75 -0
- package/src/ButtonLinkBase/index.tsx +55 -0
- package/src/{CallToAction → CallToActionBase}/__snapshots__/index.test.tsx.snap +1 -1
- package/src/CallToActionBase/index.test.tsx +10 -0
- package/src/{CallToAction → CallToActionBase}/index.tsx +10 -8
- package/src/Checkbox/__snapshots__/index.test.tsx.snap +0 -5
- package/src/CheckboxConditional/__snapshots__/index.test.tsx.snap +1 -1
- package/src/CheckboxItem/__snapshots__/index.test.tsx.snap +0 -4
- package/src/{CircularProgress → CircularProgressBase}/__snapshots__/index.test.tsx.snap +6 -6
- package/src/CircularProgressBase/index.test.tsx +38 -0
- package/src/{CircularProgress → CircularProgressBase}/index.tsx +7 -7
- package/src/Container/__snapshots__/index.test.tsx.snap +3 -3
- package/src/DetailsContent/index.tsx +11 -2
- package/src/FieldContainer/__snapshots__/index.test.tsx.snap +3 -3
- package/src/FooterContainer/__snapshots__/index.test.tsx.snap +1 -1
- package/src/{FooterLink → FooterLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
- package/src/FooterLinkBase/index.test.tsx +16 -0
- package/src/FooterLinkBase/index.tsx +27 -0
- package/src/{GovGRLogo → GovGRLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
- package/src/GovGRLogoBase/index.test.tsx +8 -0
- package/src/GovGRLogoBase/index.tsx +43 -0
- package/src/Grid/__snapshots__/index.test.tsx.snap +8 -8
- package/src/Grid/index.tsx +1 -7
- package/src/{HeaderLogo → HeaderLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
- package/src/HeaderLogoBase/index.test.tsx +8 -0
- package/src/HeaderLogoBase/index.tsx +44 -0
- package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/__snapshots__/index.test.tsx.snap +2 -2
- package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.test.tsx +7 -7
- package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.tsx +9 -9
- package/src/{HeaderTitle → HeaderTitleBase}/__snapshots__/index.test.tsx.snap +2 -2
- package/src/HeaderTitleBase/index.test.tsx +17 -0
- package/src/HeaderTitleBase/index.tsx +28 -0
- package/src/LinkBase/index.tsx +1 -0
- package/src/Main/__snapshots__/index.test.tsx.snap +1 -1
- package/src/NavListItemActionBase/__snapshots__/index.test.tsx.snap +101 -0
- package/src/NavListItemActionBase/index.test.tsx +42 -0
- package/src/{NavListItemAction → NavListItemActionBase}/index.tsx +13 -12
- package/src/{NavListItemLink → NavListItemLinkBase}/__snapshots__/index.test.tsx.snap +5 -5
- package/src/NavListItemLinkBase/index.test.tsx +41 -0
- package/src/{NavListItemLink → NavListItemLinkBase}/index.tsx +8 -9
- package/src/NavMenuContainer/__snapshots__/index.test.tsx.snap +4 -4
- package/src/NavMenuContent/__snapshots__/index.test.tsx.snap +1 -1
- package/src/NavMenuTitle/__snapshots__/index.test.tsx.snap +1 -1
- package/src/RadioConditional/__snapshots__/index.test.tsx.snap +1 -1
- package/src/RadioItem/__snapshots__/index.test.tsx.snap +0 -4
- package/src/Table/index.tsx +12 -0
- package/src/TableDataCell/__snapshots__/index.test.tsx.snap +2 -2
- package/src/TableDataCell/index.tsx +23 -1
- package/src/Typography/index.tsx +21 -20
- package/src/WarningText/__snapshots__/index.test.tsx.snap +26 -0
- package/src/WarningText/index.test.tsx +5 -0
- package/src/WarningText/index.tsx +17 -2
- package/src/index.ts +11 -12
- package/src/lazy.js +13 -14
- package/src/registry.js +36 -38
- package/src/utils/index.native.tsx +56 -54
- package/utils/index.native/index.js +32 -34
- package/utils/index.native.d.ts +3 -6
- package/utils/index.native.js.map +2 -2
- package/AutoCompleteInputTypeahead/index.d.ts +0 -11
- package/AutoCompleteInputTypeahead/index.js +0 -25
- package/AutoCompleteInputTypeahead/index.js.map +0 -7
- package/BackLink/index.d.ts +0 -9
- package/BackLink/index.js +0 -31
- package/BackLink/index.js.map +0 -7
- package/BreadcrumbsListItemLink/index.js +0 -24
- package/BreadcrumbsListItemLink/index.js.map +0 -7
- package/ButtonLink/index.js +0 -29
- package/ButtonLink/index.js.map +0 -7
- package/CallToAction/index.d.ts +0 -9
- package/CallToAction/index.js.map +0 -7
- package/CircularProgress/index.js.map +0 -7
- package/FooterLink/index.d.ts +0 -9
- package/FooterLink/index.js +0 -25
- package/FooterLink/index.js.map +0 -7
- package/GovGRLogo/govgr-logo-base64/package.json +0 -6
- package/GovGRLogo/govgr-logo-blue-base64/package.json +0 -6
- package/GovGRLogo/index.d.ts +0 -9
- package/GovGRLogo/index.js +0 -45
- package/GovGRLogo/index.js.map +0 -7
- package/GovGRLogo/package.json +0 -6
- package/HeaderLogo/index.d.ts +0 -19
- package/HeaderLogo/index.js +0 -35
- package/HeaderLogo/index.js.map +0 -7
- package/HeaderLogo/package.json +0 -6
- package/HeaderSecondaryLogo/index.d.ts +0 -19
- package/HeaderSecondaryLogo/index.js.map +0 -7
- package/HeaderSecondaryLogo/package.json +0 -6
- package/HeaderTitle/index.d.ts +0 -9
- package/HeaderTitle/index.js +0 -24
- package/HeaderTitle/index.js.map +0 -7
- package/HeaderTitle/package.json +0 -6
- package/NavListItemAction/index.js.map +0 -7
- package/NavListItemAction/package.json +0 -6
- package/NavListItemLink/index.js.map +0 -7
- package/NavListItemLink/index.test.d.ts +0 -1
- package/NavListItemLink/package.json +0 -6
- package/cjs/AutoCompleteInputTypeahead/index.js +0 -58
- package/cjs/AutoCompleteInputTypeahead/index.js.map +0 -7
- package/cjs/BackLink/index.js +0 -64
- package/cjs/BackLink/index.js.map +0 -7
- package/cjs/BreadcrumbsListItemLink/index.js.map +0 -7
- package/cjs/ButtonLink/index.js +0 -62
- package/cjs/ButtonLink/index.js.map +0 -7
- package/cjs/CallToAction/index.js.map +0 -7
- package/cjs/CircularProgress/index.js.map +0 -7
- package/cjs/FooterLink/index.js +0 -58
- package/cjs/FooterLink/index.js.map +0 -7
- package/cjs/GovGRLogo/index.js.map +0 -7
- package/cjs/HeaderLogo/index.js +0 -68
- package/cjs/HeaderLogo/index.js.map +0 -7
- package/cjs/HeaderSecondaryLogo/index.js.map +0 -7
- package/cjs/HeaderTitle/index.js.map +0 -7
- package/cjs/NavListItemAction/index.js.map +0 -7
- package/cjs/NavListItemLink/index.js.map +0 -7
- package/src/AutoCompleteInputTypeahead/__snapshots__/index.test.tsx.snap +0 -16
- package/src/AutoCompleteInputTypeahead/index.test.tsx +0 -8
- package/src/AutoCompleteInputTypeahead/index.tsx +0 -32
- package/src/BackLink/index.test.tsx +0 -13
- package/src/BackLink/index.tsx +0 -35
- package/src/BreadcrumbsListItemLink/index.test.tsx +0 -16
- package/src/ButtonLink/index.test.tsx +0 -69
- package/src/ButtonLink/index.tsx +0 -54
- package/src/CallToAction/index.test.tsx +0 -10
- package/src/CircularProgress/index.test.tsx +0 -34
- package/src/FooterLink/index.test.tsx +0 -14
- package/src/FooterLink/index.tsx +0 -26
- package/src/GovGRLogo/index.test.tsx +0 -8
- package/src/GovGRLogo/index.tsx +0 -42
- package/src/HeaderLogo/index.test.tsx +0 -8
- package/src/HeaderLogo/index.tsx +0 -43
- package/src/HeaderTitle/index.test.tsx +0 -16
- package/src/HeaderTitle/index.tsx +0 -28
- package/src/NavListItemAction/__snapshots__/index.test.tsx.snap +0 -13
- package/src/NavListItemAction/index.test.tsx +0 -11
- package/src/NavListItemLink/index.test.tsx +0 -39
- /package/{AutoCompleteInputTypeahead → BackLinkBase}/index.test.d.ts +0 -0
- /package/{BackLink → BreadcrumbsListItemLinkBase}/index.test.d.ts +0 -0
- /package/{BreadcrumbsListItemLink → ButtonLinkBase}/index.test.d.ts +0 -0
- /package/{ButtonLink → CallToActionBase}/index.test.d.ts +0 -0
- /package/{CallToAction → CircularProgressBase}/index.test.d.ts +0 -0
- /package/{CircularProgress → FooterLinkBase}/index.test.d.ts +0 -0
- /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
- /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.d.ts +0 -0
- /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
- /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.d.ts +0 -0
- /package/{FooterLink → GovGRLogoBase}/index.test.d.ts +0 -0
- /package/{GovGRLogo → HeaderLogoBase}/index.test.d.ts +0 -0
- /package/{HeaderLogo → HeaderSecondaryLogoBase}/index.test.d.ts +0 -0
- /package/{HeaderSecondaryLogo → HeaderTitleBase}/index.test.d.ts +0 -0
- /package/{HeaderTitle → NavListItemActionBase}/index.test.d.ts +0 -0
- /package/{NavListItemAction → NavListItemLinkBase}/index.test.d.ts +0 -0
- /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
- /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
- /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js +0 -0
- /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.ts +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/HeaderSecondaryLogo/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface HeaderSecondaryLogoProps extends BaseProps<'a'> {\n /**\n * src is needed to provide the url that we get the logo from.\n\n */\n src: string;\n /**\n * href provides the alternative text for the img tag.\n\n */\n altText?: string;\n}\n/**\n * HeaderSecondaryLogo is used inside Header for providing additional logos.\n */\nexport const HeaderSecondaryLogo = React.forwardRef<\n HTMLAnchorElement,\n HeaderSecondaryLogoProps\n>(function HeaderSecondaryLogo(\n { href, src, altText, className, ...props },\n ref\n) {\n return (\n <Base\n as=\"a\"\n href={href}\n ref={ref}\n className={clsx(className, {\n 'ds-header__link': true,\n })}\n {...props}\n >\n <img\n src={src}\n className={clsx(className, {\n 'ds-header__secondary-logo': true,\n })}\n alt={altText}\n />\n </Base>\n );\n});\n\nexport default HeaderSecondaryLogo;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAiBzB,MAAM,sBAAsB,aAAAA,QAAM,WAGvC,SAASC,qBACT,EAAE,MAAM,KAAK,SAAS,WAAW,GAAG,MAAM,GAC1C,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,mBAAmB;AAAA,MACrB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEJ,6BAAAH,QAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,YAAAG,SAAK,WAAW;AAAA,UACzB,6BAA6B;AAAA,QAC/B,CAAC;AAAA,QACD,KAAK;AAAA;AAAA,IACP;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,8BAAQ;",
|
|
6
|
-
"names": ["React", "HeaderSecondaryLogo", "Base", "clsx"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/HeaderTitle/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface HeaderTitleProps extends BaseProps<'a'> {}\n/**\n * Use this component inside HeaderContent to provide a title to the header.\n */\nexport const HeaderTitle = React.forwardRef<\n HTMLAnchorElement,\n HeaderTitleProps\n>(function HeaderTitle({ href = '/', className, children, ...props }, ref) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n href={href}\n className={clsx(className, {\n 'ds-header__title': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default HeaderTitle;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAMzB,MAAM,cAAc,aAAAA,QAAM,WAG/B,SAASC,aAAY,EAAE,OAAO,KAAK,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACzE,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,oBAAoB;AAAA,MACtB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,sBAAQ;",
|
|
6
|
-
"names": ["React", "HeaderTitle", "Base", "clsx"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/NavListItemAction/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { ForwardedRef } from 'react';\nimport NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';\nimport NavListItemBadge from '@digigov/react-core/NavListItemBadge';\nimport NavListItemButton, {\n NavListItemButtonProps,\n} from '@digigov/react-core/NavListItemButton';\nimport NavListItemLink, {\n NavListItemLinkProps,\n} from '@digigov/react-core/NavListItemLink';\n\nexport type LinkButtonJoinProps = NavListItemLinkProps & NavListItemButtonProps;\nexport interface NavListItemActionProps extends LinkButtonJoinProps {\n /**\n * label is optional.\n * The label for the NavListItemAction.\n */\n label?: string;\n\n /**\n * arrow is optional.\n * use arrow prop if you want to have arrow at the nav list item.\n * @value true\n * @value false\n * @default false\n */\n arrow?: boolean;\n badgeText?: string;\n}\n/**\n * NavListItemAction must be inside the NavList.\n * This component has a items of NavListItemLink component inside.\n */\nexport const NavListItemAction = React.forwardRef<\n HTMLButtonElement | HTMLAnchorElement,\n NavListItemActionProps\n>(function NavListItemAction(\n { label, arrow = false, href, className, children, ...props },\n ref\n) {\n return (\n <NavListItemActionContainer>\n {href ? (\n <NavListItemLink\n {...props}\n href={href}\n className={className}\n ref={ref as ForwardedRef<HTMLAnchorElement>}\n >\n {children || label}\n </NavListItemLink>\n ) : (\n <NavListItemButton\n {...props}\n arrow={arrow}\n className={className}\n ref={ref as ForwardedRef<HTMLButtonElement>}\n >\n {children || label}\n </NavListItemButton>\n )}\n {props.badgeText && <NavListItemBadge text={props.badgeText} />}\n </NavListItemActionContainer>\n );\n});\n\nexport default NavListItemAction;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AACpC,wCAAuC;AACvC,8BAA6B;AAC7B,+BAEO;AACP,6BAEO;AAwBA,MAAM,oBAAoB,aAAAA,QAAM,WAGrC,SAASC,mBACT,EAAE,OAAO,QAAQ,OAAO,MAAM,WAAW,UAAU,GAAG,MAAM,GAC5D,KACA;AACA,SACE,6BAAAD,QAAA,cAAC,kCAAAE,SAAA,MACE,OACC,6BAAAF,QAAA;AAAA,IAAC,uBAAAG;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,IAEA,6BAAAH,QAAA;AAAA,IAAC,yBAAAI;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,GAED,MAAM,aAAa,6BAAAJ,QAAA,cAAC,wBAAAK,SAAA,EAAiB,MAAM,MAAM,WAAW,CAC/D;AAEJ,CAAC;AAED,IAAO,4BAAQ;",
|
|
6
|
-
"names": ["React", "NavListItemAction", "NavListItemActionContainer", "NavListItemLink", "NavListItemButton", "NavListItemBadge"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/NavListItemLink/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { BaseProps } from '@digigov/react-core/Base';\nimport Link from '@digigov/react-core/LinkBase';\n\nexport interface NavListItemLinkProps extends BaseProps<'a'> {\n /**\n * When the NavListItemLink is active, that means that we are in this option / page of the Nav.\n * active is optional.\n *\n * @value true\n * @value false\n */\n active?: boolean;\n}\n/**\n * NavListItemLink is an <a> element. It should be inside the NavListItem component.\n */\nexport const NavListItemLink = React.forwardRef<\n HTMLAnchorElement,\n NavListItemLinkProps\n>(function NavListItemLink(\n { active, href, className, children, ...props },\n ref\n) {\n return (\n <Link\n href={href}\n ref={ref}\n className={clsx(className, {\n 'ds-nav__list-item-link': true,\n 'ds-nav__list-item-link--active': active,\n })}\n {...props}\n >\n {children}\n </Link>\n );\n});\n\nexport default NavListItemLink;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AAEjB,sBAAiB;AAeV,MAAM,kBAAkB,aAAAA,QAAM,WAGnC,SAASC,iBACT,EAAE,QAAQ,MAAM,WAAW,UAAU,GAAG,MAAM,GAC9C,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,gBAAAE;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,QAC1B,kCAAkC;AAAA,MACpC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
|
|
6
|
-
"names": ["React", "NavListItemLink", "Link", "clsx"]
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`renders the AutoCompleteInputTypeahead with no props 1`] = `
|
|
4
|
-
<body>
|
|
5
|
-
<div>
|
|
6
|
-
<span>
|
|
7
|
-
<input
|
|
8
|
-
class="ds-autocomplete__hint"
|
|
9
|
-
readonly=""
|
|
10
|
-
tabindex="-1"
|
|
11
|
-
type="text"
|
|
12
|
-
/>
|
|
13
|
-
</span>
|
|
14
|
-
</div>
|
|
15
|
-
</body>
|
|
16
|
-
`;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import AutoCompleteInputTypeahead from '@digigov/react-core/AutoCompleteInputTypeahead';
|
|
5
|
-
|
|
6
|
-
it('renders the AutoCompleteInputTypeahead with no props', () => {
|
|
7
|
-
expect(render(<AutoCompleteInputTypeahead />).baseElement).toMatchSnapshot();
|
|
8
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface AutoCompleteInputTypeaheadProps extends BaseProps<'input'> {}
|
|
6
|
-
/**
|
|
7
|
-
* AutoCompleteInputTypeahead component is used to display the hole search value
|
|
8
|
-
* in the background.
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export const AutoCompleteInputTypeahead = React.forwardRef<
|
|
12
|
-
HTMLInputElement,
|
|
13
|
-
AutoCompleteInputTypeaheadProps
|
|
14
|
-
>(function AutoCompleteInputTypeahead({ className, ...props }, ref) {
|
|
15
|
-
return (
|
|
16
|
-
<span>
|
|
17
|
-
<Base
|
|
18
|
-
as="input"
|
|
19
|
-
type="text"
|
|
20
|
-
readOnly
|
|
21
|
-
ref={ref}
|
|
22
|
-
tabIndex={-1}
|
|
23
|
-
className={clsx(className, {
|
|
24
|
-
'ds-autocomplete__hint': true,
|
|
25
|
-
})}
|
|
26
|
-
{...props}
|
|
27
|
-
/>
|
|
28
|
-
</span>
|
|
29
|
-
);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export default AutoCompleteInputTypeahead;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import BackLink from '@digigov/react-core/BackLink';
|
|
5
|
-
|
|
6
|
-
it('renders the BackLink with no props', () => {
|
|
7
|
-
expect(render(<BackLink>hello</BackLink>).baseElement).toMatchSnapshot();
|
|
8
|
-
});
|
|
9
|
-
it('renders the BackLink with href="#"', () => {
|
|
10
|
-
expect(
|
|
11
|
-
render(<BackLink href="#">hello</BackLink>).baseElement
|
|
12
|
-
).toMatchSnapshot();
|
|
13
|
-
});
|
package/src/BackLink/index.tsx
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
import { CaretIcon } from '@digigov/react-icons';
|
|
5
|
-
|
|
6
|
-
export interface BackLinkProps extends BaseProps<'a'> {}
|
|
7
|
-
/**
|
|
8
|
-
* Use BackLink component to help users go back to the previous page in a multi-page transaction.
|
|
9
|
-
*/
|
|
10
|
-
export const BackLink = React.forwardRef<HTMLAnchorElement, BackLinkProps>(
|
|
11
|
-
function BackLink(
|
|
12
|
-
{ href, printHidden = true, className, children, ...props },
|
|
13
|
-
ref
|
|
14
|
-
) {
|
|
15
|
-
return (
|
|
16
|
-
<Base
|
|
17
|
-
as="a"
|
|
18
|
-
printHidden={printHidden}
|
|
19
|
-
href={href}
|
|
20
|
-
onClick={() => !href && window.history.back()}
|
|
21
|
-
ref={ref}
|
|
22
|
-
className={clsx(className, {
|
|
23
|
-
'ds-back-link': true,
|
|
24
|
-
})}
|
|
25
|
-
tabIndex={0}
|
|
26
|
-
{...props}
|
|
27
|
-
>
|
|
28
|
-
<CaretIcon direction={'left'} />
|
|
29
|
-
{children}
|
|
30
|
-
</Base>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
export default BackLink;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import BreadcrumbsListItemLink from '@digigov/react-core/BreadcrumbsListItemLink';
|
|
5
|
-
|
|
6
|
-
it('renders the BreadcrumbsListItemLink with no props', () => {
|
|
7
|
-
expect(
|
|
8
|
-
render(<BreadcrumbsListItemLink>hello</BreadcrumbsListItemLink>).baseElement
|
|
9
|
-
).toMatchSnapshot();
|
|
10
|
-
});
|
|
11
|
-
it('renders the BreadcrumbsListItemLink with href', () => {
|
|
12
|
-
expect(
|
|
13
|
-
render(<BreadcrumbsListItemLink href="#">hello</BreadcrumbsListItemLink>)
|
|
14
|
-
.baseElement
|
|
15
|
-
).toMatchSnapshot();
|
|
16
|
-
});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import ButtonLink from '@digigov/react-core/ButtonLink';
|
|
5
|
-
|
|
6
|
-
it('renders the ButtonLink with no props', () => {
|
|
7
|
-
expect(render(<ButtonLink>hello</ButtonLink>).baseElement).toMatchSnapshot();
|
|
8
|
-
});
|
|
9
|
-
it('renders the ButtonLink with color=primary', () => {
|
|
10
|
-
expect(
|
|
11
|
-
render(<ButtonLink color={'primary'}>hello</ButtonLink>).baseElement
|
|
12
|
-
).toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
it('renders the ButtonLink with color=secondary', () => {
|
|
15
|
-
expect(
|
|
16
|
-
render(<ButtonLink color={'secondary'}>hello</ButtonLink>).baseElement
|
|
17
|
-
).toMatchSnapshot();
|
|
18
|
-
});
|
|
19
|
-
it('renders the ButtonLink with color=warning', () => {
|
|
20
|
-
expect(
|
|
21
|
-
render(<ButtonLink color={'warning'}>hello</ButtonLink>).baseElement
|
|
22
|
-
).toMatchSnapshot();
|
|
23
|
-
});
|
|
24
|
-
it('renders the ButtonLink with href=#', () => {
|
|
25
|
-
expect(
|
|
26
|
-
render(<ButtonLink href={'#'}>hello</ButtonLink>).baseElement
|
|
27
|
-
).toMatchSnapshot();
|
|
28
|
-
});
|
|
29
|
-
it('renders the ButtonLink with disabled=false', () => {
|
|
30
|
-
expect(render(<ButtonLink>hello</ButtonLink>).baseElement).toMatchSnapshot();
|
|
31
|
-
});
|
|
32
|
-
it('renders the ButtonLink with color=primary with href=#', () => {
|
|
33
|
-
expect(
|
|
34
|
-
render(
|
|
35
|
-
<ButtonLink href={'#'} color={'primary'}>
|
|
36
|
-
hello
|
|
37
|
-
</ButtonLink>
|
|
38
|
-
).baseElement
|
|
39
|
-
).toMatchSnapshot();
|
|
40
|
-
});
|
|
41
|
-
it('renders the ButtonLink with color=secondary with href=#', () => {
|
|
42
|
-
expect(
|
|
43
|
-
render(
|
|
44
|
-
<ButtonLink href={'#'} color={'secondary'}>
|
|
45
|
-
hello
|
|
46
|
-
</ButtonLink>
|
|
47
|
-
).baseElement
|
|
48
|
-
).toMatchSnapshot();
|
|
49
|
-
});
|
|
50
|
-
it('renders the ButtonLink with color=warning with href=#', () => {
|
|
51
|
-
expect(
|
|
52
|
-
render(
|
|
53
|
-
<ButtonLink href={'#'} color={'warning'}>
|
|
54
|
-
hello
|
|
55
|
-
</ButtonLink>
|
|
56
|
-
).baseElement
|
|
57
|
-
).toMatchSnapshot();
|
|
58
|
-
});
|
|
59
|
-
it('renders the ButtonLink with ariaLabel prop', () => {
|
|
60
|
-
expect(
|
|
61
|
-
render(<ButtonLink aria-label="button for opening menu">Menu</ButtonLink>)
|
|
62
|
-
.baseElement
|
|
63
|
-
).toMatchSnapshot();
|
|
64
|
-
});
|
|
65
|
-
it('renders the Button with tabIndex prop', () => {
|
|
66
|
-
expect(
|
|
67
|
-
render(<ButtonLink tabIndex={0}>Menu</ButtonLink>).baseElement
|
|
68
|
-
).toMatchSnapshot();
|
|
69
|
-
});
|
package/src/ButtonLink/index.tsx
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface ButtonLinkProps extends BaseProps<'a'> {
|
|
6
|
-
/**
|
|
7
|
-
* color is optional.
|
|
8
|
-
* 'primary' color is used for the main call to action on a page.
|
|
9
|
-
* 'secondary' color is used for secondary calls to action on a page.
|
|
10
|
-
* 'warning' color is used to make users think carefully before they use them.
|
|
11
|
-
* The default value is 'primary'.
|
|
12
|
-
* @value 'primary'
|
|
13
|
-
* @value 'secondary'
|
|
14
|
-
* @value 'warning'
|
|
15
|
-
* @default 'primary'
|
|
16
|
-
*/
|
|
17
|
-
color?: 'primary' | 'secondary' | 'warning';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* dense is optional.
|
|
21
|
-
* @value true Button will be dense.
|
|
22
|
-
* @value false
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
25
|
-
dense?: boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Use the Button component to help users carry out an action.
|
|
29
|
-
*/
|
|
30
|
-
export const ButtonLink = React.forwardRef<HTMLAnchorElement, ButtonLinkProps>(
|
|
31
|
-
function ButtonLink(
|
|
32
|
-
{ color = 'primary', dense, className, children, ...props },
|
|
33
|
-
ref
|
|
34
|
-
) {
|
|
35
|
-
return (
|
|
36
|
-
<Base
|
|
37
|
-
as="a"
|
|
38
|
-
ref={ref}
|
|
39
|
-
className={clsx(className, {
|
|
40
|
-
'ds-btn': true,
|
|
41
|
-
'ds-btn--dense': dense,
|
|
42
|
-
'ds-btn-primary': color === 'primary',
|
|
43
|
-
'ds-btn-secondary': color === 'secondary',
|
|
44
|
-
'ds-btn-warning': color === 'warning',
|
|
45
|
-
})}
|
|
46
|
-
{...props}
|
|
47
|
-
>
|
|
48
|
-
{children}
|
|
49
|
-
</Base>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
export default ButtonLink;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import CallToAction from '@digigov/react-core/CallToAction';
|
|
5
|
-
|
|
6
|
-
it('renders the CallToAction with no props', () => {
|
|
7
|
-
expect(
|
|
8
|
-
render(<CallToAction>hello</CallToAction>).baseElement
|
|
9
|
-
).toMatchSnapshot();
|
|
10
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import CircularProgress from '@digigov/react-core/CircularProgress';
|
|
5
|
-
|
|
6
|
-
it('renders the CircularProgress', () => {
|
|
7
|
-
expect(render(<CircularProgress />).baseElement).toMatchSnapshot();
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
it('renders the CircularProgress with size sm', () => {
|
|
11
|
-
expect(render(<CircularProgress size="sm" />).baseElement).toMatchSnapshot();
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('renders the CircularProgress with size lg', () => {
|
|
15
|
-
expect(render(<CircularProgress size="lg" />).baseElement).toMatchSnapshot();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('renders the CircularProgress with color=secondary prop', () => {
|
|
19
|
-
expect(
|
|
20
|
-
render(<CircularProgress color={'secondary'} />).baseElement
|
|
21
|
-
).toMatchSnapshot();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('renders the CircularProgress with color=secondary and size sm props', () => {
|
|
25
|
-
expect(
|
|
26
|
-
render(<CircularProgress color={'secondary'} size="sm" />).baseElement
|
|
27
|
-
).toMatchSnapshot();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it('renders the CircularProgress with color=secondary and size lg props', () => {
|
|
31
|
-
expect(
|
|
32
|
-
render(<CircularProgress color={'secondary'} size="lg" />).baseElement
|
|
33
|
-
).toMatchSnapshot();
|
|
34
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import FooterLink from '@digigov/react-core/FooterLink';
|
|
5
|
-
|
|
6
|
-
it('renders the FooterLink with no props', () => {
|
|
7
|
-
expect(render(<FooterLink>hello</FooterLink>).baseElement).toMatchSnapshot();
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
it('renders the FooterLink with href prop', () => {
|
|
11
|
-
expect(
|
|
12
|
-
render(<FooterLink href={'#'}>hello</FooterLink>).baseElement
|
|
13
|
-
).toMatchSnapshot();
|
|
14
|
-
});
|
package/src/FooterLink/index.tsx
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface FooterLinkProps extends BaseProps<'a'> {}
|
|
6
|
-
/**
|
|
7
|
-
* FooterLink in used inside the Footer component.
|
|
8
|
-
*/
|
|
9
|
-
export const FooterLink = React.forwardRef<HTMLAnchorElement, FooterLinkProps>(
|
|
10
|
-
function FooterLink({ className, children, ...props }, ref) {
|
|
11
|
-
return (
|
|
12
|
-
<Base
|
|
13
|
-
as="a"
|
|
14
|
-
ref={ref}
|
|
15
|
-
className={clsx(className, {
|
|
16
|
-
'ds-footer__link': true,
|
|
17
|
-
})}
|
|
18
|
-
{...props}
|
|
19
|
-
>
|
|
20
|
-
{children}
|
|
21
|
-
</Base>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
export default FooterLink;
|
package/src/GovGRLogo/index.tsx
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
import logo from '@digigov/react-core/GovGRLogo/govgr-logo-base64';
|
|
5
|
-
import logoInverted from '@digigov/react-core/GovGRLogo/govgr-logo-blue-base64';
|
|
6
|
-
export interface GovGRLogoProps extends BaseProps<'a'> {}
|
|
7
|
-
/**
|
|
8
|
-
* Use this component anywhere you what to provide the gov.gr logo.
|
|
9
|
-
* */
|
|
10
|
-
export const GovGRLogo = React.forwardRef<HTMLAnchorElement, GovGRLogoProps>(
|
|
11
|
-
function GovGRLogo(
|
|
12
|
-
{ href = 'https://www.gov.gr/', className, ...props },
|
|
13
|
-
ref
|
|
14
|
-
) {
|
|
15
|
-
return (
|
|
16
|
-
<Base
|
|
17
|
-
as="a"
|
|
18
|
-
href={href}
|
|
19
|
-
ref={ref}
|
|
20
|
-
className={clsx(className, { 'ds-header__link': true })}
|
|
21
|
-
{...props}
|
|
22
|
-
>
|
|
23
|
-
<img
|
|
24
|
-
src={logo}
|
|
25
|
-
className={clsx(className, {
|
|
26
|
-
'ds-header__logo': true,
|
|
27
|
-
})}
|
|
28
|
-
alt="gov.gr logo"
|
|
29
|
-
/>
|
|
30
|
-
<img
|
|
31
|
-
src={logoInverted}
|
|
32
|
-
className={clsx(className, {
|
|
33
|
-
'ds-header__logo-inverted': true,
|
|
34
|
-
})}
|
|
35
|
-
alt="gov.gr logo"
|
|
36
|
-
/>
|
|
37
|
-
</Base>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
export default GovGRLogo;
|
package/src/HeaderLogo/index.tsx
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface HeaderLogoProps extends BaseProps<'a'> {
|
|
6
|
-
/**
|
|
7
|
-
* src is optional.
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
src?: string;
|
|
11
|
-
/**
|
|
12
|
-
* href is optional.
|
|
13
|
-
|
|
14
|
-
*/
|
|
15
|
-
altText?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Use this component inside the Header to provide a logo.
|
|
19
|
-
*/
|
|
20
|
-
export const HeaderLogo = React.forwardRef<HTMLAnchorElement, HeaderLogoProps>(
|
|
21
|
-
function HeaderLogo({ href, src, altText, className, ...props }, ref) {
|
|
22
|
-
return (
|
|
23
|
-
<Base
|
|
24
|
-
as="a"
|
|
25
|
-
href={href}
|
|
26
|
-
ref={ref}
|
|
27
|
-
className={clsx(className, {
|
|
28
|
-
'ds-header__link': true,
|
|
29
|
-
})}
|
|
30
|
-
{...props}
|
|
31
|
-
>
|
|
32
|
-
<img
|
|
33
|
-
src={src}
|
|
34
|
-
className={clsx(className, {
|
|
35
|
-
'ds-header__logo': true,
|
|
36
|
-
})}
|
|
37
|
-
alt={altText}
|
|
38
|
-
/>
|
|
39
|
-
</Base>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
export default HeaderLogo;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import HeaderTitle from '@digigov/react-core/HeaderTitle';
|
|
5
|
-
|
|
6
|
-
it('renders the HeaderTitle with no props', () => {
|
|
7
|
-
expect(
|
|
8
|
-
render(<HeaderTitle>hello</HeaderTitle>).baseElement
|
|
9
|
-
).toMatchSnapshot();
|
|
10
|
-
});
|
|
11
|
-
it('renders the HeaderTitle with href', () => {
|
|
12
|
-
expect(
|
|
13
|
-
render(<HeaderTitle href="https://government.gov.gr">hello</HeaderTitle>)
|
|
14
|
-
.baseElement
|
|
15
|
-
).toMatchSnapshot();
|
|
16
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface HeaderTitleProps extends BaseProps<'a'> {}
|
|
6
|
-
/**
|
|
7
|
-
* Use this component inside HeaderContent to provide a title to the header.
|
|
8
|
-
*/
|
|
9
|
-
export const HeaderTitle = React.forwardRef<
|
|
10
|
-
HTMLAnchorElement,
|
|
11
|
-
HeaderTitleProps
|
|
12
|
-
>(function HeaderTitle({ href = '/', className, children, ...props }, ref) {
|
|
13
|
-
return (
|
|
14
|
-
<Base
|
|
15
|
-
as="a"
|
|
16
|
-
ref={ref}
|
|
17
|
-
href={href}
|
|
18
|
-
className={clsx(className, {
|
|
19
|
-
'ds-header__title': true,
|
|
20
|
-
})}
|
|
21
|
-
{...props}
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</Base>
|
|
25
|
-
);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export default HeaderTitle;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
|
|
4
|
-
import NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';
|
|
5
|
-
|
|
6
|
-
it('renders the NavListItemActionContainer with no props', () => {
|
|
7
|
-
expect(
|
|
8
|
-
render(<NavListItemActionContainer>hello</NavListItemActionContainer>)
|
|
9
|
-
.baseElement
|
|
10
|
-
).toMatchSnapshot();
|
|
11
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import NavListItemLink from '@digigov/react-core/NavListItemLink';
|
|
4
|
-
|
|
5
|
-
it('renders the NavListItemLink with no props', () => {
|
|
6
|
-
expect(
|
|
7
|
-
render(<NavListItemLink>hello</NavListItemLink>).baseElement
|
|
8
|
-
).toMatchSnapshot();
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
it('renders the NavListItemLink with active=true', () => {
|
|
12
|
-
expect(
|
|
13
|
-
render(<NavListItemLink active={true}>hello</NavListItemLink>).baseElement
|
|
14
|
-
).toMatchSnapshot();
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it('renders the NavListItemLink with active=false', () => {
|
|
18
|
-
expect(
|
|
19
|
-
render(<NavListItemLink active={false}>hello</NavListItemLink>).baseElement
|
|
20
|
-
).toMatchSnapshot();
|
|
21
|
-
});
|
|
22
|
-
it('renders the NavListItemLink with href and active=false', () => {
|
|
23
|
-
expect(
|
|
24
|
-
render(
|
|
25
|
-
<NavListItemLink href="/" active={false}>
|
|
26
|
-
hello
|
|
27
|
-
</NavListItemLink>
|
|
28
|
-
).baseElement
|
|
29
|
-
).toMatchSnapshot();
|
|
30
|
-
});
|
|
31
|
-
it('renders the NavListItemLink with href and active=true', () => {
|
|
32
|
-
expect(
|
|
33
|
-
render(
|
|
34
|
-
<NavListItemLink href="/" active={false}>
|
|
35
|
-
hello
|
|
36
|
-
</NavListItemLink>
|
|
37
|
-
).baseElement
|
|
38
|
-
).toMatchSnapshot();
|
|
39
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|