@digigov/react-core 2.0.0-d0adc9fb → 2.0.0-d16ded05
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.d.ts +2 -28
- package/Accordion/index.js +3 -34
- package/Accordion/index.js.map +3 -3
- package/Accordion/index.native/index.js +22 -0
- package/Accordion/index.native/package.json +6 -0
- package/Accordion/index.native.d.ts +2 -0
- package/Accordion/index.native.js.map +7 -0
- package/Accordion/index.web/index.js +37 -0
- package/Accordion/index.web/package.json +6 -0
- package/Accordion/index.web.d.ts +28 -0
- package/Accordion/index.web.js.map +7 -0
- package/AccordionSection/index.d.ts +2 -11
- package/AccordionSection/index.js +3 -20
- package/AccordionSection/index.js.map +3 -3
- package/AccordionSection/index.native/index.js +21 -0
- package/AccordionSection/index.native/package.json +6 -0
- package/AccordionSection/index.native.d.ts +2 -0
- package/AccordionSection/index.native.js.map +7 -0
- package/AccordionSection/index.web/index.js +23 -0
- package/AccordionSection/index.web/package.json +6 -0
- package/AccordionSection/index.web.d.ts +10 -0
- package/AccordionSection/index.web.js.map +7 -0
- package/AccordionSectionSummaryHeading/index.d.ts +1 -0
- package/AccordionSectionSummaryHeading/index.js +5 -3
- 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/{ButtonLink → 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/compat/details.native/index.js +2 -1
- package/Base/compat/details.native.d.ts +2 -1
- package/Base/compat/details.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/BreadcrumbsListItemLinkBase/package.json +6 -0
- package/BreadcrumbsListItemWrapper/index.d.ts +10 -0
- package/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.js +4 -4
- package/BreadcrumbsListItemWrapper/index.js.map +7 -0
- package/{AutoCompleteInputTypeahead → BreadcrumbsListItemWrapper}/package.json +1 -1
- package/Button/index.js +2 -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/index.js +1 -1
- package/CopyToClipboardMessage/index.native.d.ts +1 -3
- package/CopyToClipboardMessage/index.native.js.map +1 -1
- package/DateInputItem/index.native/index.js +1 -1
- package/DateInputItem/index.native.d.ts +1 -3
- package/DateInputItem/index.native.js.map +1 -1
- package/Details/index.native/index.js +1 -1
- package/Details/index.native.d.ts +1 -3
- package/Details/index.native.js.map +1 -1
- package/DetailsContent/index.d.ts +1 -0
- package/DetailsContent/index.js +3 -2
- package/DetailsContent/index.js.map +2 -2
- package/ErrorSummary/index.d.ts +9 -0
- package/ErrorSummary/index.js +3 -3
- package/ErrorSummary/index.js.map +2 -2
- package/FileUpload/index.d.ts +7 -0
- package/FileUpload/index.js +12 -4
- package/FileUpload/index.js.map +2 -2
- package/FileUploadContainer/index.d.ts +7 -0
- package/FileUploadContainer/index.js +3 -2
- package/FileUploadContainer/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/{CallToAction → 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 +1 -0
- 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/index.js +1 -1
- package/NavListItemActionContainer/index.native.d.ts +0 -2
- package/NavListItemActionContainer/index.native.js.map +1 -1
- package/{NavListItemLink → NavListItemLinkBase}/index.d.ts +4 -4
- package/{NavListItemLink → NavListItemLinkBase}/index.js +6 -6
- package/NavListItemLinkBase/index.js.map +7 -0
- package/{BreadcrumbsListItem → NavListItemLinkBase}/package.json +1 -1
- package/NotificationBannerContainer/index.d.ts +2 -1
- package/NotificationBannerContainer/index.js.map +2 -2
- package/NotificationBannerContent/index.d.ts +22 -0
- package/NotificationBannerContent/index.js +14 -3
- package/NotificationBannerContent/index.js.map +2 -2
- package/NotificationBannerLink/index.native/index.js +1 -1
- package/NotificationBannerLink/index.native.d.ts +1 -3
- package/NotificationBannerLink/index.native.js.map +1 -1
- package/Skeleton/index.js +2 -1
- package/Skeleton/index.js.map +2 -2
- package/SummaryList/index.d.ts +10 -2
- package/SummaryList/index.js +10 -2
- package/SummaryList/index.js.map +2 -2
- package/SummaryListItem/index.js +1 -1
- package/SummaryListItem/index.js.map +2 -2
- package/SummaryListItemKey/index.d.ts +14 -0
- package/SummaryListItemKey/index.js +14 -2
- package/SummaryListItemKey/index.js.map +2 -2
- package/SummaryListItemValue/index.d.ts +14 -0
- package/SummaryListItemValue/index.js +11 -2
- package/SummaryListItemValue/index.js.map +2 -2
- 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 +22 -0
- package/TableDataCell/index.js +18 -2
- package/TableDataCell/index.js.map +2 -2
- package/TextArea/index.native/index.js +1 -1
- package/TextArea/index.native.d.ts +1 -3
- package/TextArea/index.native.js.map +1 -1
- package/TextInput/index.native/index.js +1 -1
- package/TextInput/index.native.d.ts +1 -3
- package/TextInput/index.native.js.map +1 -1
- 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/Accordion/index.js +5 -35
- package/cjs/Accordion/index.js.map +3 -3
- package/cjs/{utils/extend.native → Accordion/index.native}/index.js +22 -16
- package/cjs/Accordion/index.native.js.map +7 -0
- package/cjs/{ButtonLink → Accordion/index.web}/index.js +24 -16
- package/cjs/Accordion/index.web.js.map +7 -0
- package/cjs/AccordionSection/index.js +5 -21
- package/cjs/AccordionSection/index.js.map +3 -3
- package/cjs/{CheckboxItemInput → AccordionSection}/index.native/index.js +13 -12
- package/cjs/AccordionSection/index.native.js.map +7 -0
- package/cjs/{HeaderTitle → AccordionSection/index.web}/index.js +11 -12
- package/cjs/AccordionSection/index.web.js.map +7 -0
- package/cjs/AccordionSectionSummaryHeading/index.js +5 -3
- 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/compat/details.native/index.js +2 -1
- package/cjs/Base/compat/details.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/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.js +8 -8
- package/cjs/BreadcrumbsListItemWrapper/index.js.map +7 -0
- package/cjs/Button/index.js +2 -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/CopyToClipboardMessage/index.native/index.js +2 -2
- package/cjs/CopyToClipboardMessage/index.native.js.map +2 -2
- package/cjs/DateInputItem/index.native/index.js +2 -2
- package/cjs/DateInputItem/index.native.js.map +2 -2
- package/cjs/Details/index.native/index.js +2 -2
- package/cjs/Details/index.native.js.map +2 -2
- package/cjs/DetailsContent/index.js +3 -2
- package/cjs/DetailsContent/index.js.map +2 -2
- package/cjs/ErrorSummary/index.js +3 -3
- package/cjs/ErrorSummary/index.js.map +2 -2
- package/cjs/FileUpload/index.js +12 -4
- package/cjs/FileUpload/index.js.map +2 -2
- package/cjs/FileUploadContainer/index.js +3 -2
- package/cjs/FileUploadContainer/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 +1 -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/HeaderTitleBase/index.js +57 -0
- 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/NavListItemActionContainer/index.native/index.js +2 -2
- package/cjs/NavListItemActionContainer/index.native.js.map +2 -2
- package/cjs/{NavListItemLink → NavListItemLinkBase}/index.js +10 -10
- package/cjs/NavListItemLinkBase/index.js.map +7 -0
- package/cjs/NotificationBannerContainer/index.js.map +2 -2
- package/cjs/NotificationBannerContent/index.js +14 -3
- package/cjs/NotificationBannerContent/index.js.map +2 -2
- package/cjs/NotificationBannerLink/index.native/index.js +2 -2
- package/cjs/NotificationBannerLink/index.native.js.map +2 -2
- package/cjs/Skeleton/index.js +2 -1
- package/cjs/Skeleton/index.js.map +2 -2
- package/cjs/SummaryList/index.js +10 -2
- package/cjs/SummaryList/index.js.map +2 -2
- package/cjs/SummaryListItem/index.js +1 -1
- package/cjs/SummaryListItem/index.js.map +2 -2
- package/cjs/SummaryListItemKey/index.js +14 -2
- package/cjs/SummaryListItemKey/index.js.map +3 -3
- package/cjs/SummaryListItemValue/index.js +11 -2
- package/cjs/SummaryListItemValue/index.js.map +3 -3
- package/cjs/Table/index.js +4 -1
- package/cjs/Table/index.js.map +2 -2
- package/cjs/TableDataCell/index.js +18 -2
- package/cjs/TableDataCell/index.js.map +3 -3
- package/cjs/TextArea/index.native/index.js +2 -2
- package/cjs/TextArea/index.native.js.map +2 -2
- package/cjs/TextInput/index.native/index.js +2 -2
- package/cjs/TextInput/index.native.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 +24 -26
- package/cjs/index.js.map +2 -2
- package/cjs/lazy/index.js +15 -16
- package/cjs/lazy.js.map +2 -2
- package/cjs/registry/index.js +40 -38
- package/cjs/registry.js.map +2 -2
- package/cjs/utils/index.native/index.js +86 -0
- package/cjs/utils/index.native.js.map +7 -0
- package/index.d.ts +12 -13
- package/index.js +13 -14
- package/index.js.map +2 -2
- package/lazy/index.js +15 -16
- package/package.json +5 -5
- package/registry/index.js +40 -38
- package/src/Accordion/__snapshots__/index.test.tsx.snap +48 -0
- package/src/Accordion/index.native.tsx +19 -0
- package/src/Accordion/index.test.tsx +24 -0
- package/src/Accordion/index.tsx +2 -71
- package/src/Accordion/index.web.tsx +71 -0
- package/src/AccordionSection/index.native.tsx +18 -0
- package/src/AccordionSection/index.tsx +2 -28
- package/src/AccordionSection/index.web.tsx +27 -0
- package/src/AccordionSectionSummaryHeading/__snapshots__/index.test.tsx.snap +17 -0
- package/src/AccordionSectionSummaryHeading/index.test.tsx +9 -0
- package/src/AccordionSectionSummaryHeading/index.tsx +12 -4
- 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/compat/details.native.tsx +3 -1
- 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/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.test.tsx +1 -1
- package/src/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.tsx +5 -5
- package/src/Button/index.tsx +2 -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/CopyToClipboardMessage/index.native.tsx +1 -1
- package/src/DateInputItem/index.native.tsx +1 -1
- package/src/Details/index.native.tsx +1 -1
- package/src/DetailsContent/index.tsx +11 -2
- package/src/ErrorSummary/index.tsx +17 -4
- package/src/FieldContainer/__snapshots__/index.test.tsx.snap +3 -3
- package/src/FileUpload/index.tsx +20 -4
- package/src/FileUploadContainer/index.tsx +10 -1
- 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 +2 -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/NavListItemActionContainer/index.native.tsx +1 -1
- 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/NotificationBannerContainer/index.tsx +2 -1
- package/src/NotificationBannerContent/index.tsx +50 -4
- package/src/NotificationBannerLink/index.native.tsx +1 -1
- package/src/RadioConditional/__snapshots__/index.test.tsx.snap +1 -1
- package/src/RadioItem/__snapshots__/index.test.tsx.snap +0 -4
- package/src/Skeleton/index.tsx +3 -2
- package/src/SummaryList/__snapshots__/index.test.tsx.snap +36 -0
- package/src/SummaryList/index.test.tsx +15 -0
- package/src/SummaryList/index.tsx +20 -3
- package/src/SummaryListItem/index.tsx +1 -1
- package/src/SummaryListItemKey/__snapshots__/index.test.tsx.snap +70 -0
- package/src/SummaryListItemKey/index.test.tsx +29 -0
- package/src/SummaryListItemKey/index.tsx +29 -1
- package/src/SummaryListItemValue/__snapshots__/index.test.tsx.snap +34 -0
- package/src/SummaryListItemValue/index.test.tsx +14 -0
- package/src/SummaryListItemValue/index.tsx +30 -2
- package/src/Table/index.tsx +12 -0
- package/src/TableDataCell/__snapshots__/index.test.tsx.snap +79 -2
- package/src/TableDataCell/index.test.tsx +42 -0
- package/src/TableDataCell/index.tsx +56 -1
- package/src/TableRow/__snapshots__/index.test.tsx.snap +1 -1
- package/src/TableRow/index.test.tsx +1 -1
- package/src/TextArea/index.native.tsx +1 -1
- package/src/TextInput/index.native.tsx +1 -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 +12 -13
- package/src/lazy.js +15 -16
- package/src/registry.js +40 -38
- package/src/utils/index.native.tsx +122 -0
- package/utils/index.native/index.js +52 -0
- package/utils/index.native/package.json +6 -0
- package/utils/index.native.d.ts +43 -0
- package/utils/index.native.js.map +7 -0
- 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/BreadcrumbsListItem/index.d.ts +0 -10
- package/BreadcrumbsListItem/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/CheckboxItemInput/index.native/index.js +0 -20
- package/CheckboxItemInput/index.native/package.json +0 -6
- package/CheckboxItemInput/index.native.d.ts +0 -4
- package/CheckboxItemInput/index.native.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/BreadcrumbsListItem/index.js.map +0 -7
- package/cjs/BreadcrumbsListItemLink/index.js.map +0 -7
- package/cjs/ButtonLink/index.js.map +0 -7
- package/cjs/CallToAction/index.js.map +0 -7
- package/cjs/CheckboxItemInput/index.native.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/cjs/utils/extend.native.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/CheckboxItemInput/index.native.tsx +0 -17
- 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/src/utils/extend.native.tsx +0 -36
- package/utils/extend.native/index.js +0 -14
- package/utils/extend.native/package.json +0 -6
- package/utils/extend.native.d.ts +0 -23
- package/utils/extend.native.js.map +0 -7
- /package/{AutoCompleteInputTypeahead → BackLinkBase}/index.test.d.ts +0 -0
- /package/{BackLink → BreadcrumbsListItemLinkBase}/index.test.d.ts +0 -0
- /package/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/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/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/__snapshots__/index.test.tsx.snap +0 -0
- /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js +0 -0
- /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.ts +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { LinkBase, LinkBaseProps } from '@digigov/react-core/LinkBase';
|
|
4
|
+
|
|
5
|
+
export interface ButtonLinkBaseProps extends LinkBaseProps {
|
|
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 ButtonLinkBase = React.forwardRef<
|
|
31
|
+
HTMLAnchorElement,
|
|
32
|
+
ButtonLinkBaseProps
|
|
33
|
+
>(function ButtonLinkBase(
|
|
34
|
+
{ color = 'primary', dense, className, children, ...props },
|
|
35
|
+
ref
|
|
36
|
+
) {
|
|
37
|
+
return (
|
|
38
|
+
<LinkBase
|
|
39
|
+
ref={ref}
|
|
40
|
+
defaultStyle={false}
|
|
41
|
+
className={clsx(className, {
|
|
42
|
+
'ds-btn': true,
|
|
43
|
+
'ds-btn--dense': dense,
|
|
44
|
+
'ds-btn-primary': color === 'primary',
|
|
45
|
+
'ds-btn-secondary': color === 'secondary',
|
|
46
|
+
'ds-btn-warning': color === 'warning',
|
|
47
|
+
})}
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
{children}
|
|
51
|
+
</LinkBase>
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export default ButtonLinkBase;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
|
|
4
|
+
import CallToActionBase from '@digigov/react-core/CallToActionBase';
|
|
5
|
+
|
|
6
|
+
it('renders the CallToActionBase with no props', () => {
|
|
7
|
+
expect(
|
|
8
|
+
render(<CallToActionBase>hello</CallToActionBase>).baseElement
|
|
9
|
+
).toMatchSnapshot();
|
|
10
|
+
});
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import
|
|
3
|
+
import ButtonLinkBase, {
|
|
4
|
+
ButtonLinkBaseProps,
|
|
5
|
+
} from '@digigov/react-core/ButtonLinkBase';
|
|
4
6
|
import { ChevronIcon } from '@digigov/react-icons';
|
|
5
7
|
|
|
6
|
-
export interface
|
|
8
|
+
export interface CallToActionBaseProps extends ButtonLinkBaseProps {}
|
|
7
9
|
/**
|
|
8
10
|
* Use this button for the main call to action on your service’s start page.
|
|
9
11
|
*/
|
|
10
|
-
export const
|
|
12
|
+
export const CallToActionBase = React.forwardRef<
|
|
11
13
|
HTMLAnchorElement,
|
|
12
|
-
|
|
13
|
-
>(function
|
|
14
|
+
CallToActionBaseProps
|
|
15
|
+
>(function CallToActionBase(
|
|
14
16
|
{ printHidden = true, className, children, ...props },
|
|
15
17
|
ref
|
|
16
18
|
) {
|
|
17
19
|
return (
|
|
18
|
-
<
|
|
20
|
+
<ButtonLinkBase
|
|
19
21
|
ref={ref}
|
|
20
22
|
printHidden={printHidden}
|
|
21
23
|
className={clsx(className, {
|
|
@@ -25,8 +27,8 @@ export const CallToAction = React.forwardRef<
|
|
|
25
27
|
>
|
|
26
28
|
{children}
|
|
27
29
|
<ChevronIcon className="ds-btn-cta__icon" />
|
|
28
|
-
</
|
|
30
|
+
</ButtonLinkBase>
|
|
29
31
|
);
|
|
30
32
|
});
|
|
31
33
|
|
|
32
|
-
export default
|
|
34
|
+
export default CallToActionBase;
|
|
@@ -16,7 +16,6 @@ exports[`renders the Checkbox with dense prop and CheckboxItems 1`] = `
|
|
|
16
16
|
<input
|
|
17
17
|
class="ds-checkboxes__input"
|
|
18
18
|
type="checkbox"
|
|
19
|
-
value=""
|
|
20
19
|
/>
|
|
21
20
|
</label>
|
|
22
21
|
</div>
|
|
@@ -30,7 +29,6 @@ exports[`renders the Checkbox with dense prop and CheckboxItems 1`] = `
|
|
|
30
29
|
<input
|
|
31
30
|
class="ds-checkboxes__input"
|
|
32
31
|
type="checkbox"
|
|
33
|
-
value=""
|
|
34
32
|
/>
|
|
35
33
|
</label>
|
|
36
34
|
</div>
|
|
@@ -55,7 +53,6 @@ exports[`renders the Checkbox with layout=horizontal and CheckboxItems 1`] = `
|
|
|
55
53
|
<input
|
|
56
54
|
class="ds-checkboxes__input"
|
|
57
55
|
type="checkbox"
|
|
58
|
-
value=""
|
|
59
56
|
/>
|
|
60
57
|
</label>
|
|
61
58
|
</div>
|
|
@@ -69,7 +66,6 @@ exports[`renders the Checkbox with layout=horizontal and CheckboxItems 1`] = `
|
|
|
69
66
|
<input
|
|
70
67
|
class="ds-checkboxes__input"
|
|
71
68
|
type="checkbox"
|
|
72
|
-
value=""
|
|
73
69
|
/>
|
|
74
70
|
</label>
|
|
75
71
|
</div>
|
|
@@ -106,7 +102,6 @@ exports[`renders the Checkbox with no props and CheckboxItem 1`] = `
|
|
|
106
102
|
<input
|
|
107
103
|
class="ds-checkboxes__input"
|
|
108
104
|
type="checkbox"
|
|
109
|
-
value=""
|
|
110
105
|
/>
|
|
111
106
|
</label>
|
|
112
107
|
</div>
|
|
@@ -14,7 +14,6 @@ exports[`renders the CheckboxItem with \`disabled\` prop 1`] = `
|
|
|
14
14
|
class="ds-checkboxes__input"
|
|
15
15
|
disabled=""
|
|
16
16
|
type="checkbox"
|
|
17
|
-
value=""
|
|
18
17
|
/>
|
|
19
18
|
</label>
|
|
20
19
|
</div>
|
|
@@ -40,7 +39,6 @@ exports[`renders the CheckboxItem with \`divider\` prop 1`] = `
|
|
|
40
39
|
<input
|
|
41
40
|
class="ds-checkboxes__input"
|
|
42
41
|
type="checkbox"
|
|
43
|
-
value=""
|
|
44
42
|
/>
|
|
45
43
|
</label>
|
|
46
44
|
</div>
|
|
@@ -62,7 +60,6 @@ exports[`renders the CheckboxItem with \`name\` prop 1`] = `
|
|
|
62
60
|
class="ds-checkboxes__input"
|
|
63
61
|
name="example"
|
|
64
62
|
type="checkbox"
|
|
65
|
-
value=""
|
|
66
63
|
/>
|
|
67
64
|
</label>
|
|
68
65
|
</div>
|
|
@@ -155,7 +152,6 @@ exports[`renders the CheckboxItem with no props 1`] = `
|
|
|
155
152
|
<input
|
|
156
153
|
class="ds-checkboxes__input"
|
|
157
154
|
type="checkbox"
|
|
158
|
-
value=""
|
|
159
155
|
/>
|
|
160
156
|
</label>
|
|
161
157
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`renders the
|
|
3
|
+
exports[`renders the CircularProgressBase 1`] = `
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<svg
|
|
@@ -22,7 +22,7 @@ exports[`renders the CircularProgress 1`] = `
|
|
|
22
22
|
</body>
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
|
-
exports[`renders the
|
|
25
|
+
exports[`renders the CircularProgressBase with color=secondary and size lg props 1`] = `
|
|
26
26
|
<body>
|
|
27
27
|
<div>
|
|
28
28
|
<svg
|
|
@@ -44,7 +44,7 @@ exports[`renders the CircularProgress with color=secondary and size lg props 1`]
|
|
|
44
44
|
</body>
|
|
45
45
|
`;
|
|
46
46
|
|
|
47
|
-
exports[`renders the
|
|
47
|
+
exports[`renders the CircularProgressBase with color=secondary and size sm props 1`] = `
|
|
48
48
|
<body>
|
|
49
49
|
<div>
|
|
50
50
|
<svg
|
|
@@ -66,7 +66,7 @@ exports[`renders the CircularProgress with color=secondary and size sm props 1`]
|
|
|
66
66
|
</body>
|
|
67
67
|
`;
|
|
68
68
|
|
|
69
|
-
exports[`renders the
|
|
69
|
+
exports[`renders the CircularProgressBase with color=secondary prop 1`] = `
|
|
70
70
|
<body>
|
|
71
71
|
<div>
|
|
72
72
|
<svg
|
|
@@ -88,7 +88,7 @@ exports[`renders the CircularProgress with color=secondary prop 1`] = `
|
|
|
88
88
|
</body>
|
|
89
89
|
`;
|
|
90
90
|
|
|
91
|
-
exports[`renders the
|
|
91
|
+
exports[`renders the CircularProgressBase with size lg 1`] = `
|
|
92
92
|
<body>
|
|
93
93
|
<div>
|
|
94
94
|
<svg
|
|
@@ -110,7 +110,7 @@ exports[`renders the CircularProgress with size lg 1`] = `
|
|
|
110
110
|
</body>
|
|
111
111
|
`;
|
|
112
112
|
|
|
113
|
-
exports[`renders the
|
|
113
|
+
exports[`renders the CircularProgressBase with size sm 1`] = `
|
|
114
114
|
<body>
|
|
115
115
|
<div>
|
|
116
116
|
<svg
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
|
|
4
|
+
import CircularProgressBase from '@digigov/react-core/CircularProgressBase';
|
|
5
|
+
|
|
6
|
+
it('renders the CircularProgressBase', () => {
|
|
7
|
+
expect(render(<CircularProgressBase />).baseElement).toMatchSnapshot();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders the CircularProgressBase with size sm', () => {
|
|
11
|
+
expect(
|
|
12
|
+
render(<CircularProgressBase size="sm" />).baseElement
|
|
13
|
+
).toMatchSnapshot();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('renders the CircularProgressBase with size lg', () => {
|
|
17
|
+
expect(
|
|
18
|
+
render(<CircularProgressBase size="lg" />).baseElement
|
|
19
|
+
).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('renders the CircularProgressBase with color=secondary prop', () => {
|
|
23
|
+
expect(
|
|
24
|
+
render(<CircularProgressBase color={'secondary'} />).baseElement
|
|
25
|
+
).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('renders the CircularProgressBase with color=secondary and size sm props', () => {
|
|
29
|
+
expect(
|
|
30
|
+
render(<CircularProgressBase color={'secondary'} size="sm" />).baseElement
|
|
31
|
+
).toMatchSnapshot();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('renders the CircularProgressBase with color=secondary and size lg props', () => {
|
|
35
|
+
expect(
|
|
36
|
+
render(<CircularProgressBase color={'secondary'} size="lg" />).baseElement
|
|
37
|
+
).toMatchSnapshot();
|
|
38
|
+
});
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface CircularProgressBaseProps extends BaseProps<'svg'> {
|
|
6
6
|
/**
|
|
7
7
|
* color prop is optional.
|
|
8
8
|
* color prop is used to change the color of the loader.
|
|
@@ -22,12 +22,12 @@ export interface CircularProgressProps extends BaseProps<'svg'> {
|
|
|
22
22
|
size?: 'sm' | 'md' | 'lg';
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Use
|
|
26
|
-
*
|
|
25
|
+
* Use CircularProgressBase component as an animated loader.
|
|
26
|
+
* CircularProgressBase can be used inside LoaderContainer component.
|
|
27
27
|
*/
|
|
28
|
-
export const
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
export const CircularProgressBase = React.forwardRef<
|
|
29
|
+
SVGElement,
|
|
30
|
+
CircularProgressBaseProps
|
|
31
31
|
>(function CircularProgress(
|
|
32
32
|
{ color = 'primary', size = 'md', className, ...props },
|
|
33
33
|
ref
|
|
@@ -60,4 +60,4 @@ export const CircularProgress = React.forwardRef<
|
|
|
60
60
|
);
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
export default
|
|
63
|
+
export default CircularProgressBase;
|
|
@@ -4,7 +4,7 @@ exports[`renders the Container with cols={false} prop 1`] = `
|
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<div
|
|
7
|
-
class="ds-container ds-container--full-width"
|
|
7
|
+
class="ds-container ds-container--full-width ds-grid-item"
|
|
8
8
|
>
|
|
9
9
|
hello
|
|
10
10
|
</div>
|
|
@@ -16,7 +16,7 @@ exports[`renders the Container with fullWidth prop 1`] = `
|
|
|
16
16
|
<body>
|
|
17
17
|
<div>
|
|
18
18
|
<div
|
|
19
|
-
class="ds-container ds-container--full-width ds-grid ds-gap-sm-12"
|
|
19
|
+
class="ds-container ds-container--full-width ds-grid ds-grid-item ds-gap-sm-12"
|
|
20
20
|
>
|
|
21
21
|
hello
|
|
22
22
|
</div>
|
|
@@ -28,7 +28,7 @@ exports[`renders the Container with no props 1`] = `
|
|
|
28
28
|
<body>
|
|
29
29
|
<div>
|
|
30
30
|
<div
|
|
31
|
-
class="ds-container ds-grid ds-gap-sm-12"
|
|
31
|
+
class="ds-container ds-grid ds-grid-item ds-gap-sm-12"
|
|
32
32
|
>
|
|
33
33
|
hello
|
|
34
34
|
</div>
|
|
@@ -3,7 +3,7 @@ import { CopyToClipboardContainerProps } from '@digigov/react-core/CopyToClipboa
|
|
|
3
3
|
import CoreCopyToClipboardMessage, {
|
|
4
4
|
CopyToClipboardMessageProps,
|
|
5
5
|
} from '@digigov/react-core/CopyToClipboardMessage/index.web';
|
|
6
|
-
import { extend } from '@digigov/react-core/utils/
|
|
6
|
+
import { extend } from '@digigov/react-core/utils/index.native';
|
|
7
7
|
|
|
8
8
|
export const CopyToClipboardMessage = extend<
|
|
9
9
|
CopyToClipboardMessageProps,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import CoreDateInputItem from '@digigov/react-core/DateInputItem/index.web';
|
|
2
|
-
import extend from '@digigov/react-core/utils/
|
|
2
|
+
import extend from '@digigov/react-core/utils/index.native';
|
|
3
3
|
export const DateInputItem = extend(CoreDateInputItem, (props) => {
|
|
4
4
|
return {
|
|
5
5
|
...props,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import CoreDetails from '@digigov/react-core/Details/index.web';
|
|
2
|
-
import { extend } from '@digigov/react-core/utils/
|
|
2
|
+
import { extend } from '@digigov/react-core/utils/index.native';
|
|
3
3
|
|
|
4
4
|
export const Details = extend(CoreDetails, ({ className, ...props }) => {
|
|
5
5
|
return {
|
|
@@ -2,7 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
4
|
|
|
5
|
-
export interface DetailsContentProps extends BaseProps<'div'> {
|
|
5
|
+
export interface DetailsContentProps extends BaseProps<'div'> {
|
|
6
|
+
/*
|
|
7
|
+
** color is optional. Default value is 'primary'.
|
|
8
|
+
* @value 'primary'
|
|
9
|
+
* @value 'secondary'
|
|
10
|
+
* @default 'primary'
|
|
11
|
+
* */
|
|
12
|
+
color?: 'primary' | 'secondary';
|
|
13
|
+
}
|
|
6
14
|
/**
|
|
7
15
|
*DetailsContent component wraps the content text.
|
|
8
16
|
*It is used inside Details component as children
|
|
@@ -10,13 +18,14 @@ export interface DetailsContentProps extends BaseProps<'div'> {}
|
|
|
10
18
|
export const DetailsContent = React.forwardRef<
|
|
11
19
|
HTMLDivElement,
|
|
12
20
|
DetailsContentProps
|
|
13
|
-
>(function DetailsContent({ className, children, ...props }, ref) {
|
|
21
|
+
>(function DetailsContent({ color, className, children, ...props }, ref) {
|
|
14
22
|
return (
|
|
15
23
|
<Base
|
|
16
24
|
as="div"
|
|
17
25
|
ref={ref}
|
|
18
26
|
className={clsx(className, {
|
|
19
27
|
'ds-details__content': true,
|
|
28
|
+
'ds-details__content--secondary': color === 'secondary',
|
|
20
29
|
})}
|
|
21
30
|
{...props}
|
|
22
31
|
>
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
3
|
import NotificationBannerContainer from '@digigov/react-core/NotificationBannerContainer';
|
|
4
4
|
import NotificationBannerContent from '@digigov/react-core/NotificationBannerContent';
|
|
5
|
-
|
|
6
5
|
export interface ErrorSummaryProps extends BaseProps<'div'> {
|
|
7
6
|
/**
|
|
8
7
|
* dense is optional.
|
|
@@ -11,21 +10,35 @@ export interface ErrorSummaryProps extends BaseProps<'div'> {
|
|
|
11
10
|
* @default false
|
|
12
11
|
* */
|
|
13
12
|
dense?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* variant is optional.
|
|
15
|
+
* variant error is used to change the color of the NotificationBannerContainer.
|
|
16
|
+
* variant error-group is used to display red line on the left side of the component and exclamation mark icon with light red as background.
|
|
17
|
+
* @value 'error'
|
|
18
|
+
* @value 'error-group'
|
|
19
|
+
* @default 'error'.
|
|
20
|
+
*/
|
|
21
|
+
variant?: 'error' | 'error-group';
|
|
14
22
|
}
|
|
15
23
|
/**
|
|
16
24
|
* Use this component at the top of a page to summarize any errors a user has made.
|
|
17
25
|
*/
|
|
18
26
|
export const ErrorSummary = React.forwardRef<HTMLDivElement, ErrorSummaryProps>(
|
|
19
|
-
function ErrorSummary(
|
|
27
|
+
function ErrorSummary(
|
|
28
|
+
{ className, dense, children, variant = 'error', ...props },
|
|
29
|
+
ref
|
|
30
|
+
) {
|
|
20
31
|
return (
|
|
21
32
|
<NotificationBannerContainer
|
|
22
|
-
variant={
|
|
33
|
+
variant={variant}
|
|
23
34
|
className={className}
|
|
24
35
|
ref={ref}
|
|
25
36
|
dense={dense}
|
|
26
37
|
{...props}
|
|
27
38
|
>
|
|
28
|
-
<NotificationBannerContent
|
|
39
|
+
<NotificationBannerContent variant={variant}>
|
|
40
|
+
{children}
|
|
41
|
+
</NotificationBannerContent>
|
|
29
42
|
</NotificationBannerContainer>
|
|
30
43
|
);
|
|
31
44
|
}
|
|
@@ -4,7 +4,7 @@ exports[`renders the FieldContainer with error=false 1`] = `
|
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<div
|
|
7
|
-
class="ds-field xs:ds-grid__col-span-12"
|
|
7
|
+
class="ds-field ds-grid-item xs:ds-grid__col-span-12"
|
|
8
8
|
>
|
|
9
9
|
hello
|
|
10
10
|
</div>
|
|
@@ -16,7 +16,7 @@ exports[`renders the FieldContainer with error=true 1`] = `
|
|
|
16
16
|
<body>
|
|
17
17
|
<div>
|
|
18
18
|
<div
|
|
19
|
-
class="ds-field ds-field--error xs:ds-grid__col-span-12"
|
|
19
|
+
class="ds-field ds-field--error ds-grid-item xs:ds-grid__col-span-12"
|
|
20
20
|
>
|
|
21
21
|
hello
|
|
22
22
|
</div>
|
|
@@ -28,7 +28,7 @@ exports[`renders the FieldContainer with no props 1`] = `
|
|
|
28
28
|
<body>
|
|
29
29
|
<div>
|
|
30
30
|
<div
|
|
31
|
-
class="ds-field xs:ds-grid__col-span-12"
|
|
31
|
+
class="ds-field ds-grid-item xs:ds-grid__col-span-12"
|
|
32
32
|
>
|
|
33
33
|
hello
|
|
34
34
|
</div>
|
package/src/FileUpload/index.tsx
CHANGED
|
@@ -10,6 +10,14 @@ export interface FileUploadProps extends BaseProps<'input'> {
|
|
|
10
10
|
* @default false
|
|
11
11
|
*/
|
|
12
12
|
hasFiles?: boolean;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* variant is optional.
|
|
16
|
+
* @value 'button'
|
|
17
|
+
* @value 'link'
|
|
18
|
+
* @default 'button'
|
|
19
|
+
*/
|
|
20
|
+
variant?: 'button' | 'link';
|
|
13
21
|
}
|
|
14
22
|
/**
|
|
15
23
|
* Details for the FileUpload.
|
|
@@ -17,7 +25,15 @@ export interface FileUploadProps extends BaseProps<'input'> {
|
|
|
17
25
|
*/
|
|
18
26
|
export const FileUpload = React.forwardRef<HTMLInputElement, FileUploadProps>(
|
|
19
27
|
function FileUpload(
|
|
20
|
-
{
|
|
28
|
+
{
|
|
29
|
+
name,
|
|
30
|
+
className,
|
|
31
|
+
children,
|
|
32
|
+
disabled,
|
|
33
|
+
hasFiles = false,
|
|
34
|
+
variant = 'button',
|
|
35
|
+
...props
|
|
36
|
+
},
|
|
21
37
|
ref
|
|
22
38
|
) {
|
|
23
39
|
return (
|
|
@@ -27,9 +43,9 @@ export const FileUpload = React.forwardRef<HTMLInputElement, FileUploadProps>(
|
|
|
27
43
|
role="button"
|
|
28
44
|
className={clsx(className, {
|
|
29
45
|
'ds-label-file': true,
|
|
30
|
-
'ds-btn': !hasFiles,
|
|
31
|
-
'ds-btn-secondary': !hasFiles,
|
|
32
|
-
'ds-link': hasFiles,
|
|
46
|
+
'ds-btn': !hasFiles && variant === 'button',
|
|
47
|
+
'ds-btn-secondary': !hasFiles && variant === 'button',
|
|
48
|
+
'ds-link': hasFiles || variant === 'link',
|
|
33
49
|
})}
|
|
34
50
|
>
|
|
35
51
|
<Base
|
|
@@ -10,6 +10,14 @@ export interface FileUploadContainerProps extends BaseProps<'div'> {
|
|
|
10
10
|
* @default false
|
|
11
11
|
*/
|
|
12
12
|
hasFiles?: boolean;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* variant is optional.
|
|
16
|
+
* @value 'default'
|
|
17
|
+
* @value 'border'
|
|
18
|
+
* @default 'default'
|
|
19
|
+
*/
|
|
20
|
+
variant?: 'border' | 'default';
|
|
13
21
|
}
|
|
14
22
|
/**
|
|
15
23
|
* Details for the FileUploadContainer.
|
|
@@ -19,7 +27,7 @@ export const FileUploadContainer = React.forwardRef<
|
|
|
19
27
|
HTMLDivElement,
|
|
20
28
|
FileUploadContainerProps
|
|
21
29
|
>(function FileUploadContainer(
|
|
22
|
-
{ className, children, hasFiles = false, ...props },
|
|
30
|
+
{ className, children, hasFiles = false, variant = 'default', ...props },
|
|
23
31
|
ref
|
|
24
32
|
) {
|
|
25
33
|
return (
|
|
@@ -28,6 +36,7 @@ export const FileUploadContainer = React.forwardRef<
|
|
|
28
36
|
as="div"
|
|
29
37
|
className={clsx(className, {
|
|
30
38
|
'ds-uploaded-file': hasFiles,
|
|
39
|
+
'ds-uploaded-file-border': variant === 'border',
|
|
31
40
|
})}
|
|
32
41
|
{...props}
|
|
33
42
|
>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`renders the
|
|
3
|
+
exports[`renders the FooterLinkBase with href prop 1`] = `
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<a
|
|
@@ -13,7 +13,7 @@ exports[`renders the FooterLink with href prop 1`] = `
|
|
|
13
13
|
</body>
|
|
14
14
|
`;
|
|
15
15
|
|
|
16
|
-
exports[`renders the
|
|
16
|
+
exports[`renders the FooterLinkBase with no props 1`] = `
|
|
17
17
|
<body>
|
|
18
18
|
<div>
|
|
19
19
|
<a
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
|
|
4
|
+
import FooterLinkBase from '@digigov/react-core/FooterLinkBase';
|
|
5
|
+
|
|
6
|
+
it('renders the FooterLinkBase with no props', () => {
|
|
7
|
+
expect(
|
|
8
|
+
render(<FooterLinkBase>hello</FooterLinkBase>).baseElement
|
|
9
|
+
).toMatchSnapshot();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('renders the FooterLinkBase with href prop', () => {
|
|
13
|
+
expect(
|
|
14
|
+
render(<FooterLinkBase href={'#'}>hello</FooterLinkBase>).baseElement
|
|
15
|
+
).toMatchSnapshot();
|
|
16
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { LinkBase, LinkBaseProps } from '@digigov/react-core/LinkBase';
|
|
4
|
+
|
|
5
|
+
export interface FooterLinkBaseProps extends LinkBaseProps {}
|
|
6
|
+
/**
|
|
7
|
+
* FooterLink in used inside the Footer component.
|
|
8
|
+
*/
|
|
9
|
+
export const FooterLinkBase = React.forwardRef<
|
|
10
|
+
HTMLAnchorElement,
|
|
11
|
+
FooterLinkBaseProps
|
|
12
|
+
>(function FooterLinkBase({ className, children, ...props }, ref) {
|
|
13
|
+
return (
|
|
14
|
+
<LinkBase
|
|
15
|
+
ref={ref}
|
|
16
|
+
defaultStyle={false}
|
|
17
|
+
className={clsx(className, {
|
|
18
|
+
'ds-footer__link': true,
|
|
19
|
+
})}
|
|
20
|
+
{...props}
|
|
21
|
+
>
|
|
22
|
+
{children}
|
|
23
|
+
</LinkBase>
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export default FooterLinkBase;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
|
|
4
|
+
import GovGRLogoBase from '@digigov/react-core/GovGRLogoBase';
|
|
5
|
+
|
|
6
|
+
it('renders the GovGRLogoBase with no props', () => {
|
|
7
|
+
expect(render(<GovGRLogoBase />).baseElement).toMatchSnapshot();
|
|
8
|
+
});
|