@digigov/react-core 2.0.0-0c4be34e → 2.0.0-107d908d
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 +11 -0
- package/AccordionSection/index.web.js.map +7 -0
- package/AccordionSectionSummaryHeading/index.js +2 -1
- 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/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/CallToActionBase/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/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.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/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/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/{BackLink → Accordion/index.web}/index.js +24 -18
- 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 +2 -1
- 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/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/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/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/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/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 +22 -24
- package/cjs/index.js.map +2 -2
- package/cjs/lazy/index.js +243 -1220
- package/cjs/lazy.js.map +3 -3
- package/cjs/registry/index.js +220 -600
- package/cjs/registry.js.map +3 -3
- package/cjs/utils/index.native/index.js +86 -0
- package/cjs/utils/index.native.js.map +7 -0
- package/index.d.ts +11 -12
- package/index.js +12 -13
- package/index.js.map +2 -2
- package/lazy/index.js +245 -1226
- package/package.json +5 -5
- package/registry/index.js +292 -673
- package/src/Accordion/index.native.tsx +19 -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 +28 -0
- package/src/AccordionSectionSummaryHeading/index.tsx +3 -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/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/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/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 +1 -0
- 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/Table/index.tsx +12 -0
- package/src/TableDataCell/__snapshots__/index.test.tsx.snap +2 -2
- package/src/TableDataCell/index.tsx +23 -1
- package/src/TextArea/index.native.tsx +1 -1
- package/src/TextInput/index.native.tsx +1 -1
- package/src/TimelineHeading/__snapshots__/index.test.tsx.snap +2 -2
- 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 +243 -1220
- package/src/registry.js +469 -847
- 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/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.map +0 -7
- package/cjs/BreadcrumbsListItem/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/CheckboxItemInput/index.native.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/lazy.d.ts +0 -247
- package/lazy.js.map +0 -7
- package/registry.d.ts +0 -265
- package/registry.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/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 → 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,19 @@
|
|
|
1
|
+
import CoreAccordion from '@digigov/react-core/Accordion/index.web';
|
|
2
|
+
import extend, {
|
|
3
|
+
enablePseudoclass,
|
|
4
|
+
} from '@digigov/react-core/utils/index.native';
|
|
5
|
+
|
|
6
|
+
export const Accordion = enablePseudoclass(
|
|
7
|
+
extend(CoreAccordion, ({ className, ...props }) => ({
|
|
8
|
+
...props,
|
|
9
|
+
multiline: true,
|
|
10
|
+
className,
|
|
11
|
+
})),
|
|
12
|
+
{
|
|
13
|
+
children: {
|
|
14
|
+
'first-child': ['ds-accordion__section__first-child'],
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export default Accordion;
|
package/src/Accordion/index.tsx
CHANGED
|
@@ -1,71 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
|
|
5
|
-
export interface AccordionProps extends BaseProps<'div'> {
|
|
6
|
-
/*
|
|
7
|
-
* horizontalBorders is optional.
|
|
8
|
-
* If 'none', Accordion will have no borders.
|
|
9
|
-
* If 'top', Accordion will have a border on top.
|
|
10
|
-
* If 'bottom', Accordion will have a border on bottom.
|
|
11
|
-
* @value none
|
|
12
|
-
* @value top
|
|
13
|
-
* @value bottom
|
|
14
|
-
* @default top
|
|
15
|
-
*/
|
|
16
|
-
horizontalBorders?: 'none' | 'top' | 'bottom';
|
|
17
|
-
/**
|
|
18
|
-
* summaryColor is optional.
|
|
19
|
-
* 'primary' color gives AccordionSectionSummary the default color.
|
|
20
|
-
* 'secondary' color gives AccordionSectionSummary a gray background.
|
|
21
|
-
* @value primary
|
|
22
|
-
* @value secondary
|
|
23
|
-
* @default primary
|
|
24
|
-
* */
|
|
25
|
-
summaryColor?: 'primary' | 'secondary';
|
|
26
|
-
/**
|
|
27
|
-
* dense is optional.
|
|
28
|
-
* If true, AccordionSection will have a smaller padding.
|
|
29
|
-
* @value true
|
|
30
|
-
* @value false
|
|
31
|
-
* @default false
|
|
32
|
-
* */
|
|
33
|
-
dense?: boolean;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Accordion is the main component for an accordion.
|
|
37
|
-
* Inside this component must be a list of AccordionSection components.
|
|
38
|
-
*/
|
|
39
|
-
export const Accordion = React.forwardRef<HTMLDivElement, AccordionProps>(
|
|
40
|
-
function Accordion(
|
|
41
|
-
{
|
|
42
|
-
className,
|
|
43
|
-
horizontalBorders = 'top',
|
|
44
|
-
summaryColor = 'primary',
|
|
45
|
-
dense,
|
|
46
|
-
children,
|
|
47
|
-
...props
|
|
48
|
-
},
|
|
49
|
-
ref
|
|
50
|
-
) {
|
|
51
|
-
return (
|
|
52
|
-
<Base
|
|
53
|
-
as="div"
|
|
54
|
-
ref={ref}
|
|
55
|
-
className={clsx(className, {
|
|
56
|
-
'ds-accordion': true,
|
|
57
|
-
'ds-accordion--no-border': horizontalBorders === 'none',
|
|
58
|
-
'ds-accordion--border-top': horizontalBorders === 'top',
|
|
59
|
-
'ds-accordion--border-bottom': horizontalBorders === 'bottom',
|
|
60
|
-
'ds-accordion--dense': dense,
|
|
61
|
-
'ds-accordion--secondary': summaryColor === 'secondary',
|
|
62
|
-
})}
|
|
63
|
-
{...props}
|
|
64
|
-
>
|
|
65
|
-
{children}
|
|
66
|
-
</Base>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
export default Accordion;
|
|
1
|
+
export * from '@digigov/react-core/Accordion/index.web';
|
|
2
|
+
export { default as default } from '@digigov/react-core/Accordion/index.web';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
|
|
5
|
+
export interface AccordionProps extends BaseProps<'div'> {
|
|
6
|
+
/*
|
|
7
|
+
* horizontalBorders is optional.
|
|
8
|
+
* If 'none', Accordion will have no borders.
|
|
9
|
+
* If 'top', Accordion will have a border on top.
|
|
10
|
+
* If 'bottom', Accordion will have a border on bottom.
|
|
11
|
+
* @value none
|
|
12
|
+
* @value top
|
|
13
|
+
* @value bottom
|
|
14
|
+
* @default top
|
|
15
|
+
*/
|
|
16
|
+
horizontalBorders?: 'none' | 'top' | 'bottom';
|
|
17
|
+
/**
|
|
18
|
+
* summaryColor is optional.
|
|
19
|
+
* 'primary' color gives AccordionSectionSummary the default color.
|
|
20
|
+
* 'secondary' color gives AccordionSectionSummary a gray background.
|
|
21
|
+
* @value primary
|
|
22
|
+
* @value secondary
|
|
23
|
+
* @default primary
|
|
24
|
+
* */
|
|
25
|
+
summaryColor?: 'primary' | 'secondary';
|
|
26
|
+
/**
|
|
27
|
+
* dense is optional.
|
|
28
|
+
* If true, AccordionSection will have a smaller padding.
|
|
29
|
+
* @value true
|
|
30
|
+
* @value false
|
|
31
|
+
* @default false
|
|
32
|
+
* */
|
|
33
|
+
dense?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Accordion is the main component for an accordion.
|
|
37
|
+
* Inside this component must be a list of AccordionSection components.
|
|
38
|
+
*/
|
|
39
|
+
export const Accordion = React.forwardRef<HTMLDivElement, AccordionProps>(
|
|
40
|
+
function Accordion(
|
|
41
|
+
{
|
|
42
|
+
className,
|
|
43
|
+
horizontalBorders = 'top',
|
|
44
|
+
summaryColor = 'primary',
|
|
45
|
+
dense,
|
|
46
|
+
children,
|
|
47
|
+
...props
|
|
48
|
+
},
|
|
49
|
+
ref
|
|
50
|
+
) {
|
|
51
|
+
return (
|
|
52
|
+
<Base
|
|
53
|
+
as="div"
|
|
54
|
+
ref={ref}
|
|
55
|
+
className={clsx(className, {
|
|
56
|
+
'ds-accordion': true,
|
|
57
|
+
'ds-accordion--no-border': horizontalBorders === 'none',
|
|
58
|
+
'ds-accordion--border-top': horizontalBorders === 'top',
|
|
59
|
+
'ds-accordion--border-bottom': horizontalBorders === 'bottom',
|
|
60
|
+
'ds-accordion--dense': dense,
|
|
61
|
+
'ds-accordion--secondary': summaryColor === 'secondary',
|
|
62
|
+
})}
|
|
63
|
+
{...props}
|
|
64
|
+
>
|
|
65
|
+
{children}
|
|
66
|
+
</Base>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
export default Accordion;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CoreAccordionSection from '@digigov/react-core/AccordionSection/index.web';
|
|
2
|
+
import { extend } from '@digigov/react-core/utils/index.native';
|
|
3
|
+
|
|
4
|
+
export const AccordionSection = extend(
|
|
5
|
+
CoreAccordionSection,
|
|
6
|
+
({ className, ...props }) => {
|
|
7
|
+
return {
|
|
8
|
+
className: className,
|
|
9
|
+
iconClassName: 'ds-accordion__section-button-icon',
|
|
10
|
+
openIcon: '–',
|
|
11
|
+
closeIcon: '+',
|
|
12
|
+
placement: 'after',
|
|
13
|
+
...props,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export default AccordionSection;
|
|
@@ -1,28 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
-
export interface AccordionSectionProps extends BaseProps<'details'> {}
|
|
5
|
-
/**
|
|
6
|
-
* AccordionSection should be inside the Accordion component.
|
|
7
|
-
*
|
|
8
|
-
* Inside this component must place the Accordion and the AccordionSectionContent components.
|
|
9
|
-
*/
|
|
10
|
-
export const AccordionSection = React.forwardRef<
|
|
11
|
-
HTMLDetailsElement,
|
|
12
|
-
AccordionSectionProps
|
|
13
|
-
>(function AccordionSection({ className, children, ...props }, ref) {
|
|
14
|
-
return (
|
|
15
|
-
<Base
|
|
16
|
-
as="details"
|
|
17
|
-
ref={ref}
|
|
18
|
-
className={clsx(className, {
|
|
19
|
-
'ds-accordion__section': true,
|
|
20
|
-
})}
|
|
21
|
-
{...props}
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</Base>
|
|
25
|
-
);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export default AccordionSection;
|
|
1
|
+
export * from '@digigov/react-core/AccordionSection/index.web';
|
|
2
|
+
export { default as default } from '@digigov/react-core/AccordionSection/index.web';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
export interface AccordionSectionProps extends BaseProps<'details'> {}
|
|
5
|
+
/**
|
|
6
|
+
* AccordionSection should be inside the Accordion component.
|
|
7
|
+
*
|
|
8
|
+
* Inside this component must place the Accordion and the AccordionSectionContent components.
|
|
9
|
+
*/
|
|
10
|
+
export const AccordionSection = React.forwardRef<
|
|
11
|
+
HTMLDetailsElement,
|
|
12
|
+
AccordionSectionProps
|
|
13
|
+
>(function AccordionSection({ className, children, ...props }, ref) {
|
|
14
|
+
return (
|
|
15
|
+
<Base
|
|
16
|
+
as="details"
|
|
17
|
+
ref={ref}
|
|
18
|
+
className={clsx(className, {
|
|
19
|
+
'ds-accordion__section': true,
|
|
20
|
+
})}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
23
|
+
{children}
|
|
24
|
+
</Base>
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export default AccordionSection;
|
|
@@ -23,13 +23,14 @@ export const AccordionSectionSummaryHeading = React.forwardRef<
|
|
|
23
23
|
{...props}
|
|
24
24
|
role="button"
|
|
25
25
|
>
|
|
26
|
-
<
|
|
26
|
+
<Base
|
|
27
|
+
as="span"
|
|
27
28
|
className={clsx({
|
|
28
29
|
'ds-accordion__section-button': true,
|
|
29
30
|
})}
|
|
30
31
|
>
|
|
31
32
|
{children}
|
|
32
|
-
</
|
|
33
|
+
</Base>
|
|
33
34
|
</Base>
|
|
34
35
|
);
|
|
35
36
|
});
|
|
@@ -4,7 +4,7 @@ exports[`renders the AdminAside with no prop 1`] = `
|
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<aside
|
|
7
|
-
class="ds-admin-aside ds-aside xs:ds-grid__col-span-12 md:ds-grid__col-span-4 lg:ds-grid__col-span-3"
|
|
7
|
+
class="ds-admin-aside ds-aside ds-grid-item xs:ds-grid__col-span-12 md:ds-grid__col-span-4 lg:ds-grid__col-span-3"
|
|
8
8
|
>
|
|
9
9
|
hello
|
|
10
10
|
</aside>
|
|
@@ -4,7 +4,7 @@ exports[`renders the AdminContainer with no grid 1`] = `
|
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<div
|
|
7
|
-
class="ds-admin-container ds-container ds-container--full-width"
|
|
7
|
+
class="ds-admin-container ds-container ds-container--full-width ds-grid-item"
|
|
8
8
|
>
|
|
9
9
|
hello
|
|
10
10
|
</div>
|
|
@@ -16,7 +16,7 @@ exports[`renders the AdminContainer with no props 1`] = `
|
|
|
16
16
|
<body>
|
|
17
17
|
<div>
|
|
18
18
|
<div
|
|
19
|
-
class="ds-admin-container ds-container ds-container--full-width ds-grid ds-gap-sm-12"
|
|
19
|
+
class="ds-admin-container ds-container ds-container--full-width ds-grid ds-grid-item ds-gap-sm-12"
|
|
20
20
|
>
|
|
21
21
|
hello
|
|
22
22
|
</div>
|
|
@@ -4,7 +4,7 @@ exports[`renders the AdminMain with no prop 1`] = `
|
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<main
|
|
7
|
-
class="ds-admin-main ds-main xs:ds-grid__col-span-12 md:ds-grid__col-span-8 lg:ds-grid__col-span-9"
|
|
7
|
+
class="ds-admin-main ds-main ds-grid-item xs:ds-grid__col-span-12 md:ds-grid__col-span-8 lg:ds-grid__col-span-9"
|
|
8
8
|
id="main-content"
|
|
9
9
|
>
|
|
10
10
|
hello
|
|
@@ -4,7 +4,7 @@ exports[`renders the Aside with no props 1`] = `
|
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<aside
|
|
7
|
-
class="ds-aside ds-aside--sticky xs:ds-grid__col-span-12 md:ds-grid__col-span-4"
|
|
7
|
+
class="ds-aside ds-aside--sticky ds-grid-item xs:ds-grid__col-span-12 md:ds-grid__col-span-4"
|
|
8
8
|
>
|
|
9
9
|
hello
|
|
10
10
|
</aside>
|
|
@@ -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 BackLinkBase with href="#" 1`] = `
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<a
|
|
@@ -27,7 +27,7 @@ exports[`renders the BackLink with href="#" 1`] = `
|
|
|
27
27
|
</body>
|
|
28
28
|
`;
|
|
29
29
|
|
|
30
|
-
exports[`renders the
|
|
30
|
+
exports[`renders the BackLinkBase with no props 1`] = `
|
|
31
31
|
<body>
|
|
32
32
|
<div>
|
|
33
33
|
<a
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
|
|
4
|
+
import BackLinkBase from '@digigov/react-core/BackLinkBase';
|
|
5
|
+
|
|
6
|
+
it('renders the BackLinkBase with no props', () => {
|
|
7
|
+
expect(
|
|
8
|
+
render(<BackLinkBase>hello</BackLinkBase>).baseElement
|
|
9
|
+
).toMatchSnapshot();
|
|
10
|
+
});
|
|
11
|
+
it('renders the BackLinkBase with href="#"', () => {
|
|
12
|
+
expect(
|
|
13
|
+
render(<BackLinkBase href="#">hello</BackLinkBase>).baseElement
|
|
14
|
+
).toMatchSnapshot();
|
|
15
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { LinkBase, LinkBaseProps } from '@digigov/react-core/LinkBase';
|
|
4
|
+
import { CaretIcon } from '@digigov/react-icons';
|
|
5
|
+
|
|
6
|
+
export interface BackLinkBaseProps extends LinkBaseProps {}
|
|
7
|
+
/**
|
|
8
|
+
* Use BackLinkBase component to help users go back to the previous page in a multi-page transaction.
|
|
9
|
+
*/
|
|
10
|
+
export const BackLinkBase = React.forwardRef<
|
|
11
|
+
HTMLAnchorElement,
|
|
12
|
+
BackLinkBaseProps
|
|
13
|
+
>(function BackLinkBase(
|
|
14
|
+
{ href, printHidden = true, className, children, ...props },
|
|
15
|
+
ref
|
|
16
|
+
) {
|
|
17
|
+
return (
|
|
18
|
+
<LinkBase
|
|
19
|
+
href={href}
|
|
20
|
+
printHidden={printHidden}
|
|
21
|
+
defaultStyle={false}
|
|
22
|
+
onClick={() => !href && window.history.back()}
|
|
23
|
+
ref={ref}
|
|
24
|
+
className={clsx(className, {
|
|
25
|
+
'ds-back-link': true,
|
|
26
|
+
})}
|
|
27
|
+
tabIndex={0}
|
|
28
|
+
{...props}
|
|
29
|
+
>
|
|
30
|
+
<CaretIcon direction={'left'} />
|
|
31
|
+
{children}
|
|
32
|
+
</LinkBase>
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export default BackLinkBase;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
DetailedHTMLProps,
|
|
3
|
-
InputHTMLAttributes,
|
|
4
|
-
LegacyRef,
|
|
5
|
-
} from 'react';
|
|
1
|
+
import React, { DetailedHTMLProps, InputHTMLAttributes, Ref } from 'react';
|
|
6
2
|
import { TouchableOpacity, View } from 'react-native';
|
|
7
3
|
|
|
8
4
|
export type CheckboxInputProps = Omit<
|
|
@@ -28,7 +24,7 @@ export const CheckboxInput = React.forwardRef<
|
|
|
28
24
|
return (
|
|
29
25
|
// @ts-ignore
|
|
30
26
|
<TouchableOpacity
|
|
31
|
-
ref={ref as
|
|
27
|
+
ref={ref as Ref<TouchableOpacity>}
|
|
32
28
|
onPress={handlePress}
|
|
33
29
|
{...props}
|
|
34
30
|
>
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
DetailedHTMLProps,
|
|
3
|
-
InputHTMLAttributes,
|
|
4
|
-
LegacyRef,
|
|
5
|
-
} from 'react';
|
|
1
|
+
import React, { DetailedHTMLProps, InputHTMLAttributes, Ref } from 'react';
|
|
6
2
|
import { TouchableOpacity, View } from 'react-native';
|
|
7
3
|
|
|
8
4
|
export type RadioInputProps = Omit<
|
|
@@ -26,7 +22,7 @@ export const RadioInput = React.forwardRef<HTMLInputElement, RadioInputProps>(
|
|
|
26
22
|
|
|
27
23
|
return (
|
|
28
24
|
<TouchableOpacity
|
|
29
|
-
ref={ref as
|
|
25
|
+
ref={ref as Ref<typeof TouchableOpacity>}
|
|
30
26
|
onPress={handlePress}
|
|
31
27
|
{...(props as any)}
|
|
32
28
|
>
|
|
@@ -16,6 +16,7 @@ type HTMLElementProps = Omit<
|
|
|
16
16
|
> & {
|
|
17
17
|
closeIcon?: string;
|
|
18
18
|
openIcon?: string;
|
|
19
|
+
iconClassName?: string;
|
|
19
20
|
placement?: 'before' | 'after';
|
|
20
21
|
};
|
|
21
22
|
|
|
@@ -25,6 +26,7 @@ const CompatDetails = ({
|
|
|
25
26
|
placement,
|
|
26
27
|
closeIcon,
|
|
27
28
|
openIcon,
|
|
29
|
+
iconClassName,
|
|
28
30
|
...props
|
|
29
31
|
}: HTMLElementProps) => {
|
|
30
32
|
const [isExpanded, setIsExpanded] = useState(open);
|
|
@@ -41,7 +43,7 @@ const CompatDetails = ({
|
|
|
41
43
|
|
|
42
44
|
const toggleIcon =
|
|
43
45
|
closeIcon && openIcon ? (
|
|
44
|
-
<Text>{isExpanded ? openIcon : closeIcon}</Text>
|
|
46
|
+
<Text className={iconClassName}>{isExpanded ? openIcon : closeIcon}</Text>
|
|
45
47
|
) : null;
|
|
46
48
|
|
|
47
49
|
return (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
1
|
+
import React, { useMemo, type JSX } from 'react';
|
|
2
2
|
import { Text, View, ViewProps } from 'react-native';
|
|
3
3
|
import { BaseProps as CoreBaseProps } from '@digigov/react-core/Base/index.web';
|
|
4
4
|
import { mapping } from '@digigov/react-core/Base/mapping.native';
|
|
@@ -22,7 +22,7 @@ const BooleanMapper = {
|
|
|
22
22
|
const textHtmlTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'p', 'span'];
|
|
23
23
|
|
|
24
24
|
export const Base: BaseComponent = React.forwardRef(function Base<
|
|
25
|
-
C extends React.ElementType
|
|
25
|
+
C extends React.ElementType,
|
|
26
26
|
>(
|
|
27
27
|
{
|
|
28
28
|
as,
|
package/src/Base/index.web.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { basePropGenerator } from '@digigov/react-core/Base/utils';
|
|
4
4
|
interface AsProp<C extends React.ElementType> {
|
|
5
|
-
as?: C
|
|
5
|
+
as?: C | React.ElementType<any>;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
|
|
@@ -162,7 +162,7 @@ type BaseComponent = <C extends React.ElementType = 'span'>(
|
|
|
162
162
|
) => React.ReactNode | null;
|
|
163
163
|
|
|
164
164
|
export const Base: BaseComponent = React.forwardRef(function Base<
|
|
165
|
-
C extends React.ElementType
|
|
165
|
+
C extends React.ElementType,
|
|
166
166
|
>(
|
|
167
167
|
{
|
|
168
168
|
as,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`renders the
|
|
3
|
+
exports[`renders the BreadcrumbsListItemLinkBase with href 1`] = `
|
|
4
4
|
<body>
|
|
5
5
|
<div>
|
|
6
6
|
<a
|
|
7
|
-
class="ds-breadcrumbs__link"
|
|
7
|
+
class="ds-breadcrumbs__link ds-link"
|
|
8
8
|
href="#"
|
|
9
9
|
>
|
|
10
10
|
hello
|
|
@@ -13,11 +13,11 @@ exports[`renders the BreadcrumbsListItemLink with href 1`] = `
|
|
|
13
13
|
</body>
|
|
14
14
|
`;
|
|
15
15
|
|
|
16
|
-
exports[`renders the
|
|
16
|
+
exports[`renders the BreadcrumbsListItemLinkBase with no props 1`] = `
|
|
17
17
|
<body>
|
|
18
18
|
<div>
|
|
19
19
|
<a
|
|
20
|
-
class="ds-breadcrumbs__link ds-breadcrumbs__link--inactive"
|
|
20
|
+
class="ds-breadcrumbs__link ds-breadcrumbs__link--inactive ds-link"
|
|
21
21
|
>
|
|
22
22
|
hello
|
|
23
23
|
</a>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
|
|
4
|
+
import { BreadcrumbsListItemLinkBase } from '@digigov/react-core/BreadcrumbsListItemLinkBase';
|
|
5
|
+
|
|
6
|
+
it('renders the BreadcrumbsListItemLinkBase with no props', () => {
|
|
7
|
+
expect(
|
|
8
|
+
render(<BreadcrumbsListItemLinkBase>hello</BreadcrumbsListItemLinkBase>)
|
|
9
|
+
.baseElement
|
|
10
|
+
).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
it('renders the BreadcrumbsListItemLinkBase with href', () => {
|
|
13
|
+
expect(
|
|
14
|
+
render(
|
|
15
|
+
<BreadcrumbsListItemLinkBase href="#">hello</BreadcrumbsListItemLinkBase>
|
|
16
|
+
).baseElement
|
|
17
|
+
).toMatchSnapshot();
|
|
18
|
+
});
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import
|
|
3
|
+
import { LinkBase, LinkBaseProps } from '@digigov/react-core/LinkBase';
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface BreadcrumbsListItemLinkBaseProps extends LinkBaseProps {}
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* BreadcrumbsListItemLinkBase creates an anchor link to navigate in different
|
|
8
8
|
* parts of the breadcrumbs.
|
|
9
9
|
* It should be used inside BreadcrumbsListItem as children component. This is
|
|
10
10
|
* the default link component for the BreadcrumbsListItem and it uses the LinkBase
|
|
11
11
|
* component from `@digigov/react-core`. In case you need to use a different Link
|
|
12
|
-
* component from a framework or a custom router, use `@digigov/ui/navigation/
|
|
12
|
+
* component from a framework or a custom router, use `@digigov/ui/navigation/BreadcrumbsListItemLinkBase` instead.
|
|
13
13
|
*/
|
|
14
|
-
export const
|
|
14
|
+
export const BreadcrumbsListItemLinkBase = React.forwardRef<
|
|
15
15
|
HTMLAnchorElement,
|
|
16
|
-
|
|
17
|
-
>(function
|
|
16
|
+
BreadcrumbsListItemLinkBaseProps
|
|
17
|
+
>(function BreadcrumbsListItemLinkBase({ href, className, children }, ref) {
|
|
18
18
|
return (
|
|
19
|
-
<
|
|
19
|
+
<LinkBase
|
|
20
20
|
href={href}
|
|
21
|
-
defaultStyle={false}
|
|
22
21
|
className={clsx(className, {
|
|
23
22
|
'ds-breadcrumbs__link': true,
|
|
24
23
|
'ds-breadcrumbs__link--inactive': href === undefined,
|
|
@@ -26,8 +25,8 @@ export const BreadcrumbsListItemLink = React.forwardRef<
|
|
|
26
25
|
ref={ref}
|
|
27
26
|
>
|
|
28
27
|
{children}
|
|
29
|
-
</
|
|
28
|
+
</LinkBase>
|
|
30
29
|
);
|
|
31
30
|
});
|
|
32
31
|
|
|
33
|
-
export default
|
|
32
|
+
export default BreadcrumbsListItemLinkBase;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
3
|
|
|
4
|
-
import BreadcrumbsListItem from '@digigov/react-core/
|
|
4
|
+
import BreadcrumbsListItem from '@digigov/react-core/BreadcrumbsListItemWrapper';
|
|
5
5
|
|
|
6
6
|
it('renders the BreadcrumbsListItem with no props', () => {
|
|
7
7
|
expect(
|
|
@@ -2,15 +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
|
|
5
|
+
export interface BreadcrumbsListItemWrapperProps extends BaseProps<'li'> {}
|
|
6
6
|
/**
|
|
7
7
|
* BreadcrumbsListItem creates a list of items with the possibility of navigation.
|
|
8
8
|
* It should be used inside BreadcrumbsList as children component
|
|
9
9
|
*/
|
|
10
|
-
export const
|
|
10
|
+
export const BreadcrumbsListItemWrapper = React.forwardRef<
|
|
11
11
|
HTMLLIElement,
|
|
12
|
-
|
|
13
|
-
>(function
|
|
12
|
+
BreadcrumbsListItemWrapperProps
|
|
13
|
+
>(function BreadcrumbsListItemWrapper({ className, children, ...props }, ref) {
|
|
14
14
|
return (
|
|
15
15
|
<Base
|
|
16
16
|
as="li"
|
|
@@ -25,4 +25,4 @@ export const BreadcrumbsListItemBase = React.forwardRef<
|
|
|
25
25
|
);
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
export default
|
|
28
|
+
export default BreadcrumbsListItemWrapper;
|
package/src/Button/index.tsx
CHANGED
|
@@ -55,6 +55,8 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
55
55
|
ref={ref}
|
|
56
56
|
className={clsx(className, {
|
|
57
57
|
'ds-link': variant === 'link',
|
|
58
|
+
'ds-link-warning': variant === 'link' && color === 'warning',
|
|
59
|
+
'ds-link--disabled': variant === 'link' && disabled,
|
|
58
60
|
'ds-btn': variant === 'button',
|
|
59
61
|
'ds-btn--dense': dense,
|
|
60
62
|
'ds-btn-primary': variant === 'button' && color === 'primary',
|