qpp-style 0.0.9 → 0.0.10
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/.eslintrc.js +28 -28
- package/.husky/pre-commit +5 -0
- package/README.md +45 -0
- package/components/Accordion/index.jsx +35 -43
- package/components/Alert/index.js +53 -0
- package/components/Breadcrumb/index.js +4 -4
- package/components/Button/index.js +17 -6
- package/components/CalloutBox/index.js +109 -0
- package/components/Card/index.js +137 -0
- package/components/Details/DetailsIcons.js +50 -0
- package/components/Details/index.js +53 -0
- package/components/Dropdown/index.js +85 -0
- package/components/DropdownButton/Menu.js +25 -0
- package/components/DropdownButton/MenuButton.js +41 -0
- package/components/DropdownButton/MenuItem.js +25 -0
- package/components/DropdownButton/MenuItemLink.js +27 -0
- package/components/Error/Collapsible.jsx +2 -2
- package/components/Footer/FooterUI.jsx +175 -177
- package/components/Footer/footer.js +2 -12
- package/components/GovBanner/index.js +117 -0
- package/components/Header/HeaderAccountMenu.jsx +49 -75
- package/components/Header/HeaderContainer.jsx +46 -34
- package/components/Header/HeaderLogo.jsx +40 -17
- package/components/Header/HeaderMenuButton.js +38 -12
- package/components/Header/HeaderMenuItem.jsx +204 -64
- package/components/Header/HeaderMenuLink.js +46 -10
- package/components/Header/HeaderMenuSignOutButton.js +46 -10
- package/components/Header/HeaderMobileButton.js +15 -6
- package/components/Header/HeaderUI.jsx +118 -117
- package/components/Header/HelpIcon.jsx +7 -5
- package/components/Header/ImpersonatorBanner.jsx +81 -0
- package/components/Header/header.js +2 -0
- package/components/Header/hooks.js +53 -1
- package/components/Header/utag-helpers.js +9 -0
- package/components/Infotip/Infotip.jsx +6 -10
- package/components/Infotip/InfotipContent.jsx +46 -0
- package/components/Infotip/InfotipIcon.jsx +3 -3
- package/components/Link/index.js +61 -0
- package/components/Modal/Modal.jsx +53 -40
- package/components/Modal/index.jsx +11 -11
- package/components/NotificationBanner/CollapsedView.js +39 -0
- package/components/NotificationBanner/ExpandedView.js +45 -0
- package/components/NotificationBanner/index.js +219 -30
- package/components/Search/index.js +98 -0
- package/components/SessionDialog/sessionDialog.js +26 -0
- package/components/SessionDialogUI.jsx +34 -26
- package/components/SideNav/AnimationGroup/AnimationGroup.jsx +9 -2
- package/components/SideNav/Chart/ScoreChart.jsx +1 -1
- package/components/SideNav/Chart/__tests__/ScoreChart.test.js +3 -12
- package/components/SideNav/Chart/__tests__/__snapshots__/ScoreChart.test.js.snap +144 -35
- package/components/SideNav/Chart/index.js +1 -1
- package/components/SideNav/Content/LevelOneContent.jsx +145 -255
- package/components/SideNav/Content/LevelTwoContent.jsx +12 -10
- package/components/SideNav/Content/SelectRole/index.js +77 -0
- package/components/SideNav/Content/SelectRole/utils.js +140 -0
- package/components/SideNav/Details/PracticeDetails.jsx +4 -0
- package/components/SideNav/Links/CmsSwitchLink.jsx +1 -1
- package/components/SideNav/Links/NavLinkContainer.jsx +29 -34
- package/components/SideNav/Links/NavLinkDrawer.jsx +100 -17
- package/components/SideNav/Links/NavLinkInline.jsx +7 -2
- package/components/SideNav/SideNav.md +28 -27
- package/components/SideNav/UI/SideNavUI.jsx +122 -129
- package/components/SideNav/UI/default-content.json +117 -0
- package/components/SideNav/helpers.js +316 -4
- package/components/Tabs/TabPanel.js +5 -0
- package/components/Tabs/Tabs.js +73 -0
- package/components/TextInput/index.js +137 -0
- package/components/hooks/useGetConfig.js +75 -0
- package/components/index.js +103 -9
- package/coverage/clover.xml +1465 -41
- package/coverage/coverage-final.json +72 -1
- package/coverage/lcov-report/block-navigation.js +8 -0
- package/coverage/lcov-report/components/Accordion/index.html +26 -21
- package/coverage/lcov-report/components/Accordion/index.jsx.html +106 -131
- package/coverage/lcov-report/{SideNav/Chart → components/Button}/index.html +29 -24
- package/coverage/lcov-report/{Error/Collapsible.jsx.html → components/Button/index.js.html} +125 -114
- package/coverage/lcov-report/components/Error/Collapsible.jsx.html +92 -87
- package/coverage/lcov-report/components/Error/ErrorUI.jsx.html +32 -33
- package/coverage/lcov-report/components/Error/index.html +11 -6
- package/coverage/lcov-report/components/Footer/FooterUI.jsx.html +200 -189
- package/coverage/lcov-report/components/Footer/SocialLinks.jsx.html +24 -61
- package/coverage/lcov-report/components/Footer/Subscribe.jsx.html +18 -13
- package/coverage/lcov-report/components/Footer/index.html +35 -45
- package/coverage/lcov-report/components/{InfoModal → GovBanner}/index.html +27 -22
- package/coverage/lcov-report/components/{InfoModal/index.jsx.html → GovBanner/index.js.html} +157 -122
- package/coverage/lcov-report/components/Header/HeaderAccountMenu.jsx.html +93 -520
- package/coverage/lcov-report/components/Header/HeaderCancel.jsx.html +19 -23
- package/coverage/lcov-report/components/Header/HeaderContainer.jsx.html +280 -0
- package/coverage/lcov-report/components/{SideNav/Links/NavLinkContainer.jsx.html → Header/HeaderLogo.jsx.html} +78 -67
- package/coverage/lcov-report/components/{SideNav/Links/NavItemInline.jsx.html → Header/HeaderMenuButton.js.html} +71 -78
- package/coverage/lcov-report/components/{SideNav/Links/NavLinkDrawer.jsx.html → Header/HeaderMenuItem.jsx.html} +291 -268
- package/coverage/lcov-report/components/Header/HeaderMenuLink.js.html +253 -0
- package/coverage/lcov-report/components/Header/HeaderMenuSignOutButton.js.html +271 -0
- package/coverage/lcov-report/components/{SideNav/Links/NavLinkToggle.jsx.html → Header/HeaderMobileButton.js.html} +64 -47
- package/coverage/lcov-report/components/Header/HeaderUI.jsx.html +176 -756
- package/coverage/lcov-report/components/Header/HelpIcon.jsx.html +181 -0
- package/coverage/lcov-report/{Accordion/index.jsx.html → components/Header/ImpersonatorBanner.jsx.html} +109 -167
- package/coverage/lcov-report/components/Header/NavigationButtonIcon.jsx.html +24 -19
- package/coverage/lcov-report/components/Header/hooks.js.html +283 -0
- package/coverage/lcov-report/components/Header/index.html +203 -33
- package/coverage/lcov-report/components/{SideNav/Links/index.js.html → Header/utag-helpers.js.html} +35 -42
- package/coverage/lcov-report/components/Infotip/Infotip.jsx.html +53 -48
- package/coverage/lcov-report/components/Infotip/InfotipIcon.jsx.html +37 -32
- package/coverage/lcov-report/components/Infotip/index.html +8 -3
- package/coverage/lcov-report/components/Infotip/index.js.html +8 -3
- package/coverage/lcov-report/components/Modal/LegacyModal.jsx.html +301 -0
- package/coverage/lcov-report/{HeaderUI.jsx.html → components/Modal/Modal.jsx.html} +169 -257
- package/coverage/lcov-report/components/Modal/index.html +146 -0
- package/coverage/lcov-report/components/{SideNav/Details/IndividualDetails.jsx.html → Modal/index.jsx.html} +50 -42
- package/coverage/lcov-report/components/NotificationBanner/CollapsedView.js.html +202 -0
- package/coverage/lcov-report/components/NotificationBanner/ExpandedView.js.html +220 -0
- package/coverage/lcov-report/components/NotificationBanner/index.html +58 -23
- package/coverage/lcov-report/components/{SideNav/Content/LevelTwoContent.jsx.html → NotificationBanner/index.js.html} +292 -272
- package/coverage/lcov-report/components/SanitizedContent/index.html +8 -3
- package/coverage/lcov-report/components/SanitizedContent/index.jsx.html +475 -50
- package/coverage/lcov-report/components/SessionDialogUI.jsx.html +248 -255
- package/coverage/lcov-report/components/SideNav/Chart/ScoreChart.jsx.html +272 -408
- package/coverage/lcov-report/components/SideNav/Chart/index.html +28 -38
- package/coverage/lcov-report/components/SideNav/Content/SelectRole/index.html +116 -0
- package/coverage/lcov-report/components/SideNav/Content/SelectRole/utils.js.html +505 -0
- package/coverage/lcov-report/components/SideNav/helpers.js.html +987 -46
- package/coverage/lcov-report/components/SideNav/index.html +24 -19
- package/coverage/lcov-report/components/Tooltip/Tooltip.jsx.html +70 -65
- package/coverage/lcov-report/components/Tooltip/index.html +8 -3
- package/coverage/lcov-report/components/Tooltip/index.js.html +8 -3
- package/coverage/lcov-report/components/Tooltip/position.js.html +57 -64
- package/coverage/lcov-report/components/hooks/index.html +116 -0
- package/coverage/lcov-report/components/hooks/useGetConfig.js.html +310 -0
- package/coverage/lcov-report/components/index.html +10 -5
- package/coverage/lcov-report/index.html +401 -21
- package/coverage/lcov-report/{Error/ErrorUI.jsx.html → lib/Chevron.jsx.html} +44 -42
- package/coverage/lcov-report/lib/SvgComponents.jsx.html +1840 -0
- package/coverage/lcov-report/lib/index.html +34 -14
- package/coverage/lcov-report/react/components/Accordion/index.html +26 -21
- package/coverage/lcov-report/react/components/Accordion/index.jsx.html +67 -86
- package/coverage/lcov-report/react/components/{FlashNotification → Button}/index.html +23 -33
- package/coverage/lcov-report/{components/SideNav/Links/NavLinkInline.jsx.html → react/components/Button/index.js.html} +119 -120
- package/coverage/lcov-report/react/components/{Tabs → Dropdown}/index.html +23 -33
- package/coverage/lcov-report/react/components/{InfoModal/index.jsx.html → Dropdown/index.js.html} +102 -154
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +26 -21
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +11 -6
- package/coverage/lcov-report/react/components/Error/error.js.html +8 -3
- package/coverage/lcov-report/react/components/Error/index.html +11 -6
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +196 -194
- package/coverage/lcov-report/react/components/Footer/LegacyFooterUI.jsx.html +9 -4
- package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +18 -13
- package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +18 -13
- package/coverage/lcov-report/react/components/Footer/footer.js.html +12 -37
- package/coverage/lcov-report/react/components/Footer/index.html +35 -45
- package/coverage/lcov-report/react/components/{InfoModal → GovBanner}/index.html +27 -22
- package/coverage/lcov-report/react/components/{Tabs/TabsUI.jsx.html → GovBanner/index.js.html} +146 -153
- package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +81 -154
- package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +15 -10
- package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +91 -50
- package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +105 -31
- package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +109 -26
- package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +510 -85
- package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +137 -24
- package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +134 -21
- package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +56 -24
- package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +172 -179
- package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +30 -19
- package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +331 -0
- package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +9 -4
- package/coverage/lcov-report/react/components/Header/header.js.html +15 -4
- package/coverage/lcov-report/react/components/Header/hooks.js.html +187 -26
- package/coverage/lcov-report/react/components/Header/index.html +157 -122
- package/coverage/lcov-report/react/components/{Spinner/index.js.html → Header/utag-helpers.js.html} +26 -21
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +12 -7
- package/coverage/lcov-report/react/components/{Tabs/tabs.js.html → Infotip/InfotipContent.jsx.html} +83 -48
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +12 -7
- package/coverage/lcov-report/react/components/Infotip/index.html +8 -3
- package/coverage/lcov-report/react/components/Infotip/index.js.html +8 -3
- package/coverage/lcov-report/react/components/{FlashNotification/FlashNotificationUI.jsx.html → Modal/LegacyModal.jsx.html} +89 -84
- package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +505 -0
- package/coverage/lcov-report/react/components/Modal/index.html +52 -17
- package/coverage/lcov-report/react/components/Modal/index.jsx.html +38 -201
- package/coverage/lcov-report/{components/SideNav/Links/CmsSwitchLink.jsx.html → react/components/NotificationBanner/CollapsedView.js.html} +52 -50
- package/coverage/lcov-report/{components/SideNav/Details/PracticeDetails.jsx.html → react/components/NotificationBanner/ExpandedView.js.html} +74 -57
- package/coverage/lcov-report/react/components/NotificationBanner/index.html +56 -21
- package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +615 -43
- package/coverage/lcov-report/react/components/SanitizedContent/index.html +8 -3
- package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +12 -7
- package/coverage/lcov-report/react/components/{Spinner → SessionDialog}/index.html +11 -6
- package/coverage/lcov-report/react/components/{FlashNotification/index.js.html → SessionDialog/sessionDialog.js.html} +35 -42
- package/coverage/lcov-report/react/components/SessionDialogUI.jsx.html +80 -51
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +38 -12
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +18 -13
- package/coverage/lcov-report/react/components/SideNav/Chart/ScoreChart.jsx.html +67 -56
- package/coverage/lcov-report/react/components/SideNav/Chart/index.html +26 -21
- package/coverage/lcov-report/react/components/SideNav/Chart/index.js.html +9 -4
- package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +189 -514
- package/coverage/lcov-report/react/components/SideNav/Content/LevelTwoContent.jsx.html +28 -17
- package/coverage/lcov-report/{components/SideNav/Details → react/components/SideNav/Content/SelectRole}/index.html +42 -52
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.js.html +316 -0
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/utils.js.html +505 -0
- package/coverage/lcov-report/react/components/SideNav/Content/index.html +32 -27
- package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +8 -3
- package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +10 -5
- package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +26 -9
- package/coverage/lcov-report/react/components/SideNav/Details/index.html +23 -18
- package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +8 -3
- package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +9 -4
- package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +8 -3
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +54 -64
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +281 -27
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +66 -46
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +8 -3
- package/coverage/lcov-report/react/components/SideNav/Links/index.html +44 -39
- package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +8 -3
- package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +165 -181
- package/coverage/lcov-report/react/components/SideNav/UI/index.html +28 -23
- package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +8 -3
- package/coverage/lcov-report/react/components/SideNav/helpers.js.html +967 -26
- package/coverage/lcov-report/react/components/SideNav/index.html +27 -22
- package/coverage/lcov-report/react/components/SideNav/index.js.html +8 -3
- package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +20 -15
- package/coverage/lcov-report/react/components/Tooltip/index.html +8 -3
- package/coverage/lcov-report/react/components/Tooltip/index.js.html +8 -3
- package/coverage/lcov-report/react/components/Tooltip/position.js.html +22 -17
- package/coverage/lcov-report/{components/SideNav/AnimationGroup → react/components/hooks}/index.html +29 -24
- package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +310 -0
- package/coverage/lcov-report/react/components/index.html +10 -5
- package/coverage/lcov-report/react/index.html +20 -15
- package/coverage/lcov-report/react/index.js.html +29 -9
- package/coverage/lcov-report/react/lib/Chevron.jsx.html +181 -0
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +221 -132
- package/coverage/lcov-report/react/lib/index.html +32 -27
- package/coverage/lcov-report/react/lib/svg-definitions.svg.html +8 -3
- package/coverage/lcov-report/react/session/index.html +32 -27
- package/coverage/lcov-report/react/session/index.js.html +8 -3
- package/coverage/lcov-report/react/session/logout.js.html +122 -18
- package/coverage/lcov-report/react/session/refresh.js.html +12 -7
- package/coverage/lcov-report/react/session/ttl.js.html +9 -4
- package/coverage/lcov-report/session/index.html +50 -45
- package/coverage/lcov-report/session/index.js.html +8 -3
- package/coverage/lcov-report/session/logout.js.html +144 -49
- package/coverage/lcov-report/session/refresh.js.html +41 -36
- package/coverage/lcov-report/session/ttl.js.html +34 -29
- package/coverage/lcov-report/sorter.js +26 -0
- package/coverage/lcov.info +3189 -46
- package/dist/browser.js +1 -1
- package/dist/browser.js.LICENSE.txt +1 -7
- package/dist/browser.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +1 -7
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.LICENSE.txt +16 -16
- package/dist/react/index.js.map +1 -1
- package/fonts/PublicSans-Black.ttf +0 -0
- package/fonts/PublicSans-BlackItalic.ttf +0 -0
- package/fonts/PublicSans-Bold.ttf +0 -0
- package/fonts/PublicSans-BoldItalic.ttf +0 -0
- package/fonts/PublicSans-ExtraBold.ttf +0 -0
- package/fonts/PublicSans-ExtraBoldItalic.ttf +0 -0
- package/fonts/PublicSans-ExtraLight.ttf +0 -0
- package/fonts/PublicSans-ExtraLightItalic.ttf +0 -0
- package/fonts/PublicSans-Italic.ttf +0 -0
- package/fonts/PublicSans-Light.ttf +0 -0
- package/fonts/PublicSans-LightItalic.ttf +0 -0
- package/fonts/PublicSans-Medium.ttf +0 -0
- package/fonts/PublicSans-MediumItalic.ttf +0 -0
- package/fonts/PublicSans-Regular.ttf +0 -0
- package/fonts/PublicSans-SemiBold.ttf +0 -0
- package/fonts/PublicSans-SemiBoldItalic.ttf +0 -0
- package/fonts/PublicSans-Thin.ttf +0 -0
- package/fonts/PublicSans-ThinItalic.ttf +0 -0
- package/images/icon-dot-gov.svg +1 -0
- package/images/icon-https.svg +1 -0
- package/images/icons/close-x.svg +6 -0
- package/images/icons/svg/arrow-down.svg +3 -0
- package/images/icons/svg/arrow-download.svg +1 -0
- package/images/icons/svg/arrow-right.svg +1 -0
- package/images/icons/svg/arrow-up.svg +3 -0
- package/images/icons/svg/block.svg +5 -0
- package/images/icons/svg/calendar.svg +1 -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/close.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.svg +1 -0
- package/images/icons/svg/dropdown-arrow.svg +1 -0
- package/images/icons/svg/equals.svg +13 -0
- package/images/icons/svg/exclamation.svg +11 -0
- package/images/icons/svg/external.svg +1 -0
- package/images/icons/svg/file-download.svg +1 -0
- package/images/icons/svg/file-upload.svg +1 -0
- package/images/icons/svg/info.svg +20 -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/plus.svg +12 -0
- package/images/icons/svg/preview.svg +17 -0
- package/images/icons/svg/print.svg +1 -0
- package/images/icons/svg/registration.svg +8 -0
- package/images/icons/svg/reporting.svg +17 -0
- package/images/icons/svg/save-disk.svg +5 -0
- package/images/icons/svg/search.svg +1 -0
- package/images/icons/svg/subtract.svg +15 -0
- package/images/icons/svg/targeted-review.svg +15 -0
- package/images/icons/svg/tooltip-question.svg +1 -0
- package/images/icons/svg/trash.svg +1 -0
- package/images/icons/svg/upload.svg +1 -0
- package/images/us_flag_small.png +0 -0
- package/index.js +5 -0
- package/jest.config.js +139 -132
- package/lib/Chevron.jsx +32 -0
- package/lib/SvgComponents.jsx +197 -49
- package/package.json +60 -78
- package/session/logout.js +35 -2
- package/styles/_global.scss +63 -62
- package/styles/_main.scss +6 -0
- package/styles/_qpp-style.scss +0 -3
- package/styles/components/_accordion.scss +249 -246
- package/styles/components/_autocomplete.scss +0 -3
- package/styles/components/_spinner.scss +0 -2
- package/styles/components/_tables.scss +77 -67
- package/styles/components/_text.scss +102 -102
- package/styles/components/_variables.scss +12 -12
- package/styles/qppds/base/_backgrounds.scss +1 -6
- package/styles/qppds/base/_fonts.scss +24 -0
- package/styles/qppds/base/_icon.scss +31 -0
- package/styles/qppds/base/_layout.scss +5 -0
- package/styles/qppds/base/_typography.scss +77 -43
- package/styles/qppds/base/index.scss +3 -6
- package/styles/qppds/components/_alert.scss +101 -0
- package/styles/qppds/components/_breadcrumbs.scss +42 -10
- package/styles/qppds/components/_button.scss +38 -12
- package/styles/qppds/components/_card.scss +175 -0
- package/styles/qppds/components/_checkbox.scss +199 -0
- package/styles/qppds/components/_circular-loader.scss +47 -0
- package/styles/qppds/components/_details.scss +90 -0
- package/styles/qppds/components/_dropdown-menu.scss +125 -0
- package/styles/qppds/components/_dropdown.scss +5 -0
- package/styles/qppds/components/_footer.scss +606 -0
- package/styles/qppds/components/_gov-banner.scss +344 -0
- package/styles/{components → qppds/components}/_header.scss +460 -24
- package/styles/qppds/components/_link.scss +32 -9
- package/styles/qppds/components/_modal.scss +61 -21
- package/styles/qppds/components/_page-header.scss +65 -2
- package/styles/qppds/components/_pagination.scss +227 -0
- package/styles/qppds/components/_process-list.scss +104 -0
- package/styles/qppds/components/_radio-button.scss +184 -0
- package/styles/qppds/components/_search.scss +118 -0
- package/styles/{components → qppds/components}/_sidebar.scss +2 -0
- package/styles/qppds/components/_step-indicator.scss +190 -0
- package/styles/qppds/components/_table.scss +157 -0
- package/styles/qppds/components/_tabs.scss +197 -0
- package/styles/qppds/components/_text-input.scss +60 -0
- package/styles/qppds/components/index.scss +18 -0
- package/styles/{components → qppds/components}/sidebar/_links.scss +48 -1
- package/styles/qppds/components/sidebar/_select-role-dropdown.scss +21 -0
- package/styles/{components → qppds/components}/sidebar/_sidebar-animation.scss +4 -0
- package/styles/qppds/components/sidebar/_sidebar.scss +146 -0
- package/styles/qppds/settings/_functions.scss +3 -1
- package/styles/qppds/settings/mixins/_borders.scss +6 -0
- package/styles/qppds/settings/mixins/_focus.scss +7 -1
- package/styles/qppds/settings/mixins/_icons.scss +39 -4
- package/styles/qppds/settings/mixins/_index.scss +3 -0
- package/styles/qppds/settings/mixins/_layout.scss +46 -7
- package/styles/qppds/settings/mixins/_table.scss +91 -0
- package/styles/qppds/settings/mixins/_type.scss +89 -0
- package/styles/qppds/settings/variables/_color.scss +47 -1
- package/styles/qppds/settings/variables/_index.scss +2 -1
- package/styles/qppds/settings/variables/_layout.scss +34 -9
- package/styles/qppds/settings/variables/_type.scss +41 -0
- package/styles/qppds/settings/variables/_z-index.scss +8 -0
- package/styles/qppds/utilities/_background-color.scss +4 -0
- package/styles/qppds/utilities/_color.scss +24 -0
- package/styles/qppds/utilities/{_display-visability.scss → _display-visibility.scss} +8 -0
- package/styles/qppds/utilities/_flexbox.scss +113 -0
- package/styles/qppds/utilities/_font-family.scss +4 -0
- package/styles/qppds/utilities/_gap.scss +38 -0
- package/styles/qppds/utilities/_height.scss +79 -0
- package/styles/qppds/utilities/_list-style.scss +18 -0
- package/styles/qppds/utilities/_position.scss +24 -0
- package/styles/qppds/utilities/_text-align.scss +40 -0
- package/styles/qppds/utilities/_text-transform.scss +7 -0
- package/styles/qppds/utilities/_truncate.scss +5 -5
- package/styles/qppds/utilities/_vertical-align.scss +72 -0
- package/styles/qppds/utilities/_width.scss +38 -1
- package/styles/qppds/utilities/index.scss +8 -2
- package/svgo.config.js +14 -0
- package/test/components/Accordion.test.js +4 -13
- package/test/components/ErrorUI.test.js +10 -46
- package/test/components/FooterUI.test.js +0 -30
- package/test/components/HeaderUI.test.js +32 -40
- package/test/components/Infotip.test.js +18 -12
- package/test/components/SessionDialogUI.test.js +55 -70
- package/test-setup.js +0 -8
- package/webpack.config.js +29 -39
- package/webpack.config.react.js +7 -18
- package/.storybook/.babelrc +0 -4
- package/.storybook/main.js +0 -88
- package/.storybook/preview-head.html +0 -9
- package/.storybook/preview.js +0 -5
- package/Session.vim +0 -83
- package/components/Accordion/Accordion.stories.js +0 -20
- package/components/Breadcrumb/Breadcrumb.stories.js +0 -58
- package/components/Button/Button.stories.js +0 -125
- package/components/Footer/Footer.stories.js +0 -20
- package/components/Footer/LegacyFooterUI.jsx +0 -194
- package/components/Header/Header.stories.js +0 -32
- package/components/InfoModal/InfoModal.stories.js +0 -98
- package/components/InfoModal/index.jsx +0 -104
- package/components/Infotip/Infotip.stories.js +0 -50
- package/components/Modal/Modal.stories.js +0 -159
- package/components/NotificationBanner/NotificationBanner.stories.js +0 -22
- package/components/NotificationBanner/NotificationBannerUI.jsx +0 -282
- package/components/SideNav/SideNav.stories.js +0 -397
- package/components/Spinner/index.js +0 -9
- package/components/Tabs/TabsUI.jsx +0 -118
- package/components/Tabs/tabs.js +0 -36
- 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/components/UnwrappedTabs/TabPanelUI.jsx +0 -16
- package/components/UnwrappedTabs/TabsUI.jsx +0 -82
- package/coverage/lcov-report/Accordion/index.html +0 -111
- package/coverage/lcov-report/Error/index.html +0 -126
- package/coverage/lcov-report/ScoreChart.jsx.html +0 -1025
- package/coverage/lcov-report/SideNav/Chart/ScoreChart.jsx.html +0 -1025
- package/coverage/lcov-report/components/Footer/LegacyFooterUI.jsx.html +0 -668
- package/coverage/lcov-report/components/NotificationBanner/NotificationBannerUI.jsx.html +0 -1010
- package/coverage/lcov-report/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +0 -131
- package/coverage/lcov-report/components/SideNav/Chart/index.js.html +0 -89
- package/coverage/lcov-report/components/SideNav/Content/LevelOneContent.jsx.html +0 -1007
- package/coverage/lcov-report/components/SideNav/Content/index.html +0 -141
- package/coverage/lcov-report/components/SideNav/Content/index.js.html +0 -92
- package/coverage/lcov-report/components/SideNav/Details/index.js.html +0 -92
- package/coverage/lcov-report/components/SideNav/Links/index.html +0 -201
- package/coverage/lcov-report/components/SideNav/UI/SideNavUI.jsx.html +0 -1298
- package/coverage/lcov-report/components/SideNav/UI/index.html +0 -126
- package/coverage/lcov-report/components/SideNav/UI/index.js.html +0 -89
- package/coverage/lcov-report/lib/svg-definitions.svg.html +0 -1319
- package/coverage/lcov-report/react/components/NotificationBanner/NotificationBannerUI.jsx.html +0 -926
- package/styles/components/_footer.scss +0 -593
- package/styles/components/_header_backup.scss +0 -574
- package/styles/components/sidebar/_sidebar.scss +0 -141
- package/test/components/Tooltip.test.js +0 -147
- package/test/components/__snapshots__/Accordion.test.js.snap +0 -11439
- package/test/components/__snapshots__/HeaderUI.test.js.snap +0 -3
- /package/styles/{components → qppds/components}/sidebar/_animations.scss +0 -0
- /package/styles/{components → qppds/components}/sidebar/_cms.scss +0 -0
- /package/styles/{components → qppds/components}/sidebar/_details.scss +0 -0
- /package/styles/{components → qppds/components}/sidebar/_sidebar-tooltip.scss +0 -0
- /package/styles/{components → qppds/components}/sidebar/project-specific/_wi.scss +0 -0
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import SideNav from './UI/SideNavUI';
|
|
3
|
-
import {
|
|
4
|
-
withKnobs,
|
|
5
|
-
boolean,
|
|
6
|
-
number,
|
|
7
|
-
select,
|
|
8
|
-
text,
|
|
9
|
-
} from '@storybook/addon-knobs';
|
|
10
|
-
import { action } from '@storybook/addon-actions';
|
|
11
|
-
import {
|
|
12
|
-
AccountHomeIcon,
|
|
13
|
-
StarIcon,
|
|
14
|
-
PaymentIcon,
|
|
15
|
-
ReportsIcon,
|
|
16
|
-
TargetIcon,
|
|
17
|
-
HardshipIcon,
|
|
18
|
-
} from '../../lib/SvgComponents';
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
title: 'SideNav',
|
|
22
|
-
component: SideNav,
|
|
23
|
-
decorators: [withKnobs],
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const PERFORMANCE_YEARS = ['2017', '2018', '2019', '2020'];
|
|
27
|
-
|
|
28
|
-
const CONFIG_GROUP_ID = 'config prop';
|
|
29
|
-
|
|
30
|
-
/*
|
|
31
|
-
type Config = {
|
|
32
|
-
openDrawersByDefault: Boolean,
|
|
33
|
-
linkActiveFunc: Function,
|
|
34
|
-
linkCallback: Function,
|
|
35
|
-
animationType: String,
|
|
36
|
-
useTooltips: Boolean,
|
|
37
|
-
navClassName: String,
|
|
38
|
-
chartActive: Boolean,
|
|
39
|
-
openDrawersByDefault: Boolean,
|
|
40
|
-
updateTime: String,
|
|
41
|
-
practiceId: String,
|
|
42
|
-
practiceName: String,
|
|
43
|
-
practiceTin: String,
|
|
44
|
-
apmEntityId: String,
|
|
45
|
-
isConnectedUsersPage: Boolean,
|
|
46
|
-
vgId: String,
|
|
47
|
-
roleAbbr: String,
|
|
48
|
-
performanceYear: String,
|
|
49
|
-
finalFeedbackOpen: Boolean,
|
|
50
|
-
isApmPaymentDetailsPage: Boolean,
|
|
51
|
-
cpcPlusId: String,
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
type Category = {
|
|
55
|
-
name: String,
|
|
56
|
-
link: String,
|
|
57
|
-
value: Number,
|
|
58
|
-
maxContribution: Number,
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
type ChartData = {
|
|
62
|
-
finalScore: Number,
|
|
63
|
-
categories: [ Category ],
|
|
64
|
-
}
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
|
-
const demoChartData = {
|
|
68
|
-
finalScore: 50,
|
|
69
|
-
categories: [
|
|
70
|
-
{
|
|
71
|
-
name: 'name1',
|
|
72
|
-
link: 'https://google.com',
|
|
73
|
-
value: 10,
|
|
74
|
-
maxContribution: 20,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: 'name2',
|
|
78
|
-
link: 'https://google.com',
|
|
79
|
-
value: 10,
|
|
80
|
-
maxContribution: 20,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name: 'name3',
|
|
84
|
-
link: 'https://google.com',
|
|
85
|
-
value: 10,
|
|
86
|
-
maxContribution: 20,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
name: 'name4',
|
|
90
|
-
link: 'https://google.com',
|
|
91
|
-
value: 20,
|
|
92
|
-
maxContribution: 40,
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export const Example = () => (
|
|
98
|
-
<div style={{ height: '840px' }}>
|
|
99
|
-
<SideNav
|
|
100
|
-
currentLevel={number('currentLevel', 1)}
|
|
101
|
-
isExpanded={boolean('isExpanded', true)}
|
|
102
|
-
onExpanded={action('onExpanded')}
|
|
103
|
-
onCollapsed={action('onCollapsed')}
|
|
104
|
-
chartData={demoChartData}
|
|
105
|
-
showDevPreDfpLink={boolean('showDevPreDfpLink', false)}
|
|
106
|
-
// svgIcons="" (default value is svg file import)
|
|
107
|
-
// items={demoItems}
|
|
108
|
-
isAltStyle={boolean('isAltStyle', false)}
|
|
109
|
-
showPhysicianCompareLink={boolean('showPhysicianCompareLink', false)}
|
|
110
|
-
showFacilityBasedPreviewLink={boolean(
|
|
111
|
-
'showFacilityBasedPreviewLink',
|
|
112
|
-
false
|
|
113
|
-
)}
|
|
114
|
-
showReportingLinks={boolean('showReportingLinks', false)}
|
|
115
|
-
showApmIncentivePaymentLink={boolean(
|
|
116
|
-
'showApmIncentivePaymentLink',
|
|
117
|
-
false
|
|
118
|
-
)}
|
|
119
|
-
performanceYear={select(
|
|
120
|
-
'performanceYear',
|
|
121
|
-
PERFORMANCE_YEARS,
|
|
122
|
-
PERFORMANCE_YEARS[0]
|
|
123
|
-
)}
|
|
124
|
-
// feedbackPerformanceYear={null} TODO: appears unused, remove?
|
|
125
|
-
fbpPerformanceYear={select(
|
|
126
|
-
'fbpPerformanceYear',
|
|
127
|
-
[null, ...PERFORMANCE_YEARS],
|
|
128
|
-
null
|
|
129
|
-
)}
|
|
130
|
-
showSelfNomination={boolean('showSelfNomination', false)}
|
|
131
|
-
showReportsPortal={boolean('showReportsPortal', false)}
|
|
132
|
-
showTargetedReviewLink={boolean('showTargetedReviewLink', false)}
|
|
133
|
-
config={{
|
|
134
|
-
linkActiveFunc: action('linkActiveFunc'),
|
|
135
|
-
linkCallback: action('linkCallback'),
|
|
136
|
-
animationType: text('animationType', '', CONFIG_GROUP_ID),
|
|
137
|
-
navClassName: text('navClassName', '', CONFIG_GROUP_ID),
|
|
138
|
-
updateTime: text('updateTime', '', CONFIG_GROUP_ID),
|
|
139
|
-
practiceId: text('practiceId', 'PRACTICE_ID', CONFIG_GROUP_ID),
|
|
140
|
-
practiceName: text('practiceName', 'PRACTICE_NAME', CONFIG_GROUP_ID),
|
|
141
|
-
practiceTin: text('practiceTin', 'PRACTICE_TIN', CONFIG_GROUP_ID),
|
|
142
|
-
apmEntityId: text('apmEntityId', 'APM_ENTITY_ID', CONFIG_GROUP_ID),
|
|
143
|
-
cpcPlusId: text('cpcPlusId', 'CPC_PLUS_ID', CONFIG_GROUP_ID),
|
|
144
|
-
vgId: text('vgId', 'VG ID', CONFIG_GROUP_ID),
|
|
145
|
-
roleAbbr: text('roleAbbr', 'ROLE-ABBR', CONFIG_GROUP_ID),
|
|
146
|
-
performanceYear: text(
|
|
147
|
-
'performanceYear',
|
|
148
|
-
PERFORMANCE_YEARS[0],
|
|
149
|
-
CONFIG_GROUP_ID
|
|
150
|
-
),
|
|
151
|
-
openDrawersByDefault: boolean(
|
|
152
|
-
'openDrawersByDefault',
|
|
153
|
-
false,
|
|
154
|
-
CONFIG_GROUP_ID
|
|
155
|
-
),
|
|
156
|
-
chartActive: boolean('chartActive', true, CONFIG_GROUP_ID),
|
|
157
|
-
isConnectedUsersPage: boolean(
|
|
158
|
-
'isConnectedUsersPage',
|
|
159
|
-
false,
|
|
160
|
-
CONFIG_GROUP_ID
|
|
161
|
-
),
|
|
162
|
-
finalFeedbackOpen: boolean('finalFeedbackOpen', false, CONFIG_GROUP_ID),
|
|
163
|
-
isApmPaymentDetailsPage: boolean(
|
|
164
|
-
'isApmPaymentDetailsPage',
|
|
165
|
-
false,
|
|
166
|
-
CONFIG_GROUP_ID
|
|
167
|
-
),
|
|
168
|
-
useTooltips: boolean('useTooltips', false, CONFIG_GROUP_ID),
|
|
169
|
-
}}
|
|
170
|
-
/>
|
|
171
|
-
</div>
|
|
172
|
-
);
|
|
173
|
-
|
|
174
|
-
/*
|
|
175
|
-
type Item = {
|
|
176
|
-
type: String,
|
|
177
|
-
url: String,
|
|
178
|
-
label: String,
|
|
179
|
-
className: String,
|
|
180
|
-
icon: Element,
|
|
181
|
-
practiceName: String,
|
|
182
|
-
practiceTin: String,
|
|
183
|
-
apmEntityId: String,
|
|
184
|
-
vgId: String,
|
|
185
|
-
cpcPlusId: String,
|
|
186
|
-
individualName: String,
|
|
187
|
-
individualNpi: String,
|
|
188
|
-
isAlwaysOpen: Boolean,
|
|
189
|
-
content: String,
|
|
190
|
-
customClassName: String,
|
|
191
|
-
chartData: ChartData,
|
|
192
|
-
disabled: Boolean,
|
|
193
|
-
items: [ Item ]
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
type Items = [ Item ]
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
|
-
const demoItems = [
|
|
200
|
-
{
|
|
201
|
-
type: 'container',
|
|
202
|
-
className: 'foobar',
|
|
203
|
-
items: [
|
|
204
|
-
{
|
|
205
|
-
type: 'linkBack',
|
|
206
|
-
url: 'https://qpp.cms.gov',
|
|
207
|
-
label: 'link back',
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
type: 'linkHome',
|
|
211
|
-
icon: AccountHomeIcon,
|
|
212
|
-
url: 'https://qpp.cms.gov',
|
|
213
|
-
label: 'link home',
|
|
214
|
-
},
|
|
215
|
-
],
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
type: 'divider',
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
type: 'practiceDetails',
|
|
222
|
-
practiceName: 'Demo Practice',
|
|
223
|
-
practiceTin: '123456789',
|
|
224
|
-
//apmEntityId: '111111111',
|
|
225
|
-
//vgId: '987654321',
|
|
226
|
-
//cpcPlusId: '999999999',
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
type: 'individualDetails',
|
|
230
|
-
individualName: 'Demo Individual',
|
|
231
|
-
individualNpi: '333333333',
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
type: 'divider',
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
type: 'linkDrawer',
|
|
238
|
-
icon: StarIcon,
|
|
239
|
-
isAlwaysOpen: false,
|
|
240
|
-
label: 'Link Drawer',
|
|
241
|
-
// disabled: false,
|
|
242
|
-
items: [
|
|
243
|
-
{
|
|
244
|
-
type: 'link',
|
|
245
|
-
className: 'foo',
|
|
246
|
-
label: 'Link 1',
|
|
247
|
-
icon: PaymentIcon,
|
|
248
|
-
url: 'https://qpp.cms.gov',
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
type: 'link',
|
|
252
|
-
className: 'bar',
|
|
253
|
-
label: 'Link 2',
|
|
254
|
-
icon: ReportsIcon,
|
|
255
|
-
url: 'https://qpp.cms.gov',
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
type: 'link',
|
|
259
|
-
className: 'baz',
|
|
260
|
-
label: 'Link 3',
|
|
261
|
-
url: 'https://qpp.cms.gov',
|
|
262
|
-
},
|
|
263
|
-
],
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
type: 'divider',
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
type: 'custom',
|
|
270
|
-
content: `
|
|
271
|
-
<div style="margin-left: 20px;">
|
|
272
|
-
<h4 style="color: white;">Custom Content</h4>
|
|
273
|
-
<ul>
|
|
274
|
-
<li>foo</li>
|
|
275
|
-
<li>bar</li>
|
|
276
|
-
</ul>
|
|
277
|
-
</div>
|
|
278
|
-
`,
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
type: 'divider',
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
type: 'chart',
|
|
285
|
-
chartData: demoChartData,
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
type: 'divider',
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
type: 'switchLink',
|
|
292
|
-
label: 'Switch Link',
|
|
293
|
-
url: 'https://qpp.cms.gov',
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
type: 'divider',
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
type: 'link',
|
|
300
|
-
label: 'Default Link',
|
|
301
|
-
icon: HardshipIcon,
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
type: 'link',
|
|
305
|
-
label: 'Default Disabled Link',
|
|
306
|
-
icon: TargetIcon,
|
|
307
|
-
disabled: true,
|
|
308
|
-
},
|
|
309
|
-
];
|
|
310
|
-
|
|
311
|
-
export const DynamicItems = () => (
|
|
312
|
-
<div style={{ height: '840px' }}>
|
|
313
|
-
<SideNav
|
|
314
|
-
isExpanded={boolean('isExpanded', true)}
|
|
315
|
-
onExpanded={action('onExpanded')}
|
|
316
|
-
onCollapsed={action('onCollapsed')}
|
|
317
|
-
items={demoItems}
|
|
318
|
-
/>
|
|
319
|
-
</div>
|
|
320
|
-
);
|
|
321
|
-
|
|
322
|
-
export const LevelTwoUsage = () => (
|
|
323
|
-
<div style={{ height: '840px' }}>
|
|
324
|
-
<SideNav
|
|
325
|
-
currentLevel={number('currentLevel', 2)}
|
|
326
|
-
isExpanded={boolean('isExpanded', true)}
|
|
327
|
-
onExpanded={action('onExpanded')}
|
|
328
|
-
onCollapsed={action('onCollapsed')}
|
|
329
|
-
chartData={demoChartData}
|
|
330
|
-
showDevPreDfpLink={boolean('showDevPreDfpLink', false)}
|
|
331
|
-
// svgIcons="" (default value is svg file import)
|
|
332
|
-
// items={demoItems}
|
|
333
|
-
isAltStyle={boolean('isAltStyle', false)}
|
|
334
|
-
showPhysicianCompareLink={boolean('showPhysicianCompareLink', false)}
|
|
335
|
-
showFacilityBasedPreviewLink={boolean(
|
|
336
|
-
'showFacilityBasedPreviewLink',
|
|
337
|
-
false
|
|
338
|
-
)}
|
|
339
|
-
showReportingLinks={boolean('showReportingLinks', false)}
|
|
340
|
-
showApmIncentivePaymentLink={boolean(
|
|
341
|
-
'showApmIncentivePaymentLink',
|
|
342
|
-
false
|
|
343
|
-
)}
|
|
344
|
-
performanceYear={select(
|
|
345
|
-
'performanceYear',
|
|
346
|
-
PERFORMANCE_YEARS,
|
|
347
|
-
PERFORMANCE_YEARS[0]
|
|
348
|
-
)}
|
|
349
|
-
// feedbackPerformanceYear={null} TODO: appears unused, remove?
|
|
350
|
-
fbpPerformanceYear={select(
|
|
351
|
-
'fbpPerformanceYear',
|
|
352
|
-
[null, ...PERFORMANCE_YEARS],
|
|
353
|
-
null
|
|
354
|
-
)}
|
|
355
|
-
showSelfNomination={boolean('showSelfNomination', false)}
|
|
356
|
-
showReportsPortal={boolean('showReportsPortal', false)}
|
|
357
|
-
showTargetedReviewLink={boolean('showTargetedReviewLink', false)}
|
|
358
|
-
config={{
|
|
359
|
-
linkActiveFunc: action('linkActiveFunc'),
|
|
360
|
-
linkCallback: action('linkCallback'),
|
|
361
|
-
animationType: text('animationType', '', CONFIG_GROUP_ID),
|
|
362
|
-
navClassName: text('navClassName', '', CONFIG_GROUP_ID),
|
|
363
|
-
updateTime: text('updateTime', '', CONFIG_GROUP_ID),
|
|
364
|
-
practiceId: text('practiceId', 'PRACTICE_ID', CONFIG_GROUP_ID),
|
|
365
|
-
practiceName: text('practiceName', 'PRACTICE_NAME', CONFIG_GROUP_ID),
|
|
366
|
-
practiceTin: text('practiceTin', 'PRACTICE_TIN', CONFIG_GROUP_ID),
|
|
367
|
-
apmEntityId: text('apmEntityId', 'APM_ENTITY_ID', CONFIG_GROUP_ID),
|
|
368
|
-
cpcPlusId: text('cpcPlusId', 'CPC_PLUS_ID', CONFIG_GROUP_ID),
|
|
369
|
-
vgId: text('vgId', 'VG ID', CONFIG_GROUP_ID),
|
|
370
|
-
roleAbbr: text('roleAbbr', 'ROLE-ABBR', CONFIG_GROUP_ID),
|
|
371
|
-
performanceYear: text(
|
|
372
|
-
'performanceYear',
|
|
373
|
-
PERFORMANCE_YEARS[0],
|
|
374
|
-
CONFIG_GROUP_ID
|
|
375
|
-
),
|
|
376
|
-
openDrawersByDefault: boolean(
|
|
377
|
-
'openDrawersByDefault',
|
|
378
|
-
false,
|
|
379
|
-
CONFIG_GROUP_ID
|
|
380
|
-
),
|
|
381
|
-
chartActive: boolean('chartActive', true, CONFIG_GROUP_ID),
|
|
382
|
-
isConnectedUsersPage: boolean(
|
|
383
|
-
'isConnectedUsersPage',
|
|
384
|
-
false,
|
|
385
|
-
CONFIG_GROUP_ID
|
|
386
|
-
),
|
|
387
|
-
finalFeedbackOpen: boolean('finalFeedbackOpen', false, CONFIG_GROUP_ID),
|
|
388
|
-
isApmPaymentDetailsPage: boolean(
|
|
389
|
-
'isApmPaymentDetailsPage',
|
|
390
|
-
false,
|
|
391
|
-
CONFIG_GROUP_ID
|
|
392
|
-
),
|
|
393
|
-
useTooltips: boolean('useTooltips', false, CONFIG_GROUP_ID),
|
|
394
|
-
}}
|
|
395
|
-
/>
|
|
396
|
-
</div>
|
|
397
|
-
)
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from 'react-dom';
|
|
3
|
-
import DSSpinner from '@cmsgov/design-system-core/dist/components/Spinner/Spinner';
|
|
4
|
-
|
|
5
|
-
export default class Spinner {
|
|
6
|
-
constructor(options) {
|
|
7
|
-
render(<DSSpinner />, options.rootElement);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import Tabs from '@cmsgov/design-system-core/dist/components/Tabs/Tabs';
|
|
4
|
-
import TabPanel from '@cmsgov/design-system-core/dist/components/Tabs/TabPanel';
|
|
5
|
-
import SanitizedContent from '../SanitizedContent';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Renders Tabs component using [react-tabs]{@link https://github.com/reactjs/react-tabs}.
|
|
9
|
-
* NOTE: Since this component renders HTML content that may be unsafe, anything
|
|
10
|
-
* passed as tab contents will be sanitized via the xss npm package.
|
|
11
|
-
*/
|
|
12
|
-
export default class TabsUI extends Component {
|
|
13
|
-
/**
|
|
14
|
-
* @param {Object} props - An object containing content and config data
|
|
15
|
-
* @param {HTMLElement} props.rootElement - Elem inside which to render
|
|
16
|
-
* @param {Object} props.config - Config info for react-tabs elements
|
|
17
|
-
* @param {Object} props.config.tabs - Config for react-tabs <Tabs>
|
|
18
|
-
* @param {Object} props.config.tabList - Config for react-tabs <TabList>
|
|
19
|
-
* @param {Object} props.config.tab - Config for react-tabs <Tab>
|
|
20
|
-
* @param {Object} props.config.tabPanel - Config react-tabs <TabPanel>
|
|
21
|
-
* @param {Object[]} props.tabs - An array of tab content objects
|
|
22
|
-
* @param {String} props.tabs[].title - The text displayed on the tab
|
|
23
|
-
* @param {String} props.tabs[].content - The HTML string for tab contents
|
|
24
|
-
* @param {Boolean} props.tabs[].disabled - Whether the tab is disabled
|
|
25
|
-
* @param {Boolean} props.fullWidthBorder - Whether to render with a full-
|
|
26
|
-
* width border
|
|
27
|
-
*/
|
|
28
|
-
constructor(props) {
|
|
29
|
-
super(props);
|
|
30
|
-
|
|
31
|
-
this._updateStyle = this.updateStyle.bind(this);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Adjusts the display of the tabs so that the border line under the tabs
|
|
36
|
-
* extends the full width of the page.
|
|
37
|
-
*/
|
|
38
|
-
updateStyle() {
|
|
39
|
-
const rule = this.element;
|
|
40
|
-
const tabs = this.element.parentNode;
|
|
41
|
-
const bounds = tabs.getBoundingClientRect();
|
|
42
|
-
|
|
43
|
-
tabs.classList.add('react-tabs__full-width');
|
|
44
|
-
rule.style.left = `-${bounds.left}px`;
|
|
45
|
-
rule.style.right = `-${bounds.left}px`;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* If the component should display with a full-width border, add it and
|
|
50
|
-
* listen for window resizing so that the border can update along with it.
|
|
51
|
-
*/
|
|
52
|
-
componentDidMount() {
|
|
53
|
-
if (this.props.fullWidthBorder) {
|
|
54
|
-
this._updateStyle();
|
|
55
|
-
window.addEventListener('resize', this._updateStyle);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* If the component was displayed with a full width border, remove the
|
|
61
|
-
* listener for window resizing when the component is destroyed.
|
|
62
|
-
*/
|
|
63
|
-
componentWillUnmount() {
|
|
64
|
-
if (this.props.fullWidthBorder) {
|
|
65
|
-
window.removeEventListener('resize', this._updateStyle);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Render the tab panels
|
|
71
|
-
*
|
|
72
|
-
* @return {String} HTML content
|
|
73
|
-
*/
|
|
74
|
-
renderTabPanels() {
|
|
75
|
-
return this.props.tabs.map((t) => {
|
|
76
|
-
return (
|
|
77
|
-
<TabPanel
|
|
78
|
-
key={t.title}
|
|
79
|
-
id={t.title}
|
|
80
|
-
tab={t.title}
|
|
81
|
-
disabled={t.disabled}
|
|
82
|
-
{...t.tabPanel}
|
|
83
|
-
>
|
|
84
|
-
<SanitizedContent html={t.content} />
|
|
85
|
-
</TabPanel>
|
|
86
|
-
);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Render the component
|
|
92
|
-
* @return {String} HTML content
|
|
93
|
-
*/
|
|
94
|
-
render() {
|
|
95
|
-
return (
|
|
96
|
-
<div className="react-tabs">
|
|
97
|
-
<Tabs {...this.props.config.tabs}>
|
|
98
|
-
<div
|
|
99
|
-
ref={(elem) => (this.element = elem)}
|
|
100
|
-
className="react-tabs__tab-rule"
|
|
101
|
-
/>
|
|
102
|
-
{this.renderTabPanels()}
|
|
103
|
-
</Tabs>
|
|
104
|
-
</div>
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
TabsUI.propTypes = {
|
|
110
|
-
config: PropTypes.object,
|
|
111
|
-
fullWidthBorder: PropTypes.bool,
|
|
112
|
-
tabs: PropTypes.array,
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
TabsUI.defaultProps = {
|
|
116
|
-
config: {},
|
|
117
|
-
fullWidthBorder: false,
|
|
118
|
-
};
|
package/components/Tabs/tabs.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from 'react-dom';
|
|
3
|
-
import TabsUI from './TabsUI';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Renders Tabs component using [react-tabs]{@link https://github.com/reactjs/react-tabs}.
|
|
7
|
-
* NOTE: Since this component renders HTML content that may be unsafe, anything
|
|
8
|
-
* passed as tab contents will be sanitized via the xss npm package.
|
|
9
|
-
*/
|
|
10
|
-
export default class Tabs {
|
|
11
|
-
/**
|
|
12
|
-
* @param {Object} options - An object containing content and config data
|
|
13
|
-
* @param {HTMLElement} options.rootElement - Elem inside which to render
|
|
14
|
-
* @param {Object} options.config - Config info for react-tabs elements
|
|
15
|
-
* @param {Object} options.config.tabs - Config for react-tabs <Tabs>
|
|
16
|
-
* @param {Object} options.config.tabList - Config for react-tabs <TabList>
|
|
17
|
-
* @param {Object} options.config.tab - Config for react-tabs <Tab>
|
|
18
|
-
* @param {Object} options.config.tabPanel - Config react-tabs <TabPanel>
|
|
19
|
-
* @param {Object[]} options.tabs - An array of tab content objects
|
|
20
|
-
* @param {String} options.tabs[].title - The text displayed on the tab
|
|
21
|
-
* @param {String} options.tabs[].content - The HTML string for tab contents
|
|
22
|
-
* @param {Boolean} options.tabs[].disabled - Whether the tab is disabled
|
|
23
|
-
* @param {Boolean} options.fullWidthBorder - Whether to render with a full-
|
|
24
|
-
* width border
|
|
25
|
-
*/
|
|
26
|
-
constructor(options) {
|
|
27
|
-
render(
|
|
28
|
-
<TabsUI
|
|
29
|
-
config={options.config}
|
|
30
|
-
tabs={options.tabs}
|
|
31
|
-
fullWidthBorder={options.fullWidthBorder}
|
|
32
|
-
/>,
|
|
33
|
-
options.rootElement
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React, { cloneElement, useLayoutEffect, useRef } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import positionTip, { positionTriangle } from './position';
|
|
4
|
-
import { useTooltip, TooltipPopup } from '@reach/tooltip';
|
|
5
|
-
import Portal from '@reach/portal';
|
|
6
|
-
|
|
7
|
-
// TODO: investigate ways to allow more styling via css? the triangle
|
|
8
|
-
// positioning effect issue may need to be resolved to allow for this.
|
|
9
|
-
const TEXT_COLOR = '#FFF';
|
|
10
|
-
const BACKGROUND_COLOR = '#333';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Generic styled tooltip component.
|
|
14
|
-
* Corresponding styles: /styles/components/_tooltip.scss
|
|
15
|
-
*
|
|
16
|
-
* Extends implementation from @reach/tooltip:
|
|
17
|
-
* https://reacttraining.com/reach-ui/tooltip
|
|
18
|
-
*/
|
|
19
|
-
const Tooltip = ({ children, label, ariaLabel, DEBUG_STYLE }) => {
|
|
20
|
-
const [trigger, tooltip] = useTooltip({ DEBUG_STYLE });
|
|
21
|
-
const { isVisible, triggerRect } = tooltip;
|
|
22
|
-
const tooltipPopupRef = useRef();
|
|
23
|
-
const triangleRef = useRef();
|
|
24
|
-
|
|
25
|
-
useLayoutEffect(() => {
|
|
26
|
-
// For some reason, the forwardRef for the tooltipPopup points to an undefined
|
|
27
|
-
// dom element when we first render the portal containing the triangle. Using
|
|
28
|
-
// an effect here will ensure that the ref is available when applying styles.
|
|
29
|
-
// TODO: investigate and make issue for @reach-ui/tooltip?
|
|
30
|
-
if (isVisible && tooltipPopupRef.current && triggerRect) {
|
|
31
|
-
const tooltipRect = tooltipPopupRef.current.getBoundingClientRect();
|
|
32
|
-
const positionCssText = positionTriangle(triggerRect, tooltipRect);
|
|
33
|
-
const cssText = `
|
|
34
|
-
position: absolute;
|
|
35
|
-
width: 0;
|
|
36
|
-
height: 0;
|
|
37
|
-
${positionCssText}
|
|
38
|
-
border-top-color: ${BACKGROUND_COLOR};
|
|
39
|
-
border-bottom-color: ${BACKGROUND_COLOR};
|
|
40
|
-
z-index: 1;
|
|
41
|
-
`;
|
|
42
|
-
triangleRef.current.style.cssText = cssText;
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<>
|
|
48
|
-
{cloneElement(children, trigger)}
|
|
49
|
-
<TooltipPopup
|
|
50
|
-
{...tooltip}
|
|
51
|
-
label={label}
|
|
52
|
-
ariaLabel={ariaLabel}
|
|
53
|
-
style={{
|
|
54
|
-
background: BACKGROUND_COLOR,
|
|
55
|
-
color: TEXT_COLOR,
|
|
56
|
-
}}
|
|
57
|
-
ref={tooltipPopupRef}
|
|
58
|
-
position={positionTip}
|
|
59
|
-
/>
|
|
60
|
-
{isVisible && (
|
|
61
|
-
<Portal>
|
|
62
|
-
<div
|
|
63
|
-
ref={triangleRef}
|
|
64
|
-
style={{
|
|
65
|
-
position: 'absolute',
|
|
66
|
-
width: 0,
|
|
67
|
-
height: 0,
|
|
68
|
-
}}
|
|
69
|
-
/>
|
|
70
|
-
</Portal>
|
|
71
|
-
)}
|
|
72
|
-
</>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
Tooltip.propTypes = {
|
|
77
|
-
children: PropTypes.node.isRequired,
|
|
78
|
-
label: PropTypes.node.isRequired,
|
|
79
|
-
ariaLabel: PropTypes.string,
|
|
80
|
-
DEBUG_STYLE: PropTypes.bool,
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
Tooltip.defaultProps = {
|
|
84
|
-
ariaLabel: undefined,
|
|
85
|
-
DEBUG_STYLE: undefined,
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
export default Tooltip;
|