qpp-style 1.0.0-ds.2 → 1.0.0-mf.0
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/.babelrc +7 -6
- package/.browserlistrc +3 -0
- package/.editorconfig +1 -1
- package/.husky/pre-commit +0 -3
- package/.husky/pre-push +2 -0
- package/.prettierrc +1 -0
- package/README.md +22 -4
- package/components/Accordion/index.jsx +34 -30
- package/components/Button/index.js +15 -31
- package/components/Dropdown/index.js +18 -35
- package/components/Error/Collapsible.jsx +3 -3
- package/components/Error/ErrorUI.jsx +3 -4
- package/components/Error/error.js +4 -5
- package/components/Footer/DevPreFooter.jsx +229 -0
- package/components/Footer/FooterTooltip.jsx +59 -0
- package/components/Footer/FooterUI.jsx +36 -34
- package/components/Footer/SocialLinks.jsx +0 -2
- package/components/Footer/Subscribe.jsx +0 -2
- package/components/Footer/footer.js +7 -6
- package/components/GovBanner/index.js +2 -2
- package/components/Header/HeaderAccountMenu.jsx +18 -99
- package/components/Header/HeaderCancel.jsx +1 -2
- package/components/Header/HeaderContainer.jsx +56 -37
- package/components/Header/HeaderLogo.jsx +24 -5
- package/components/Header/HeaderMenuButton.js +6 -7
- package/components/Header/HeaderMenuItem.jsx +41 -47
- package/components/Header/HeaderMenuLink.js +12 -7
- package/components/Header/HeaderMenuSignOutButton.js +9 -9
- package/components/Header/HeaderMobileButton.js +3 -4
- package/components/Header/HeaderUI.jsx +95 -99
- package/components/Header/HelpIcon.jsx +0 -2
- package/components/Header/ImpersonatorBanner.jsx +35 -31
- package/components/Header/NavigationButtonIcon.jsx +0 -2
- package/components/Header/PreviewBanner.jsx +21 -0
- package/components/Header/header.js +4 -7
- package/components/Header/hooks.js +23 -13
- package/components/Header/utag-helpers.js +1 -1
- package/components/HeaderSearchBar/index.jsx +104 -0
- package/components/Infotip/Infotip.jsx +18 -24
- package/components/Infotip/InfotipContent.jsx +42 -0
- package/components/Infotip/InfotipIcon.jsx +5 -10
- package/components/Infotip/index.js +1 -1
- package/components/Modal/LegacyModal.jsx +10 -9
- package/components/Modal/Modal.jsx +12 -21
- package/components/Modal/index.jsx +5 -9
- package/components/NotificationBanner/CollapsedView.js +32 -25
- package/components/NotificationBanner/ExpandedView.js +5 -6
- package/components/NotificationBanner/index.js +39 -41
- package/components/SanitizedContent/index.jsx +188 -166
- package/components/Session/Session.jsx +89 -0
- package/components/Session/SessionDialogWrapped.jsx +12 -0
- package/components/Session/index.jsx +3 -0
- package/components/SideNav/AnimationGroup/AnimationGroup.jsx +4 -5
- package/components/SideNav/Content/LevelOneContent.jsx +31 -145
- package/components/SideNav/Content/SelectRole/index.js +21 -29
- package/components/SideNav/Content/SelectRole/utils.js +48 -25
- package/components/SideNav/Content/index.js +2 -3
- package/components/SideNav/Details/IndividualDetails.jsx +1 -2
- package/components/SideNav/Details/PracticeDetails.jsx +8 -3
- package/components/SideNav/Details/index.js +2 -2
- package/components/SideNav/Links/CmsSwitchLink.jsx +3 -4
- package/components/SideNav/Links/NavItemInline.jsx +6 -7
- package/components/SideNav/Links/NavLinkContainer.jsx +3 -8
- package/components/SideNav/Links/NavLinkDrawer.jsx +85 -65
- package/components/SideNav/Links/NavLinkInline.jsx +22 -23
- package/components/SideNav/Links/NavLinkToggle.jsx +6 -7
- package/components/SideNav/Links/index.js +5 -5
- package/components/SideNav/UI/DynamicContent.jsx +181 -0
- package/components/SideNav/UI/SideNavUI.jsx +99 -286
- package/components/SideNav/UI/default-markup.js +4 -0
- package/components/SideNav/UI/index.js +1 -1
- package/components/SideNav/UI/utils.js +0 -0
- package/components/SideNav/helpers.js +23 -239
- package/components/SideNav/index.js +10 -35
- package/components/Tabs/TabPanel.js +2 -38
- package/components/Tabs/Tabs.js +61 -0
- package/components/hooks/useGetConfig.js +7 -9
- package/components/index.js +18 -36
- package/coverage/clover.xml +1298 -0
- package/coverage/coverage-final.json +74 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +461 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/react/components/Accordion/index.html +116 -0
- package/coverage/lcov-report/react/components/Accordion/index.jsx.html +376 -0
- package/coverage/lcov-report/react/components/Button/index.html +116 -0
- package/coverage/lcov-report/react/components/Button/index.js.html +307 -0
- package/coverage/lcov-report/react/components/Dropdown/index.html +116 -0
- package/coverage/lcov-report/react/components/Dropdown/index.js.html +289 -0
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +349 -0
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +175 -0
- package/coverage/lcov-report/react/components/Error/error.js.html +160 -0
- package/coverage/lcov-report/react/components/Error/index.html +146 -0
- package/coverage/lcov-report/react/components/Footer/FooterTooltip.jsx.html +262 -0
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +712 -0
- package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +259 -0
- package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +181 -0
- package/coverage/lcov-report/react/components/Footer/footer.js.html +148 -0
- package/coverage/lcov-report/react/components/Footer/index.html +176 -0
- package/coverage/lcov-report/react/components/GovBanner/index.html +116 -0
- package/coverage/lcov-report/react/components/GovBanner/index.js.html +436 -0
- package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +349 -0
- package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +130 -0
- package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +337 -0
- package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +268 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +232 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +784 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +250 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +271 -0
- package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +193 -0
- package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +574 -0
- package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +175 -0
- package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +343 -0
- package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +160 -0
- package/coverage/lcov-report/react/components/Header/PreviewBanner.jsx.html +148 -0
- package/coverage/lcov-report/react/components/Header/header.js.html +196 -0
- package/coverage/lcov-report/react/components/Header/hooks.js.html +271 -0
- package/coverage/lcov-report/react/components/Header/index.html +356 -0
- package/coverage/lcov-report/react/components/Header/utag-helpers.js.html +112 -0
- package/coverage/lcov-report/react/components/HeaderSearchBar/index.html +116 -0
- package/coverage/lcov-report/react/components/HeaderSearchBar/index.jsx.html +397 -0
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +292 -0
- package/coverage/lcov-report/react/components/Infotip/InfotipContent.jsx.html +211 -0
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +193 -0
- package/coverage/lcov-report/react/components/Infotip/index.html +161 -0
- package/coverage/lcov-report/react/components/Infotip/index.js.html +94 -0
- package/coverage/lcov-report/react/components/Modal/LegacyModal.jsx.html +304 -0
- package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +478 -0
- package/coverage/lcov-report/react/components/Modal/index.html +146 -0
- package/coverage/lcov-report/react/components/Modal/index.jsx.html +139 -0
- package/coverage/lcov-report/react/components/NotificationBanner/CollapsedView.js.html +202 -0
- package/coverage/lcov-report/react/components/NotificationBanner/ExpandedView.js.html +217 -0
- package/coverage/lcov-report/react/components/NotificationBanner/index.html +146 -0
- package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +742 -0
- package/coverage/lcov-report/react/components/SanitizedContent/index.html +116 -0
- package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +751 -0
- package/coverage/lcov-report/react/components/Session/Session.jsx.html +352 -0
- package/coverage/lcov-report/react/components/Session/SessionDialogWrapped.jsx.html +121 -0
- package/coverage/lcov-report/react/components/Session/index.html +146 -0
- package/coverage/lcov-report/react/components/Session/index.jsx.html +94 -0
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +163 -0
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +116 -0
- package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +262 -0
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.js.html +298 -0
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/utils.js.html +514 -0
- package/coverage/lcov-report/react/components/SideNav/Content/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +94 -0
- package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +136 -0
- package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +235 -0
- package/coverage/lcov-report/react/components/SideNav/Details/index.html +146 -0
- package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +97 -0
- package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +205 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +244 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +184 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +973 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +418 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +184 -0
- package/coverage/lcov-report/react/components/SideNav/Links/index.html +206 -0
- package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +124 -0
- package/coverage/lcov-report/react/components/SideNav/UI/DynamicContent.jsx.html +628 -0
- package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +538 -0
- package/coverage/lcov-report/react/components/SideNav/UI/default-markup.js.html +97 -0
- package/coverage/lcov-report/react/components/SideNav/UI/index.html +161 -0
- package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +94 -0
- package/coverage/lcov-report/react/components/SideNav/helpers.js.html +229 -0
- package/coverage/lcov-report/react/components/SideNav/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/index.js.html +169 -0
- package/coverage/lcov-report/react/components/hooks/index.html +116 -0
- package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +304 -0
- package/coverage/lcov-report/react/index.html +116 -0
- package/coverage/lcov-report/react/index.js.html +178 -0
- package/coverage/lcov-report/react/lib/Chevron.jsx.html +169 -0
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +2179 -0
- package/coverage/lcov-report/react/lib/index.html +131 -0
- package/coverage/lcov-report/react/session/index.html +161 -0
- package/coverage/lcov-report/react/session/index.js.html +100 -0
- package/coverage/lcov-report/react/session/logout.js.html +322 -0
- package/coverage/lcov-report/react/session/refresh.js.html +232 -0
- package/coverage/lcov-report/react/session/ttl.js.html +148 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +2893 -0
- package/dist/browser.js +1 -1
- package/dist/browser.js.LICENSE.txt +30 -29
- package/dist/browser.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +30 -29
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.LICENSE.txt +12 -44
- package/dist/react/index.js.map +1 -1
- package/eslint.config.js +49 -0
- package/images/icons/svg/arrow-downward.svg +1 -0
- package/images/icons/svg/block.svg +5 -0
- package/images/icons/svg/check-circle.svg +5 -0
- package/images/icons/svg/checkmark.svg +7 -0
- package/images/icons/svg/chevron-down.svg +11 -0
- package/images/icons/svg/chevron-left.svg +12 -0
- package/images/icons/svg/chevron-right.svg +12 -0
- package/images/icons/svg/chevron-up.svg +12 -0
- package/images/icons/svg/clipboard.svg +1 -0
- package/images/icons/svg/divide.svg +13 -0
- package/images/icons/svg/doctors-and-clinicians-preview.svg +10 -0
- package/images/icons/svg/download-text-link.svg +4 -0
- package/images/icons/svg/equals.svg +13 -0
- package/images/icons/svg/exclamation.svg +10 -0
- package/images/icons/svg/file-upload.svg +1 -1
- package/images/icons/svg/info.svg +17 -0
- package/images/icons/svg/mail.svg +11 -0
- package/images/icons/svg/manage-user-access.svg +8 -0
- package/images/icons/svg/multiply.svg +12 -0
- package/images/icons/svg/performance-feedback.svg +1 -0
- package/images/icons/svg/phone.svg +11 -0
- package/images/icons/svg/plus.svg +12 -0
- package/images/icons/svg/preview.svg +15 -0
- package/images/icons/svg/processing.svg +7 -0
- package/images/icons/svg/registration.svg +8 -0
- package/images/icons/svg/reporting.svg +15 -0
- package/images/icons/svg/save-disk.svg +5 -0
- package/images/icons/svg/search.svg +1 -1
- package/images/icons/svg/subtract.svg +15 -0
- package/images/icons/svg/targeted-review.svg +15 -0
- package/index.js +6 -6
- package/jest.config.js +132 -132
- package/lib/Chevron.jsx +4 -8
- package/lib/SvgComponents.jsx +154 -10
- package/package.json +56 -83
- package/session/logout.js +30 -25
- package/session/refresh.js +34 -34
- package/session/ttl.js +18 -34
- package/styles/_main.scss +2 -2
- package/styles/components/_accordion.scss +7 -0
- package/styles/components/_notification-banner.scss +151 -150
- package/styles/qppds/base/_backgrounds.scss +3 -3
- package/styles/qppds/base/_fonts.scss +9 -9
- package/styles/qppds/base/_icon.scss +14 -6
- package/styles/qppds/base/_layout.scss +2 -2
- package/styles/qppds/base/_typography.scss +33 -21
- package/styles/qppds/base/index.scss +5 -5
- package/styles/qppds/components/_alert.scss +40 -34
- package/styles/qppds/components/_breadcrumbs.scss +43 -20
- package/styles/qppds/components/_button.scss +94 -90
- package/styles/qppds/components/_card.scss +22 -21
- package/styles/qppds/components/_checkbox.scss +201 -0
- package/styles/qppds/components/_circular-loader.scss +15 -15
- package/styles/qppds/components/_details.scss +91 -0
- package/styles/qppds/components/_dropdown-menu.scss +42 -35
- package/styles/qppds/components/_dropdown.scss +18 -18
- package/styles/qppds/components/_footer.scss +13 -11
- package/styles/qppds/components/_gov-banner.scss +71 -73
- package/styles/qppds/components/_header.scss +127 -84
- package/styles/qppds/components/_link.scss +29 -27
- package/styles/qppds/components/_modal.scss +58 -23
- package/styles/qppds/components/_page-header.scss +61 -23
- package/styles/qppds/components/_pagination.scss +56 -53
- package/styles/qppds/components/_process-list.scss +106 -0
- package/styles/qppds/components/_radio-button.scss +185 -0
- package/styles/qppds/components/_search.scss +133 -23
- package/styles/qppds/components/_step-indicator.scss +61 -58
- package/styles/qppds/components/_table.scss +46 -44
- package/styles/qppds/components/_tabs.scss +48 -46
- package/styles/qppds/components/_text-input.scss +22 -22
- package/styles/qppds/components/index.scss +22 -17
- package/styles/qppds/components/sidebar/_details.scss +3 -0
- package/styles/qppds/components/sidebar/_sidebar-animation.scss +72 -106
- package/styles/qppds/components/sidebar/_sidebar.scss +0 -1
- package/styles/qppds/settings/_functions.scss +3 -1
- package/styles/qppds/settings/_index.scss +3 -3
- package/styles/qppds/settings/mixins/_borders.scss +2 -2
- package/styles/qppds/settings/mixins/_focus.scss +9 -7
- package/styles/qppds/settings/mixins/_icons.scss +10 -0
- package/styles/qppds/settings/mixins/_index.scss +8 -8
- package/styles/qppds/settings/mixins/_layout.scss +16 -16
- package/styles/qppds/settings/mixins/_table.scss +18 -17
- package/styles/qppds/settings/mixins/_type.scss +52 -27
- package/styles/qppds/settings/variables/_color.module.scss +46 -0
- package/styles/qppds/settings/variables/_color.scss +0 -45
- package/styles/qppds/settings/variables/_index.scss +4 -3
- package/styles/qppds/settings/variables/_layout.module.scss +23 -0
- package/styles/qppds/settings/variables/_layout.scss +15 -36
- package/styles/qppds/settings/variables/_type.module.scss +38 -0
- package/styles/qppds/settings/variables/_type.scss +10 -47
- package/styles/qppds/settings/variables/_z-index.module.scss +8 -0
- package/styles/qppds/settings/variables/_z-index.scss +3 -0
- package/styles/qppds/utilities/_background-color.scss +34 -34
- package/styles/qppds/utilities/_color.scss +13 -9
- package/styles/qppds/utilities/_display-visibility.scss +5 -4
- package/styles/qppds/utilities/_flexbox.scss +22 -22
- package/styles/qppds/utilities/_font-family.scss +3 -2
- package/styles/qppds/utilities/_font-size.scss +2 -2
- package/styles/qppds/utilities/_font-weight.scss +4 -2
- package/styles/qppds/utilities/_gap.scss +38 -0
- package/styles/qppds/utilities/_height.scss +53 -10
- package/styles/qppds/utilities/_list-style.scss +17 -0
- package/styles/qppds/utilities/_margin.scss +6 -6
- package/styles/qppds/utilities/_padding.scss +6 -6
- package/styles/qppds/utilities/_position.scss +3 -3
- package/styles/qppds/utilities/_text-align.scss +3 -3
- package/styles/qppds/utilities/_vertical-align.scss +3 -3
- package/styles/qppds/utilities/_width.scss +19 -16
- package/styles/qppds/utilities/index.scss +17 -16
- package/svgo.config.js +14 -0
- package/test/components/FooterUI.test.js +18 -19
- package/test/components/HeaderUI.test.js +7 -40
- package/test/components/Infotip.test.js +40 -37
- package/test/components/SideNavUI.test.js +0 -1
- package/test/session/session.test.js +50 -134
- package/test-setup.js +0 -4
- package/webpack.config.js +59 -71
- package/webpack.config.react.js +7 -18
- package/.eslintignore +0 -5
- package/.eslintrc.js +0 -31
- package/.storybook/.babelrc +0 -4
- package/.storybook/main.js +0 -89
- package/.storybook/preview-head.html +0 -9
- package/.storybook/preview.js +0 -5
- package/components/Accordion/Accordion.stories.js +0 -20
- package/components/Alert/Alert.stories.js +0 -61
- package/components/Alert/index.js +0 -53
- package/components/Breadcrumb/Breadcrumb.md +0 -28
- package/components/Breadcrumb/Breadcrumb.stories.js +0 -76
- package/components/Breadcrumb/index.js +0 -83
- package/components/Button/Button.stories.js +0 -121
- package/components/CalloutBox/CalloutBox.stories.js +0 -94
- package/components/CalloutBox/index.js +0 -109
- package/components/Card/Card.stories.js +0 -163
- package/components/Card/index.js +0 -137
- package/components/Dropdown/Dropdown.stories.js +0 -94
- package/components/DropdownButton/DropdownButton.stories.js +0 -137
- package/components/DropdownButton/index.js +0 -148
- package/components/FlashNotification/FlashNotificationUI.jsx +0 -91
- package/components/FlashNotification/index.js +0 -30
- package/components/Footer/Footer.stories.js +0 -13
- package/components/Header/Header.stories.js +0 -32
- package/components/Infotip/Infotip.stories.js +0 -50
- package/components/Link/Link.stories.js +0 -81
- package/components/Link/index.js +0 -61
- package/components/Modal/Modal.stories.js +0 -159
- package/components/NotificationBanner/NotificationBanner.stories.js +0 -23
- package/components/Search/Search.stories.js +0 -21
- package/components/Search/index.js +0 -98
- package/components/SessionDialog/sessionDialog.js +0 -26
- package/components/SessionDialogUI.jsx +0 -261
- package/components/SideNav/Chart/ScoreChart.jsx +0 -268
- package/components/SideNav/Chart/__tests__/ScoreChart.test.js +0 -22
- package/components/SideNav/Chart/__tests__/__snapshots__/ScoreChart.test.js.snap +0 -173
- package/components/SideNav/Chart/index.js +0 -3
- package/components/SideNav/Content/LevelTwoContent.jsx +0 -216
- package/components/SideNav/SideNav.stories.js +0 -379
- package/components/SideNav/UI/default-content.json +0 -99
- package/components/Spinner/index.js +0 -9
- package/components/Tabs/Tab.js +0 -26
- package/components/Tabs/Tabs.stories.js +0 -120
- package/components/Tabs/index.js +0 -100
- package/components/TextInput/TextInput.stories.js +0 -118
- package/components/TextInput/index.js +0 -137
- package/components/Tooltip/Tooltip.jsx +0 -88
- package/components/Tooltip/Tooltip.stories.js +0 -80
- package/components/Tooltip/index.js +0 -3
- package/components/Tooltip/position.js +0 -68
- package/components/UnwrappedSpinner/index.js +0 -8
- package/styles/qppds/utilities/_truncate.scss +0 -8
- package/test/components/Accordion.test.js +0 -12
- package/test/components/ErrorUI.test.js +0 -33
- package/test/components/SessionDialogUI.test.js +0 -339
- package/test/components/Tooltip.test.js +0 -147
package/.babelrc
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"presets": [
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
[
|
|
4
|
+
"@babel/preset-react",
|
|
5
|
+
{
|
|
6
|
+
"runtime": "automatic"
|
|
7
|
+
}
|
|
8
|
+
]
|
|
5
9
|
],
|
|
6
|
-
"plugins": [
|
|
7
|
-
"transform-es2015-modules-umd",
|
|
8
|
-
"transform-class-properties"
|
|
9
|
-
]
|
|
10
|
+
"plugins": ["transform-es2015-modules-umd"]
|
|
10
11
|
}
|
package/.browserlistrc
ADDED
package/.editorconfig
CHANGED
package/.husky/pre-commit
CHANGED
package/.husky/pre-push
ADDED
package/.prettierrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/README.md
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This directory contains react implementations of the components for QPP.
|
|
4
4
|
|
|
5
|
-
A storybook with examples is published at [https://cmsgov.github.io/qpp-style](https://cmsgov.github.io/qpp-style)
|
|
6
|
-
|
|
7
5
|
## Github Branch and Pull Request process
|
|
6
|
+
|
|
8
7
|
1. Create branch off main and create a Pull Request into main for the feature.
|
|
9
|
-
>Example Branch Name: feature/QPPXX-XXXX_make_icon_better
|
|
8
|
+
> Example Branch Name: feature/QPPXX-XXXX_make_icon_better
|
|
10
9
|
2. Once merged into main, create release branch from main.
|
|
11
10
|
3. Name the new branch release/x.xx.x
|
|
12
11
|
4. Run the version bump:
|
|
@@ -17,13 +16,15 @@ npm version --no-git-tag-version patch
|
|
|
17
16
|
```
|
|
18
17
|
|
|
19
18
|
Example Commit Message:
|
|
19
|
+
|
|
20
20
|
> x.xx.x release
|
|
21
21
|
|
|
22
22
|
5. Create a pull request against main with the PR Title: x.xx.x release [Example PR](https://github.com/CMSgov/qpp-style/pull/1065)
|
|
23
23
|
6. Enter the change in the description of the pull request i.e.:
|
|
24
|
-
> Added new svg for Icon Name
|
|
24
|
+
> Added new svg for Icon Name
|
|
25
25
|
|
|
26
26
|
## Generate an NPM token with Publish permissions
|
|
27
|
+
|
|
27
28
|
1. If you do not already have an access token, sign in to npmjs.com and navigate to access tokens.
|
|
28
29
|
2. Click generate new token.
|
|
29
30
|
3. Select publish under type.
|
|
@@ -34,9 +35,26 @@ export NPM_TOKEN={npm_token}
|
|
|
34
35
|
```
|
|
35
36
|
|
|
36
37
|
## Publish the react qpp-style npm package (used by both react and angular)
|
|
38
|
+
|
|
37
39
|
```bash
|
|
38
40
|
cd qpp-style/react
|
|
39
41
|
npm i
|
|
40
42
|
npm publish
|
|
41
43
|
```
|
|
44
|
+
|
|
42
45
|
7. Once published successfully, merge into main.
|
|
46
|
+
|
|
47
|
+
The Side Nav contains multiple item array types: divider, container, linkBack, linkHome, practiceDetails, individualDetails, linkDrawer, custom, chart, and switchLink.
|
|
48
|
+
|
|
49
|
+
| Item Array Type | Description |
|
|
50
|
+
|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
51
|
+
| divider | <hr> element that is located above and below the practice container. |
|
|
52
|
+
| container | gets Dynamic Content of multiple items and contains the linkDrawer item. Level One and Level Two content are located in this container. |
|
|
53
|
+
| linkBack | <button> that links the user back to a URL. This uses a chevron Left icon. |
|
|
54
|
+
| linkHome | <a> tag element which sends the user back to the “Account Home” page /user/submissions. This uses the home icon SVG and is located at the top of the side nav. |
|
|
55
|
+
| practiceDetails | <div> element with the class name practice-container. Inside this container is the <h2> element which includes the Practice Name and the <p> element which is the Practice Tin. The Practice Tin shows either the CPC+ ID, PCF ID, APM Entity ID, VG ID, or Practice Tin. |
|
|
56
|
+
| individualDetails | <div> element with the class name “individual-container”. This parent element contains two other elements which are the <h3> Individual Name and the <p> Individual NPI. |
|
|
57
|
+
| linkDrawer | This is the most complex item type. This item displays the Level One and Level Two <button> elements which contain navigation links depending on each page as well as specific SVG icons. Depending on the page there can be multiple links to the user can access quickly using the side nav. |
|
|
58
|
+
| custom | This option is for sanitized HTML content. This custom HTML will be cleaned of any potentially harmful elements that could compromise the security of the web app. |
|
|
59
|
+
| chart | This option uses the ScoreChart component to display Chart Data on the Side Nav. This data includes categories from Quality Measures, Advancing Care Info, Promoting Interoperability, Improvement Activities, and Cost. |
|
|
60
|
+
| switchLink | This is an implementation of the “Switch Practice” button for the Side Nav. Clicking 'Switch Practice' will take the user back to the TIN list for the part of the application they are viewing. |
|
|
@@ -1,64 +1,72 @@
|
|
|
1
|
-
import
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { Chevron } from
|
|
1
|
+
import { useState, useRef, useEffect } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { Chevron } from "../../lib/Chevron.jsx";
|
|
4
4
|
|
|
5
|
-
const Accordion = (
|
|
5
|
+
const Accordion = ({
|
|
6
|
+
title = "",
|
|
7
|
+
subTitle,
|
|
8
|
+
children,
|
|
9
|
+
centerItem,
|
|
10
|
+
rightItem,
|
|
11
|
+
isOpen = false,
|
|
12
|
+
isSticky = false,
|
|
13
|
+
}) => {
|
|
6
14
|
const content = useRef(null);
|
|
7
|
-
const [setActive, setActiveState] = useState(
|
|
8
|
-
const ariaPressed = setActive ?
|
|
15
|
+
const [setActive, setActiveState] = useState(isOpen ? "active" : "");
|
|
16
|
+
const ariaPressed = setActive ? "true" : "false";
|
|
9
17
|
const getHeight = (node) => {
|
|
10
18
|
if (node) {
|
|
11
19
|
return `${node.scrollHeight}px`;
|
|
12
20
|
}
|
|
13
|
-
return
|
|
21
|
+
return "auto";
|
|
14
22
|
};
|
|
15
|
-
const height = setActive ? getHeight(content.current) :
|
|
16
|
-
const rotate = setActive ?
|
|
23
|
+
const height = setActive ? getHeight(content.current) : "0px";
|
|
24
|
+
const rotate = setActive ? "accordion-icon rotate" : "accordion-icon";
|
|
17
25
|
|
|
18
26
|
function toggleAccordion() {
|
|
19
|
-
setActiveState(setActive ===
|
|
27
|
+
setActiveState(setActive === "" ? "active" : "");
|
|
20
28
|
}
|
|
21
29
|
|
|
22
30
|
function openAccordion() {
|
|
23
|
-
setActiveState(
|
|
31
|
+
setActiveState("active");
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
function closeAccordion() {
|
|
27
|
-
setActiveState(
|
|
35
|
+
setActiveState("");
|
|
28
36
|
}
|
|
29
37
|
|
|
30
38
|
useEffect(() => {
|
|
31
|
-
if (
|
|
39
|
+
if (isOpen) {
|
|
32
40
|
openAccordion();
|
|
33
41
|
} else {
|
|
34
42
|
closeAccordion();
|
|
35
43
|
}
|
|
36
|
-
}, [
|
|
44
|
+
}, [isOpen]);
|
|
37
45
|
|
|
38
46
|
return (
|
|
39
47
|
<div className="accordion-section" data-testid="accordion">
|
|
40
48
|
<button
|
|
41
|
-
className={`accordion ${setActive}
|
|
42
|
-
|
|
49
|
+
className={`accordion ${setActive} ${
|
|
50
|
+
setActive && isSticky ? "sticky" : ""
|
|
51
|
+
}`}
|
|
52
|
+
aria-label={title}
|
|
43
53
|
aria-pressed={ariaPressed}
|
|
44
54
|
aria-expanded={ariaPressed}
|
|
45
55
|
tabIndex="0"
|
|
46
56
|
onClick={toggleAccordion}
|
|
47
57
|
>
|
|
48
58
|
<div className="accordion-left-title">
|
|
49
|
-
<p className="accordion-title">{
|
|
50
|
-
{
|
|
51
|
-
<p className="accordion-subtitle">{props.subTitle}</p>
|
|
52
|
-
)}
|
|
59
|
+
<p className="accordion-title">{title}</p>
|
|
60
|
+
{subTitle && <p className="accordion-subtitle">{subTitle}</p>}
|
|
53
61
|
</div>
|
|
54
|
-
{
|
|
62
|
+
{centerItem && (
|
|
55
63
|
<div className="accordion-center">
|
|
56
|
-
<p>{
|
|
64
|
+
<p>{centerItem}</p>
|
|
57
65
|
</div>
|
|
58
66
|
)}
|
|
59
|
-
{
|
|
67
|
+
{rightItem && (
|
|
60
68
|
<div className="accordion-right">
|
|
61
|
-
<p>{
|
|
69
|
+
<p>{rightItem}</p>
|
|
62
70
|
</div>
|
|
63
71
|
)}
|
|
64
72
|
<div className="chevron-container">
|
|
@@ -70,7 +78,7 @@ const Accordion = (props) => {
|
|
|
70
78
|
style={{ maxHeight: height }}
|
|
71
79
|
className="accordion-content"
|
|
72
80
|
>
|
|
73
|
-
<div className="accordion-text dashed-border">{
|
|
81
|
+
<div className="accordion-text dashed-border">{children}</div>
|
|
74
82
|
</div>
|
|
75
83
|
</div>
|
|
76
84
|
);
|
|
@@ -83,11 +91,7 @@ Accordion.propTypes = {
|
|
|
83
91
|
centerItem: PropTypes.string,
|
|
84
92
|
rightItem: PropTypes.string,
|
|
85
93
|
isOpen: PropTypes.bool,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Accordion.defaultProps = {
|
|
89
|
-
title: '',
|
|
90
|
-
isOpen: false,
|
|
94
|
+
isSticky: PropTypes.bool,
|
|
91
95
|
};
|
|
92
96
|
|
|
93
97
|
export default Accordion;
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
1
|
+
import PropTypes from "prop-types";
|
|
3
2
|
|
|
4
|
-
const VARIANTS = [
|
|
5
|
-
const SIZES = [
|
|
3
|
+
const VARIANTS = ["secondary", "outline", "danger", "white"];
|
|
4
|
+
const SIZES = ["big"];
|
|
6
5
|
|
|
7
6
|
const Button = ({
|
|
8
|
-
children,
|
|
7
|
+
children = null,
|
|
9
8
|
className,
|
|
10
9
|
href,
|
|
11
|
-
loading,
|
|
12
|
-
onClick,
|
|
13
|
-
size,
|
|
10
|
+
loading = false,
|
|
11
|
+
onClick = () => {},
|
|
12
|
+
size = null,
|
|
14
13
|
variant,
|
|
15
|
-
type,
|
|
14
|
+
type = "button",
|
|
16
15
|
...rest
|
|
17
16
|
}) => {
|
|
18
|
-
let btnClass =
|
|
17
|
+
let btnClass = "qpp-c-button";
|
|
19
18
|
|
|
20
19
|
if (VARIANTS.includes(variant)) {
|
|
21
|
-
btnClass = btnClass.concat(
|
|
20
|
+
btnClass = btnClass.concat(" ", `qpp-c-button--${variant}`);
|
|
22
21
|
}
|
|
23
22
|
if (SIZES.includes(size)) {
|
|
24
|
-
btnClass = btnClass.concat(
|
|
23
|
+
btnClass = btnClass.concat(" ", `qpp-c-button--${size}`);
|
|
25
24
|
}
|
|
26
25
|
if (className) {
|
|
27
|
-
btnClass = btnClass.concat(
|
|
26
|
+
btnClass = btnClass.concat(" ", className);
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
if (href) {
|
|
@@ -32,7 +31,7 @@ const Button = ({
|
|
|
32
31
|
<a
|
|
33
32
|
href={href}
|
|
34
33
|
data-testid="ds-btn"
|
|
35
|
-
className={btnClass ||
|
|
34
|
+
className={btnClass || ""}
|
|
36
35
|
onClick={onClick}
|
|
37
36
|
>
|
|
38
37
|
{children}
|
|
@@ -42,7 +41,7 @@ const Button = ({
|
|
|
42
41
|
return (
|
|
43
42
|
<button
|
|
44
43
|
data-testid="ds-btn"
|
|
45
|
-
className={btnClass ||
|
|
44
|
+
className={btnClass || ""}
|
|
46
45
|
onClick={onClick}
|
|
47
46
|
disabled={loading}
|
|
48
47
|
type={type}
|
|
@@ -64,18 +63,7 @@ Button.propTypes = {
|
|
|
64
63
|
variant: PropTypes.oneOf(VARIANTS),
|
|
65
64
|
};
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
children: false,
|
|
69
|
-
className: '',
|
|
70
|
-
href: '',
|
|
71
|
-
loading: false,
|
|
72
|
-
onClick: () => null,
|
|
73
|
-
size: null,
|
|
74
|
-
type: 'button',
|
|
75
|
-
variant: null,
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export const TextButton = ({ className = '', ...props }) => (
|
|
66
|
+
export const TextButton = ({ className = "", ...props }) => (
|
|
79
67
|
<Button className={`qpp-c-button--text ${className}`} {...props} />
|
|
80
68
|
);
|
|
81
69
|
|
|
@@ -83,8 +71,4 @@ TextButton.propTypes = {
|
|
|
83
71
|
className: PropTypes.string,
|
|
84
72
|
};
|
|
85
73
|
|
|
86
|
-
TextButton.defaultProps = {
|
|
87
|
-
className: '',
|
|
88
|
-
};
|
|
89
|
-
|
|
90
74
|
export default Button;
|
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
1
|
+
import PropTypes from "prop-types";
|
|
3
2
|
|
|
4
3
|
const Dropdown = ({
|
|
5
|
-
className,
|
|
6
|
-
id,
|
|
7
|
-
ariaLabelledBy,
|
|
8
|
-
ariaLabel,
|
|
9
|
-
onChange,
|
|
10
|
-
dataTestId,
|
|
11
|
-
name,
|
|
12
|
-
dataType,
|
|
13
|
-
disabled,
|
|
14
|
-
size,
|
|
15
|
-
options,
|
|
4
|
+
className = "qpp-u-width--100",
|
|
5
|
+
id = null,
|
|
6
|
+
ariaLabelledBy = null,
|
|
7
|
+
ariaLabel = null,
|
|
8
|
+
onChange = () => {},
|
|
9
|
+
dataTestId = null,
|
|
10
|
+
name = null,
|
|
11
|
+
dataType = null,
|
|
12
|
+
disabled = false,
|
|
13
|
+
size = null,
|
|
14
|
+
options = [],
|
|
16
15
|
children,
|
|
17
|
-
parentElement,
|
|
16
|
+
parentElement = "span",
|
|
18
17
|
...rest
|
|
19
18
|
}) => {
|
|
20
19
|
const dropdownClass = [
|
|
21
|
-
|
|
22
|
-
size ===
|
|
20
|
+
"qpp-c-dropdown",
|
|
21
|
+
size === "big" && "qpp-c-dropdown--big",
|
|
23
22
|
className,
|
|
24
23
|
]
|
|
25
24
|
.filter(Boolean)
|
|
26
|
-
.join(
|
|
25
|
+
.join(" ");
|
|
27
26
|
|
|
28
27
|
return (
|
|
29
28
|
<select
|
|
30
29
|
id={id}
|
|
31
30
|
aria-labelledby={ariaLabelledBy}
|
|
32
31
|
aria-label={ariaLabel}
|
|
33
|
-
className={dropdownClass ||
|
|
32
|
+
className={dropdownClass || ""}
|
|
34
33
|
onChange={onChange}
|
|
35
34
|
data-testid={dataTestId}
|
|
36
35
|
name={name}
|
|
@@ -61,25 +60,9 @@ Dropdown.propTypes = {
|
|
|
61
60
|
name: PropTypes.string,
|
|
62
61
|
dataType: PropTypes.string,
|
|
63
62
|
disabled: PropTypes.bool,
|
|
64
|
-
size: PropTypes.oneOf([
|
|
63
|
+
size: PropTypes.oneOf(["big"]),
|
|
65
64
|
options: PropTypes.array,
|
|
66
65
|
parentElement: PropTypes.string,
|
|
67
66
|
};
|
|
68
67
|
|
|
69
|
-
Dropdown.defaultProps = {
|
|
70
|
-
children: false,
|
|
71
|
-
className: 'qpp-u-width--100',
|
|
72
|
-
id: null,
|
|
73
|
-
ariaLabelledBy: null,
|
|
74
|
-
ariaLabel: null,
|
|
75
|
-
onChange: () => null,
|
|
76
|
-
dataTestId: null,
|
|
77
|
-
name: null,
|
|
78
|
-
dataType: null,
|
|
79
|
-
disabled: false,
|
|
80
|
-
size: null,
|
|
81
|
-
options: [],
|
|
82
|
-
parentElement: 'span',
|
|
83
|
-
};
|
|
84
|
-
|
|
85
68
|
export default Dropdown;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import { Component } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
4
|
class Collapsible extends Component {
|
|
5
5
|
constructor(props) {
|
|
@@ -32,7 +32,7 @@ class Collapsible extends Component {
|
|
|
32
32
|
<span className="collapsible-hide-label">{this.props.hideLabel}</span>
|
|
33
33
|
);
|
|
34
34
|
} else {
|
|
35
|
-
return
|
|
35
|
+
return "";
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
1
|
+
import Collapsible from "./Collapsible";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
4
3
|
|
|
5
4
|
const ErrorUI = (props) => {
|
|
6
|
-
let errorTitle = `${props.type ||
|
|
5
|
+
let errorTitle = `${props.type || "Error"} ${props.code || ""}`;
|
|
7
6
|
let errorDetails = props.message;
|
|
8
7
|
|
|
9
8
|
return (
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import ErrorUI from './ErrorUI';
|
|
1
|
+
import { createRoot } from "react-dom/client";
|
|
2
|
+
import ErrorUI from "./ErrorUI";
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Renders the QPP Error Page content.
|
|
@@ -14,13 +13,13 @@ export default class ErrorPage {
|
|
|
14
13
|
* @param {HTMLElement} options.rootElement - Elem inside which to render
|
|
15
14
|
*/
|
|
16
15
|
constructor(options) {
|
|
17
|
-
|
|
16
|
+
const root = createRoot(options.rootElement);
|
|
17
|
+
root.render(
|
|
18
18
|
<ErrorUI
|
|
19
19
|
type={options.type}
|
|
20
20
|
code={options.code}
|
|
21
21
|
message={options.message}
|
|
22
22
|
/>,
|
|
23
|
-
options.rootElement
|
|
24
23
|
);
|
|
25
24
|
}
|
|
26
25
|
}
|