This PR fixes some issues with the 8.0.0 release. It also addresses the issue of focus-trap-react and jsdom by requiring users to add focus-trap-react as a dependency to their projects with documentation on the issue so that they can ensure unit tests rendering Modal do not fail.
add css files to package.json exports (credit to mdmower-csnw)
add jest-dom to tsconfig types
add focus-trap-react as peer dependency and exclude from library bundle
update documentation to explain the focus-trap-react issue and to install focus-trap-react with react-uswds
update dependencies
updates and fixes presented yarn version (fixes errors when adding library via git)
adds some protection against undefined properties in dangerfile
Related Issues or PRs
2807
How To Test
Use this branch for the version of react-uswds in your project
Verify that you can successfully import the index.css and uswds.css files in code
Verify that you can mock the focus-trap-react library to prevent errors when rendering Modal in unit tests
Summary
This PR fixes some issues with the 8.0.0 release. It also addresses the issue of
focus-trap-react
andjsdom
by requiring users to addfocus-trap-react
as a dependency to their projects with documentation on the issue so that they can ensure unit tests renderingModal
do not fail.focus-trap-react
with react-uswdsRelated Issues or PRs
2807
How To Test
index.css
anduswds.css
files in codefocus-trap-react
library to prevent errors when renderingModal
in unit tests