@digigov/react-core 2.0.0-d0adc9fb → 2.0.0-d2ffc726
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.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 +36 -34
- 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 +36 -34
- 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 +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 +36 -34
- 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
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
import { WarningTextAssistive } from '@digigov/react-core/WarningTextAssistive';
|
|
4
5
|
|
|
5
|
-
export interface NotificationBannerContentProps extends BaseProps<'div'> {
|
|
6
|
+
export interface NotificationBannerContentProps extends BaseProps<'div'> {
|
|
7
|
+
/**
|
|
8
|
+
* assistiveText is optional.
|
|
9
|
+
* Default value is "Προσοχή".
|
|
10
|
+
* assistiveText is used to provide a textual warning for assistive technologies like screen readers.
|
|
11
|
+
*/
|
|
12
|
+
assistiveText?: string;
|
|
13
|
+
/**
|
|
14
|
+
* variant is optional.
|
|
15
|
+
* variant is used to display red line on the left side of the component and exclamation mark icon with light red as background.
|
|
16
|
+
* @value 'error'
|
|
17
|
+
* @value 'error-group'
|
|
18
|
+
* @default 'error'.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* variant is optional.
|
|
22
|
+
* variant error is used to change the color of the NotificationBannerContainer.
|
|
23
|
+
* 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.
|
|
24
|
+
* @value 'error'
|
|
25
|
+
* @value 'error-group'
|
|
26
|
+
* @default 'error'.
|
|
27
|
+
*/
|
|
28
|
+
variant?: 'error' | 'error-group';
|
|
29
|
+
}
|
|
6
30
|
/**
|
|
7
31
|
* Details for the NotificationBannerContent.
|
|
8
32
|
* NotificationBannerContent component is used as a content for
|
|
@@ -12,17 +36,39 @@ export interface NotificationBannerContentProps extends BaseProps<'div'> {}
|
|
|
12
36
|
export const NotificationBannerContent = React.forwardRef<
|
|
13
37
|
HTMLDivElement,
|
|
14
38
|
NotificationBannerContentProps
|
|
15
|
-
>(function NotificationBannerContent(
|
|
39
|
+
>(function NotificationBannerContent(
|
|
40
|
+
{ className, assistiveText, variant, children, ...props },
|
|
41
|
+
ref
|
|
42
|
+
) {
|
|
16
43
|
return (
|
|
17
44
|
<Base
|
|
18
45
|
as="div"
|
|
19
46
|
ref={ref}
|
|
20
47
|
className={clsx(className, {
|
|
21
|
-
'ds-notification-banner__content':
|
|
48
|
+
'ds-notification-banner__content': variant !== 'error-group',
|
|
49
|
+
'ds-notification-error-group-banner__content':
|
|
50
|
+
variant === 'error-group',
|
|
22
51
|
})}
|
|
23
52
|
{...props}
|
|
24
53
|
>
|
|
25
|
-
{
|
|
54
|
+
{variant === 'error-group' ? (
|
|
55
|
+
<>
|
|
56
|
+
<Base
|
|
57
|
+
as="div"
|
|
58
|
+
className={clsx({
|
|
59
|
+
'ds-notification-banner__icon--error-group': true,
|
|
60
|
+
})}
|
|
61
|
+
>
|
|
62
|
+
!
|
|
63
|
+
</Base>
|
|
64
|
+
<WarningTextAssistive>{assistiveText}</WarningTextAssistive>
|
|
65
|
+
<Base as="div" className="ds-notification-banner__text-error-group">
|
|
66
|
+
{children}
|
|
67
|
+
</Base>
|
|
68
|
+
</>
|
|
69
|
+
) : (
|
|
70
|
+
children
|
|
71
|
+
)}
|
|
26
72
|
</Base>
|
|
27
73
|
);
|
|
28
74
|
});
|
|
@@ -2,7 +2,7 @@ import clsx from 'clsx';
|
|
|
2
2
|
import CoreNotificationBannerLink, {
|
|
3
3
|
NotificationBannerLinkProps,
|
|
4
4
|
} from '@digigov/react-core/NotificationBannerLink/index.web';
|
|
5
|
-
import { extend } from '@digigov/react-core/utils/
|
|
5
|
+
import { extend } from '@digigov/react-core/utils/index.native';
|
|
6
6
|
|
|
7
7
|
interface AdditionalProps {
|
|
8
8
|
variant?: 'error' | 'success';
|
|
@@ -18,7 +18,6 @@ exports[`renders the RadioItem \`dividerText\` props 1`] = `
|
|
|
18
18
|
<input
|
|
19
19
|
class="ds-radios__input"
|
|
20
20
|
type="radio"
|
|
21
|
-
value=""
|
|
22
21
|
/>
|
|
23
22
|
</label>
|
|
24
23
|
</div>
|
|
@@ -89,7 +88,6 @@ exports[`renders the RadioItem with disabled prop 1`] = `
|
|
|
89
88
|
class="ds-radios__input"
|
|
90
89
|
disabled=""
|
|
91
90
|
type="radio"
|
|
92
|
-
value=""
|
|
93
91
|
/>
|
|
94
92
|
</label>
|
|
95
93
|
</div>
|
|
@@ -111,7 +109,6 @@ exports[`renders the RadioItem with name props 1`] = `
|
|
|
111
109
|
class="ds-radios__input"
|
|
112
110
|
name="name"
|
|
113
111
|
type="radio"
|
|
114
|
-
value=""
|
|
115
112
|
/>
|
|
116
113
|
</label>
|
|
117
114
|
</div>
|
|
@@ -177,7 +174,6 @@ exports[`renders the RadioItem with no props 1`] = `
|
|
|
177
174
|
<input
|
|
178
175
|
class="ds-radios__input"
|
|
179
176
|
type="radio"
|
|
180
|
-
value=""
|
|
181
177
|
/>
|
|
182
178
|
</label>
|
|
183
179
|
</div>
|
package/src/Skeleton/index.tsx
CHANGED
|
@@ -90,13 +90,14 @@ export const Skeleton = React.forwardRef<HTMLSpanElement, SkeletonProps>(
|
|
|
90
90
|
}}
|
|
91
91
|
>
|
|
92
92
|
{variant === 'button' && (
|
|
93
|
-
<
|
|
93
|
+
<Base
|
|
94
|
+
as="span"
|
|
94
95
|
className={clsx({
|
|
95
96
|
'ds-skeleton__line': true,
|
|
96
97
|
'ds-skeleton__line--size-default':
|
|
97
98
|
width === undefined && height === undefined,
|
|
98
99
|
})}
|
|
99
|
-
></
|
|
100
|
+
></Base>
|
|
100
101
|
)}
|
|
101
102
|
{typeof children != 'string' && children}
|
|
102
103
|
</Base>
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
+
exports[`renders the SummaryList with border="true" 1`] = `
|
|
4
|
+
<body>
|
|
5
|
+
<div>
|
|
6
|
+
<dl
|
|
7
|
+
class="ds-summary-list"
|
|
8
|
+
>
|
|
9
|
+
hello
|
|
10
|
+
</dl>
|
|
11
|
+
</div>
|
|
12
|
+
</body>
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
exports[`renders the SummaryList with error="true 1`] = `
|
|
16
|
+
<body>
|
|
17
|
+
<div>
|
|
18
|
+
<dl
|
|
19
|
+
class="ds-summary-list ds-summary-list--error"
|
|
20
|
+
>
|
|
21
|
+
hello
|
|
22
|
+
</dl>
|
|
23
|
+
</div>
|
|
24
|
+
</body>
|
|
25
|
+
`;
|
|
26
|
+
|
|
3
27
|
exports[`renders the SummaryList with no props 1`] = `
|
|
4
28
|
<body>
|
|
5
29
|
<div>
|
|
@@ -11,3 +35,15 @@ exports[`renders the SummaryList with no props 1`] = `
|
|
|
11
35
|
</div>
|
|
12
36
|
</body>
|
|
13
37
|
`;
|
|
38
|
+
|
|
39
|
+
exports[`renders the SummaryList with noLastBorder="true 1`] = `
|
|
40
|
+
<body>
|
|
41
|
+
<div>
|
|
42
|
+
<dl
|
|
43
|
+
class="ds-summary-list ds-summary-list--no-last-border"
|
|
44
|
+
>
|
|
45
|
+
hello
|
|
46
|
+
</dl>
|
|
47
|
+
</div>
|
|
48
|
+
</body>
|
|
49
|
+
`;
|
|
@@ -8,3 +8,18 @@ it('renders the SummaryList with no props', () => {
|
|
|
8
8
|
render(<SummaryList>hello</SummaryList>).baseElement
|
|
9
9
|
).toMatchSnapshot();
|
|
10
10
|
});
|
|
11
|
+
it('renders the SummaryList with border="true"', () => {
|
|
12
|
+
expect(
|
|
13
|
+
render(<SummaryList border>hello</SummaryList>).baseElement
|
|
14
|
+
).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
it('renders the SummaryList with noLastBorder="true', () => {
|
|
17
|
+
expect(
|
|
18
|
+
render(<SummaryList noLastBorder>hello</SummaryList>).baseElement
|
|
19
|
+
).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
it('renders the SummaryList with error="true', () => {
|
|
22
|
+
expect(
|
|
23
|
+
render(<SummaryList error>hello</SummaryList>).baseElement
|
|
24
|
+
).toMatchSnapshot();
|
|
25
|
+
});
|
|
@@ -6,7 +6,7 @@ export interface SummaryListProps extends BaseProps<'dl'> {
|
|
|
6
6
|
/**
|
|
7
7
|
* border is optional.
|
|
8
8
|
* By default, SummaryList has borders. You can remove borders by using border prop.
|
|
9
|
-
* By default is true
|
|
9
|
+
* By default is true.
|
|
10
10
|
* @value true
|
|
11
11
|
* @value false
|
|
12
12
|
* @default true
|
|
@@ -15,12 +15,21 @@ export interface SummaryListProps extends BaseProps<'dl'> {
|
|
|
15
15
|
/**
|
|
16
16
|
* noLastBorder is optional.
|
|
17
17
|
* By default, SummaryList has borders. You can remove last border by using noLastBorder prop.
|
|
18
|
-
* By default is
|
|
18
|
+
* By default is false.
|
|
19
19
|
* @value true
|
|
20
20
|
* @value false
|
|
21
21
|
* @default false
|
|
22
22
|
*/
|
|
23
23
|
noLastBorder?: boolean;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* error is optional.
|
|
27
|
+
* If true, the SummaryList will be styled to indicate an error state.
|
|
28
|
+
* @value true
|
|
29
|
+
* @value false
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
error?: boolean;
|
|
24
33
|
}
|
|
25
34
|
/**
|
|
26
35
|
* SummaryList used as a table with summary information.
|
|
@@ -28,7 +37,14 @@ export interface SummaryListProps extends BaseProps<'dl'> {
|
|
|
28
37
|
*/
|
|
29
38
|
export const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(
|
|
30
39
|
function SummaryList(
|
|
31
|
-
{
|
|
40
|
+
{
|
|
41
|
+
border = true,
|
|
42
|
+
noLastBorder = false,
|
|
43
|
+
error = false,
|
|
44
|
+
className,
|
|
45
|
+
children,
|
|
46
|
+
...props
|
|
47
|
+
},
|
|
32
48
|
ref
|
|
33
49
|
) {
|
|
34
50
|
return (
|
|
@@ -39,6 +55,7 @@ export const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(
|
|
|
39
55
|
'ds-summary-list': true,
|
|
40
56
|
'ds-summary-list--no-border': !border,
|
|
41
57
|
'ds-summary-list--no-last-border': noLastBorder,
|
|
58
|
+
'ds-summary-list--error': error === true,
|
|
42
59
|
})}
|
|
43
60
|
{...props}
|
|
44
61
|
>
|
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
+
exports[`renders the SummaryListItemKey with error="true" 1`] = `
|
|
4
|
+
<body>
|
|
5
|
+
<div>
|
|
6
|
+
<dt
|
|
7
|
+
class="ds-summary-list__key ds-summary-list__key--sm-3 ds-summary-list__key--error"
|
|
8
|
+
>
|
|
9
|
+
<span
|
|
10
|
+
class="ds-visually-hidden"
|
|
11
|
+
>
|
|
12
|
+
Λανθασμένο πεδίο
|
|
13
|
+
</span>
|
|
14
|
+
hello
|
|
15
|
+
</dt>
|
|
16
|
+
</div>
|
|
17
|
+
</body>
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
exports[`renders the SummaryListItemKey with error="true" and errorAssistiveText="wrong" 1`] = `
|
|
21
|
+
<body>
|
|
22
|
+
<div>
|
|
23
|
+
<dt
|
|
24
|
+
class="ds-summary-list__key ds-summary-list__key--sm-3 ds-summary-list__key--error"
|
|
25
|
+
>
|
|
26
|
+
<span
|
|
27
|
+
class="ds-visually-hidden"
|
|
28
|
+
>
|
|
29
|
+
wrong
|
|
30
|
+
</span>
|
|
31
|
+
hello
|
|
32
|
+
</dt>
|
|
33
|
+
</div>
|
|
34
|
+
</body>
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
exports[`renders the SummaryListItemKey with lg=9 1`] = `
|
|
38
|
+
<body>
|
|
39
|
+
<div>
|
|
40
|
+
<dt
|
|
41
|
+
class="ds-summary-list__key ds-summary-list__key--sm-3 ds-summary-list__key--lg-9"
|
|
42
|
+
>
|
|
43
|
+
hello
|
|
44
|
+
</dt>
|
|
45
|
+
</div>
|
|
46
|
+
</body>
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
exports[`renders the SummaryListItemKey with md=6 1`] = `
|
|
50
|
+
<body>
|
|
51
|
+
<div>
|
|
52
|
+
<dt
|
|
53
|
+
class="ds-summary-list__key ds-summary-list__key--sm-3 ds-summary-list__key--md-6"
|
|
54
|
+
>
|
|
55
|
+
hello
|
|
56
|
+
</dt>
|
|
57
|
+
</div>
|
|
58
|
+
</body>
|
|
59
|
+
`;
|
|
60
|
+
|
|
3
61
|
exports[`renders the SummaryListItemKey with no props 1`] = `
|
|
4
62
|
<body>
|
|
5
63
|
<div>
|
|
@@ -11,3 +69,15 @@ exports[`renders the SummaryListItemKey with no props 1`] = `
|
|
|
11
69
|
</div>
|
|
12
70
|
</body>
|
|
13
71
|
`;
|
|
72
|
+
|
|
73
|
+
exports[`renders the SummaryListItemKey with sm=4 1`] = `
|
|
74
|
+
<body>
|
|
75
|
+
<div>
|
|
76
|
+
<dt
|
|
77
|
+
class="ds-summary-list__key ds-summary-list__key--sm-4"
|
|
78
|
+
>
|
|
79
|
+
hello
|
|
80
|
+
</dt>
|
|
81
|
+
</div>
|
|
82
|
+
</body>
|
|
83
|
+
`;
|
|
@@ -8,3 +8,32 @@ it('renders the SummaryListItemKey with no props', () => {
|
|
|
8
8
|
render(<SummaryListItemKey>hello</SummaryListItemKey>).baseElement
|
|
9
9
|
).toMatchSnapshot();
|
|
10
10
|
});
|
|
11
|
+
it('renders the SummaryListItemKey with sm=4', () => {
|
|
12
|
+
expect(
|
|
13
|
+
render(<SummaryListItemKey sm={4}>hello</SummaryListItemKey>).baseElement
|
|
14
|
+
).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
it('renders the SummaryListItemKey with md=6', () => {
|
|
17
|
+
expect(
|
|
18
|
+
render(<SummaryListItemKey md={6}>hello</SummaryListItemKey>).baseElement
|
|
19
|
+
).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
it('renders the SummaryListItemKey with lg=9', () => {
|
|
22
|
+
expect(
|
|
23
|
+
render(<SummaryListItemKey lg={9}>hello</SummaryListItemKey>).baseElement
|
|
24
|
+
).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
it('renders the SummaryListItemKey with error="true"', () => {
|
|
27
|
+
expect(
|
|
28
|
+
render(<SummaryListItemKey error>hello</SummaryListItemKey>).baseElement
|
|
29
|
+
).toMatchSnapshot();
|
|
30
|
+
});
|
|
31
|
+
it('renders the SummaryListItemKey with error="true" and errorAssistiveText="wrong"', () => {
|
|
32
|
+
expect(
|
|
33
|
+
render(
|
|
34
|
+
<SummaryListItemKey error errorAssistiveText="wrong">
|
|
35
|
+
hello
|
|
36
|
+
</SummaryListItemKey>
|
|
37
|
+
).baseElement
|
|
38
|
+
).toMatchSnapshot();
|
|
39
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
import VisuallyHidden from '@digigov/react-core/VisuallyHidden';
|
|
4
5
|
|
|
5
6
|
export interface SummaryListItemKeyProps extends BaseProps<'dt'> {
|
|
6
7
|
/**
|
|
@@ -16,6 +17,22 @@ export interface SummaryListItemKeyProps extends BaseProps<'dt'> {
|
|
|
16
17
|
* lg shows the width of the key column for large screens.
|
|
17
18
|
*/
|
|
18
19
|
lg?: WidthValues;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* error is optional.
|
|
23
|
+
* Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.
|
|
24
|
+
* @value true
|
|
25
|
+
* @value false
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
error?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* errorAssistiveText is optional.
|
|
32
|
+
* Default value is "Λανθασμένο πεδίο".
|
|
33
|
+
* errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.
|
|
34
|
+
*/
|
|
35
|
+
errorAssistiveText?: string;
|
|
19
36
|
}
|
|
20
37
|
|
|
21
38
|
export type WidthValues = 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
@@ -27,7 +44,16 @@ export const SummaryListItemKey = React.forwardRef<
|
|
|
27
44
|
HTMLElement,
|
|
28
45
|
SummaryListItemKeyProps
|
|
29
46
|
>(function SummaryListItemKey(
|
|
30
|
-
{
|
|
47
|
+
{
|
|
48
|
+
sm = 3,
|
|
49
|
+
md,
|
|
50
|
+
lg,
|
|
51
|
+
error,
|
|
52
|
+
errorAssistiveText = 'Λανθασμένο πεδίο',
|
|
53
|
+
className,
|
|
54
|
+
children,
|
|
55
|
+
...props
|
|
56
|
+
},
|
|
31
57
|
ref
|
|
32
58
|
) {
|
|
33
59
|
return (
|
|
@@ -39,9 +65,11 @@ export const SummaryListItemKey = React.forwardRef<
|
|
|
39
65
|
[`ds-summary-list__key--sm-${sm}`]: sm !== undefined,
|
|
40
66
|
[`ds-summary-list__key--md-${md}`]: md !== undefined,
|
|
41
67
|
[`ds-summary-list__key--lg-${lg}`]: lg !== undefined,
|
|
68
|
+
'ds-summary-list__key--error': error === true,
|
|
42
69
|
})}
|
|
43
70
|
{...props}
|
|
44
71
|
>
|
|
72
|
+
{error === true && <VisuallyHidden>{errorAssistiveText}</VisuallyHidden>}
|
|
45
73
|
{children}
|
|
46
74
|
</Base>
|
|
47
75
|
);
|
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
+
exports[`renders the SummaryListItemValue with error="true 1`] = `
|
|
4
|
+
<body>
|
|
5
|
+
<div>
|
|
6
|
+
<dd
|
|
7
|
+
class="ds-summary-list__value ds-summary-list__value--error"
|
|
8
|
+
>
|
|
9
|
+
<span
|
|
10
|
+
class="ds-visually-hidden"
|
|
11
|
+
>
|
|
12
|
+
Λανθασμένο πεδίο
|
|
13
|
+
</span>
|
|
14
|
+
hello
|
|
15
|
+
</dd>
|
|
16
|
+
</div>
|
|
17
|
+
</body>
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
exports[`renders the SummaryListItemValue with error="true and errorAssistiveText="wrong 1`] = `
|
|
21
|
+
<body>
|
|
22
|
+
<div>
|
|
23
|
+
<dd
|
|
24
|
+
class="ds-summary-list__value ds-summary-list__value--error"
|
|
25
|
+
>
|
|
26
|
+
<span
|
|
27
|
+
class="ds-visually-hidden"
|
|
28
|
+
>
|
|
29
|
+
wrong
|
|
30
|
+
</span>
|
|
31
|
+
hello
|
|
32
|
+
</dd>
|
|
33
|
+
</div>
|
|
34
|
+
</body>
|
|
35
|
+
`;
|
|
36
|
+
|
|
3
37
|
exports[`renders the SummaryListItemValue with no props 1`] = `
|
|
4
38
|
<body>
|
|
5
39
|
<div>
|
|
@@ -8,3 +8,17 @@ it('renders the SummaryListItemValue with no props', () => {
|
|
|
8
8
|
render(<SummaryListItemValue>hello</SummaryListItemValue>).baseElement
|
|
9
9
|
).toMatchSnapshot();
|
|
10
10
|
});
|
|
11
|
+
it('renders the SummaryListItemValue with error="true', () => {
|
|
12
|
+
expect(
|
|
13
|
+
render(<SummaryListItemValue error>hello</SummaryListItemValue>).baseElement
|
|
14
|
+
).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
it('renders the SummaryListItemValue with error="true and errorAssistiveText="wrong', () => {
|
|
17
|
+
expect(
|
|
18
|
+
render(
|
|
19
|
+
<SummaryListItemValue error errorAssistiveText="wrong">
|
|
20
|
+
hello
|
|
21
|
+
</SummaryListItemValue>
|
|
22
|
+
).baseElement
|
|
23
|
+
).toMatchSnapshot();
|
|
24
|
+
});
|
|
@@ -1,24 +1,52 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import Base, { BaseProps } from '@digigov/react-core/Base';
|
|
4
|
+
import VisuallyHidden from '@digigov/react-core/VisuallyHidden';
|
|
4
5
|
|
|
5
|
-
export interface SummaryListItemValueProps extends BaseProps<'dd'> {
|
|
6
|
+
export interface SummaryListItemValueProps extends BaseProps<'dd'> {
|
|
7
|
+
/**
|
|
8
|
+
* error is optional.
|
|
9
|
+
* Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.
|
|
10
|
+
* @value true
|
|
11
|
+
* @value false
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
error?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* errorAssistiveText is optional.
|
|
18
|
+
* Default value is "Λανθασμένο πεδίο".
|
|
19
|
+
* errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.
|
|
20
|
+
*/
|
|
21
|
+
errorAssistiveText?: string;
|
|
22
|
+
}
|
|
6
23
|
/**
|
|
7
24
|
* Details for the SummaryListItemValue.
|
|
8
25
|
*/
|
|
9
26
|
export const SummaryListItemValue = React.forwardRef<
|
|
10
27
|
HTMLElement,
|
|
11
28
|
SummaryListItemValueProps
|
|
12
|
-
>(function SummaryListItemValue(
|
|
29
|
+
>(function SummaryListItemValue(
|
|
30
|
+
{
|
|
31
|
+
error,
|
|
32
|
+
errorAssistiveText = 'Λανθασμένο πεδίο',
|
|
33
|
+
className,
|
|
34
|
+
children,
|
|
35
|
+
...props
|
|
36
|
+
},
|
|
37
|
+
ref
|
|
38
|
+
) {
|
|
13
39
|
return (
|
|
14
40
|
<Base
|
|
15
41
|
as="dd"
|
|
16
42
|
ref={ref}
|
|
17
43
|
className={clsx(className, {
|
|
18
44
|
'ds-summary-list__value': true,
|
|
45
|
+
'ds-summary-list__value--error': error === true,
|
|
19
46
|
})}
|
|
20
47
|
{...props}
|
|
21
48
|
>
|
|
49
|
+
{error === true && <VisuallyHidden>{errorAssistiveText}</VisuallyHidden>}
|
|
22
50
|
{children}
|
|
23
51
|
</Base>
|
|
24
52
|
);
|
package/src/Table/index.tsx
CHANGED
|
@@ -47,6 +47,15 @@ export interface TableProps extends BaseProps<'table'> {
|
|
|
47
47
|
* @default 'default'
|
|
48
48
|
*/
|
|
49
49
|
variant?: 'zebra' | 'default';
|
|
50
|
+
/**
|
|
51
|
+
* verticalAlign is optional.
|
|
52
|
+
* The verticalAlign property sets vertical alignment of the table-cells.
|
|
53
|
+
* @value 'top'
|
|
54
|
+
* @value 'middle'
|
|
55
|
+
* @value 'bottom'
|
|
56
|
+
* @default 'middle'
|
|
57
|
+
*/
|
|
58
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
50
59
|
}
|
|
51
60
|
/**
|
|
52
61
|
* Table component is used to wrap the sub components of a table
|
|
@@ -59,6 +68,7 @@ export const Table = React.forwardRef<HTMLTableElement, TableProps>(
|
|
|
59
68
|
dense = false,
|
|
60
69
|
verticalBorders = false,
|
|
61
70
|
stacked = 'never',
|
|
71
|
+
verticalAlign = 'middle',
|
|
62
72
|
className,
|
|
63
73
|
children,
|
|
64
74
|
...props
|
|
@@ -79,6 +89,8 @@ export const Table = React.forwardRef<HTMLTableElement, TableProps>(
|
|
|
79
89
|
'ds-table--dense': dense,
|
|
80
90
|
'ds-table--zebra': variant === 'zebra',
|
|
81
91
|
'ds-table--vertical-lines': verticalBorders,
|
|
92
|
+
'ds-table--align-top': verticalAlign === 'top',
|
|
93
|
+
'ds-table--align-bottom': verticalAlign === 'bottom',
|
|
82
94
|
})}
|
|
83
95
|
{...props}
|
|
84
96
|
>
|