qpp-style 2.0.2 → 2.0.4-sm.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 +10 -0
- package/.editorconfig +22 -0
- package/.eslintignore +5 -0
- package/.eslintrc.js +31 -0
- package/.husky/pre-commit +5 -0
- package/README.md +50 -55
- package/components/Accordion/index.jsx +97 -0
- package/components/Alert/index.js +53 -0
- package/components/Breadcrumb/Breadcrumb.md +28 -0
- package/components/Breadcrumb/index.js +83 -0
- package/components/Button/index.js +90 -0
- 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 +88 -0
- package/components/Error/ErrorUI.jsx +31 -0
- package/components/Error/error.js +26 -0
- package/components/FlashNotification/FlashNotificationUI.jsx +91 -0
- package/components/FlashNotification/index.js +30 -0
- package/components/Footer/FooterUI.jsx +211 -0
- package/components/Footer/SocialLinks.jsx +60 -0
- package/components/Footer/Subscribe.jsx +34 -0
- package/components/Footer/footer.js +20 -0
- package/components/GovBanner/index.js +117 -0
- package/components/Header/Header.md +111 -0
- package/components/Header/HeaderAccountMenu.jsx +94 -0
- package/components/Header/HeaderCancel.jsx +16 -0
- package/components/Header/HeaderContainer.jsx +74 -0
- package/components/Header/HeaderLogo.jsx +42 -0
- package/components/Header/HeaderMenuButton.js +50 -0
- package/components/Header/HeaderMenuItem.jsx +239 -0
- package/components/Header/HeaderMenuLink.js +56 -0
- package/components/Header/HeaderMenuSignOutButton.js +62 -0
- package/components/Header/HeaderMobileButton.js +37 -0
- package/components/Header/HeaderUI.jsx +167 -0
- package/components/Header/HelpIcon.jsx +32 -0
- package/components/Header/ImpersonatorBanner.jsx +81 -0
- package/components/Header/NavigationButtonIcon.jsx +27 -0
- package/components/Header/default-content.json +280 -0
- package/components/Header/header.js +40 -0
- package/components/Header/hooks.js +66 -0
- package/components/Header/utag-helpers.js +9 -0
- package/components/Infotip/Infotip.jsx +71 -0
- package/components/Infotip/InfotipContent.jsx +46 -0
- package/components/Infotip/InfotipIcon.jsx +41 -0
- package/components/Infotip/index.js +3 -0
- package/components/Link/index.js +61 -0
- package/components/Modal/LegacyModal.jsx +72 -0
- package/components/Modal/Modal.jsx +140 -0
- package/components/Modal/index.jsx +22 -0
- package/components/NotificationBanner/CollapsedView.js +39 -0
- package/components/NotificationBanner/ExpandedView.js +45 -0
- package/components/NotificationBanner/index.js +221 -0
- package/components/SanitizedContent/index.jsx +211 -0
- package/components/Search/index.js +98 -0
- package/components/SessionDialog/sessionDialog.js +26 -0
- package/components/SessionDialogUI.jsx +261 -0
- package/components/SideNav/AnimationGroup/AnimationGroup.jsx +27 -0
- package/components/SideNav/Chart/ScoreChart.jsx +268 -0
- package/components/SideNav/Chart/__tests__/ScoreChart.test.js +22 -0
- package/components/SideNav/Chart/__tests__/__snapshots__/ScoreChart.test.js.snap +173 -0
- package/components/SideNav/Chart/index.js +3 -0
- package/components/SideNav/Content/LevelOneContent.jsx +49 -0
- package/components/SideNav/Content/SelectRole/index.js +78 -0
- package/components/SideNav/Content/SelectRole/utils.js +140 -0
- package/components/SideNav/Content/index.js +3 -0
- package/components/SideNav/Details/IndividualDetails.jsx +18 -0
- package/components/SideNav/Details/PracticeDetails.jsx +45 -0
- package/components/SideNav/Details/index.js +4 -0
- package/components/SideNav/Links/CmsSwitchLink.jsx +41 -0
- package/components/SideNav/Links/NavItemInline.jsx +54 -0
- package/components/SideNav/Links/NavLinkContainer.jsx +38 -0
- package/components/SideNav/Links/NavLinkDrawer.jsx +295 -0
- package/components/SideNav/Links/NavLinkInline.jsx +110 -0
- package/components/SideNav/Links/NavLinkToggle.jsx +34 -0
- package/components/SideNav/Links/index.js +13 -0
- package/components/SideNav/SideNav.md +50 -0
- package/components/SideNav/UI/SideNavUI.jsx +305 -0
- package/components/SideNav/UI/default-content.json +117 -0
- package/components/SideNav/UI/index.js +3 -0
- package/components/SideNav/UI/utils.js +0 -0
- package/components/SideNav/helpers.js +390 -0
- package/components/SideNav/index.js +51 -0
- 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 +126 -0
- package/coverage/clover.xml +1426 -0
- package/coverage/coverage-final.json +70 -0
- package/coverage/lcov-report/Tooltip.jsx.html +232 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/components/Accordion/index.html +116 -0
- package/coverage/lcov-report/components/Accordion/index.jsx.html +364 -0
- package/coverage/lcov-report/components/Button/index.html +116 -0
- package/coverage/lcov-report/components/Button/index.js.html +355 -0
- package/coverage/lcov-report/components/Error/Collapsible.jsx.html +349 -0
- package/coverage/lcov-report/components/Error/ErrorUI.jsx.html +178 -0
- package/coverage/lcov-report/components/Error/index.html +131 -0
- package/coverage/lcov-report/components/Footer/FooterUI.jsx.html +706 -0
- package/coverage/lcov-report/components/Footer/SocialLinks.jsx.html +265 -0
- package/coverage/lcov-report/components/Footer/Subscribe.jsx.html +187 -0
- package/coverage/lcov-report/components/Footer/index.html +146 -0
- package/coverage/lcov-report/components/GovBanner/index.html +116 -0
- package/coverage/lcov-report/components/GovBanner/index.js.html +436 -0
- package/coverage/lcov-report/components/Header/HeaderAccountMenu.jsx.html +367 -0
- package/coverage/lcov-report/components/Header/HeaderCancel.jsx.html +133 -0
- package/coverage/lcov-report/components/Header/HeaderContainer.jsx.html +307 -0
- package/coverage/lcov-report/components/Header/HeaderLogo.jsx.html +211 -0
- package/coverage/lcov-report/components/Header/HeaderMenuButton.js.html +235 -0
- package/coverage/lcov-report/components/Header/HeaderMenuItem.jsx.html +802 -0
- 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/Header/HeaderMobileButton.js.html +196 -0
- package/coverage/lcov-report/components/Header/HeaderUI.jsx.html +586 -0
- package/coverage/lcov-report/components/Header/HelpIcon.jsx.html +181 -0
- package/coverage/lcov-report/components/Header/ImpersonatorBanner.jsx.html +328 -0
- package/coverage/lcov-report/components/Header/NavigationButtonIcon.jsx.html +166 -0
- package/coverage/lcov-report/components/Header/hooks.js.html +283 -0
- package/coverage/lcov-report/components/Header/index.html +326 -0
- package/coverage/lcov-report/components/Header/utag-helpers.js.html +112 -0
- package/coverage/lcov-report/components/Infotip/Infotip.jsx.html +310 -0
- package/coverage/lcov-report/components/Infotip/InfotipIcon.jsx.html +208 -0
- package/coverage/lcov-report/components/Infotip/index.html +146 -0
- package/coverage/lcov-report/components/Infotip/index.js.html +94 -0
- package/coverage/lcov-report/components/Modal/LegacyModal.jsx.html +301 -0
- package/coverage/lcov-report/components/Modal/Modal.jsx.html +505 -0
- package/coverage/lcov-report/components/Modal/index.html +146 -0
- package/coverage/lcov-report/components/Modal/index.jsx.html +151 -0
- 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 +146 -0
- package/coverage/lcov-report/components/NotificationBanner/index.js.html +748 -0
- package/coverage/lcov-report/components/SanitizedContent/index.html +116 -0
- package/coverage/lcov-report/components/SanitizedContent/index.jsx.html +685 -0
- package/coverage/lcov-report/components/SessionDialogUI.jsx.html +868 -0
- 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 +1138 -0
- package/coverage/lcov-report/components/SideNav/index.html +116 -0
- package/coverage/lcov-report/components/Tooltip/Tooltip.jsx.html +349 -0
- package/coverage/lcov-report/components/Tooltip/index.html +146 -0
- package/coverage/lcov-report/components/Tooltip/index.js.html +94 -0
- package/coverage/lcov-report/components/Tooltip/position.js.html +289 -0
- 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 +116 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +476 -0
- package/coverage/lcov-report/index.js.html +94 -0
- package/coverage/lcov-report/lib/Chevron.jsx.html +181 -0
- package/coverage/lcov-report/lib/SvgComponents.jsx.html +2200 -0
- package/coverage/lcov-report/lib/index.html +131 -0
- package/coverage/lcov-report/position.js.html +289 -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 +355 -0
- package/coverage/lcov-report/react/components/Dropdown/index.html +116 -0
- package/coverage/lcov-report/react/components/Dropdown/index.js.html +340 -0
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +349 -0
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +178 -0
- package/coverage/lcov-report/react/components/Error/error.js.html +163 -0
- package/coverage/lcov-report/react/components/Error/index.html +146 -0
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +718 -0
- package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +265 -0
- package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +187 -0
- package/coverage/lcov-report/react/components/Footer/footer.js.html +145 -0
- package/coverage/lcov-report/react/components/Footer/index.html +161 -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 +367 -0
- package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +133 -0
- package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +307 -0
- package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +211 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +235 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +802 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +253 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +271 -0
- package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +196 -0
- package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +586 -0
- package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +181 -0
- package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +328 -0
- package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +166 -0
- package/coverage/lcov-report/react/components/Header/header.js.html +205 -0
- package/coverage/lcov-report/react/components/Header/hooks.js.html +283 -0
- package/coverage/lcov-report/react/components/Header/index.html +341 -0
- package/coverage/lcov-report/react/components/Header/utag-helpers.js.html +112 -0
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +298 -0
- package/coverage/lcov-report/react/components/Infotip/InfotipContent.jsx.html +223 -0
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +208 -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 +301 -0
- package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +505 -0
- package/coverage/lcov-report/react/components/Modal/index.html +146 -0
- package/coverage/lcov-report/react/components/Modal/index.jsx.html +151 -0
- package/coverage/lcov-report/react/components/NotificationBanner/CollapsedView.js.html +202 -0
- package/coverage/lcov-report/react/components/NotificationBanner/ExpandedView.js.html +220 -0
- package/coverage/lcov-report/react/components/NotificationBanner/index.html +146 -0
- package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +748 -0
- package/coverage/lcov-report/react/components/SanitizedContent/index.html +116 -0
- package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +718 -0
- package/coverage/lcov-report/react/components/SessionDialog/index.html +116 -0
- package/coverage/lcov-report/react/components/SessionDialog/sessionDialog.js.html +163 -0
- package/coverage/lcov-report/react/components/SessionDialogUI.jsx.html +868 -0
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +166 -0
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +116 -0
- package/coverage/lcov-report/react/components/SideNav/Chart/ScoreChart.jsx.html +889 -0
- package/coverage/lcov-report/react/components/SideNav/Chart/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/Chart/index.js.html +94 -0
- package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +232 -0
- package/coverage/lcov-report/react/components/SideNav/Content/LevelTwoContent.jsx.html +733 -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 +319 -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 +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 +139 -0
- package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +220 -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 +208 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +247 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +199 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +970 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +415 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +187 -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/SideNavUI.jsx.html +1000 -0
- package/coverage/lcov-report/react/components/SideNav/UI/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +94 -0
- package/coverage/lcov-report/react/components/SideNav/helpers.js.html +1255 -0
- package/coverage/lcov-report/react/components/SideNav/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/index.js.html +238 -0
- package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +232 -0
- package/coverage/lcov-report/react/components/Tooltip/index.html +146 -0
- package/coverage/lcov-report/react/components/Tooltip/index.js.html +94 -0
- package/coverage/lcov-report/react/components/Tooltip/position.js.html +289 -0
- package/coverage/lcov-report/react/components/hooks/index.html +116 -0
- package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +310 -0
- package/coverage/lcov-report/react/components/index.html +116 -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 +181 -0
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +2200 -0
- package/coverage/lcov-report/react/lib/index.html +131 -0
- package/coverage/lcov-report/react/lib/svg-definitions.svg.html +460 -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 +316 -0
- package/coverage/lcov-report/react/session/refresh.js.html +232 -0
- package/coverage/lcov-report/react/session/ttl.js.html +196 -0
- package/coverage/lcov-report/session/index.html +161 -0
- package/coverage/lcov-report/session/index.js.html +100 -0
- package/coverage/lcov-report/session/logout.js.html +307 -0
- package/coverage/lcov-report/session/refresh.js.html +232 -0
- package/coverage/lcov-report/session/ttl.js.html +196 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +3067 -0
- package/dist/browser.js +3 -53
- package/dist/browser.js.LICENSE.txt +31 -0
- package/dist/browser.js.map +1 -0
- package/dist/index.js +3 -53
- package/dist/index.js.LICENSE.txt +31 -0
- package/dist/index.js.map +1 -0
- package/dist/react/index.js +3 -0
- package/dist/react/index.js.LICENSE.txt +54 -0
- package/dist/react/index.js.map +1 -0
- 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/favicon/manifest.json +3 -3
- package/images/hhs-logo-black.svg +10 -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 +10 -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 +17 -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 +15 -0
- package/images/icons/svg/print.svg +1 -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 -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 +31 -0
- package/jest/mediaFileTransformer.js +9 -0
- package/jest.config.js +195 -0
- package/lib/Chevron.jsx +32 -0
- package/lib/SvgComponents.jsx +705 -0
- package/lib/svg-definitions.svg +125 -0
- package/package.json +73 -54
- package/{js/session → session}/index.js +2 -4
- package/session/logout.js +77 -0
- package/{js/session → session}/refresh.js +9 -7
- package/session/ttl.js +37 -0
- package/storybook-static/229.630347465201d1822126.manager.bundle.js +1 -0
- package/storybook-static/295.aa3c5122636a27ad7c7b.manager.bundle.js +1 -0
- package/storybook-static/468.d976c69e47003b4dcfa3.manager.bundle.js +2 -0
- package/storybook-static/468.d976c69e47003b4dcfa3.manager.bundle.js.LICENSE.txt +94 -0
- package/storybook-static/51.fc4b02f2a75c894ae64e.manager.bundle.js +2 -0
- package/storybook-static/51.fc4b02f2a75c894ae64e.manager.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/551.45aead073703cc6fb12b.manager.bundle.js +1 -0
- package/storybook-static/807.1a7f4dcf15e4696572ca.manager.bundle.js +2 -0
- package/storybook-static/807.1a7f4dcf15e4696572ca.manager.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/897.9b5fee8cc7074607c812.manager.bundle.js +2 -0
- package/storybook-static/897.9b5fee8cc7074607c812.manager.bundle.js.LICENSE.txt +12 -0
- package/storybook-static/935.532759f0652585685af7.manager.bundle.js +1 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/index.html +59 -0
- package/storybook-static/main.ad4edcd27d527a119d7a.manager.bundle.js +1 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/runtime~main.b165398bf7ef3e30d431.manager.bundle.js +1 -0
- package/styles/_global.scss +81 -59
- package/styles/_main.scss +11 -3
- package/styles/_paths.scss +1 -1
- package/styles/_qpp-style.scss +7 -4
- package/styles/components/_accordion.scss +273 -149
- package/styles/components/_alerts.scss +5 -7
- package/styles/components/_autocomplete.scss +47 -0
- package/styles/components/_breadcrumbs.scss +18 -17
- package/styles/components/_buttons.scss +545 -275
- package/styles/components/_error-page.scss +56 -0
- package/styles/components/_flash-notification.scss +98 -0
- package/styles/components/_fonts.scss +12 -13
- package/styles/components/_forms.scss +144 -70
- package/styles/components/_grid.scss +26 -20
- package/styles/components/_info-modal.scss +92 -19
- package/styles/components/_links.scss +4 -3
- package/styles/components/_modals.scss +10 -9
- package/styles/components/_notification-banner.scss +166 -0
- package/styles/components/_panels.scss +23 -21
- package/styles/components/_pie-chart.scss +3 -3
- package/styles/components/_score-chart.scss +135 -105
- package/styles/components/_spinner.scss +7 -0
- package/styles/components/_tables.scss +96 -72
- package/styles/components/_tabs.scss +69 -0
- package/styles/components/_text.scss +114 -48
- package/styles/components/_tooltip.scss +23 -0
- package/styles/components/_variables.scss +87 -58
- package/styles/components/_wells.scss +39 -29
- package/styles/qppds/README.md +0 -0
- package/styles/qppds/base/_backgrounds.scss +7 -0
- package/styles/qppds/base/_fonts.scss +50 -0
- package/styles/qppds/base/_icon.scss +31 -0
- package/styles/qppds/base/_layout.scss +5 -0
- package/styles/qppds/base/_typography.scss +97 -0
- package/styles/qppds/base/index.scss +8 -0
- package/styles/qppds/components/_alert.scss +101 -0
- package/styles/qppds/components/_breadcrumbs.scss +91 -0
- package/styles/qppds/components/_button.scss +306 -0
- 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 +56 -0
- package/styles/qppds/components/_footer.scss +606 -0
- package/styles/qppds/components/_gov-banner.scss +344 -0
- package/styles/qppds/components/_header.scss +913 -0
- package/styles/qppds/components/_link.scss +52 -0
- package/styles/qppds/components/_modal.scss +118 -0
- package/styles/qppds/components/_page-header.scss +104 -0
- 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/qppds/components/_sidebar.scss +10 -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 +24 -0
- package/styles/qppds/components/sidebar/_animations.scss +38 -0
- package/styles/{components → qppds/components}/sidebar/_cms.scss +19 -10
- package/styles/{components → qppds/components}/sidebar/_details.scss +25 -21
- package/styles/qppds/components/sidebar/_links.scss +462 -0
- package/styles/qppds/components/sidebar/_select-role-dropdown.scss +21 -0
- package/styles/qppds/components/sidebar/_sidebar-animation.scss +125 -0
- package/styles/qppds/components/sidebar/_sidebar-tooltip.scss +33 -0
- package/styles/qppds/components/sidebar/_sidebar.scss +146 -0
- package/styles/qppds/components/sidebar/project-specific/_wi.scss +42 -0
- package/styles/qppds/index.scss +4 -0
- package/styles/qppds/settings/_functions.scss +6 -0
- package/styles/qppds/settings/_index.scss +3 -0
- package/styles/qppds/settings/mixins/_borders.scss +6 -0
- package/styles/qppds/settings/mixins/_focus.scss +28 -0
- package/styles/qppds/settings/mixins/_icons.scss +43 -0
- package/styles/qppds/settings/mixins/_index.scss +8 -0
- package/styles/qppds/settings/mixins/_layout.scss +74 -0
- package/styles/qppds/settings/mixins/_lists.scss +12 -0
- package/styles/qppds/settings/mixins/_table.scss +91 -0
- package/styles/qppds/settings/mixins/_type.scss +89 -0
- package/styles/qppds/settings/mixins/_visually-hidden.scss +30 -0
- package/styles/qppds/settings/variables/_color.scss +86 -0
- package/styles/qppds/settings/variables/_index.scss +4 -0
- package/styles/qppds/settings/variables/_layout.scss +69 -0
- package/styles/qppds/settings/variables/_type.scss +135 -0
- package/styles/qppds/settings/variables/_z-index.scss +8 -0
- package/styles/qppds/utilities/_background-color.scss +134 -0
- package/styles/qppds/utilities/_color.scss +40 -0
- package/styles/qppds/utilities/_display-visibility.scss +83 -0
- package/styles/qppds/utilities/_flexbox.scss +240 -0
- package/styles/qppds/utilities/_font-family.scss +9 -0
- package/styles/qppds/utilities/_font-size.scss +8 -0
- package/styles/qppds/utilities/_font-weight.scss +8 -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/_margin.scss +136 -0
- package/styles/qppds/utilities/_padding.scss +76 -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 +8 -0
- package/styles/qppds/utilities/_vertical-align.scss +72 -0
- package/styles/qppds/utilities/_width.scss +81 -0
- package/styles/qppds/utilities/index.scss +17 -0
- package/styles/qppds.scss +2 -0
- package/styles/third-party/_legacy-bootstrap.scss +19 -0
- package/styles/third-party/legacy-bootstrap/_buttons.scss +126 -0
- package/styles/third-party/legacy-bootstrap/_dropdowns.scss +211 -0
- package/styles/third-party/legacy-bootstrap/_forms.scss +510 -0
- package/styles/third-party/legacy-bootstrap/_grid.scss +73 -0
- package/styles/third-party/legacy-bootstrap/_mixins.scss +27 -0
- package/styles/third-party/legacy-bootstrap/_navbar.scss +644 -0
- package/styles/third-party/legacy-bootstrap/_navs.scss +193 -0
- package/styles/third-party/legacy-bootstrap/_normalize.scss +385 -0
- package/styles/third-party/legacy-bootstrap/_scaffolding.scss +116 -0
- package/styles/third-party/legacy-bootstrap/_variables.scss +858 -0
- package/styles/third-party/legacy-bootstrap/mixins/_buttons.scss +70 -0
- package/styles/third-party/legacy-bootstrap/mixins/_clearfix.scss +22 -0
- package/styles/third-party/legacy-bootstrap/mixins/_forms.scss +108 -0
- package/styles/third-party/legacy-bootstrap/mixins/_grid-framework.scss +86 -0
- package/styles/third-party/legacy-bootstrap/mixins/_grid.scss +112 -0
- package/styles/third-party/legacy-bootstrap/mixins/_labels.scss +12 -0
- package/styles/third-party/legacy-bootstrap/mixins/_nav-divider.scss +10 -0
- package/styles/third-party/legacy-bootstrap/mixins/_nav-vertical-align.scss +9 -0
- package/styles/third-party/legacy-bootstrap/mixins/_opacity.scss +7 -0
- package/styles/third-party/legacy-bootstrap/mixins/_panels.scss +30 -0
- package/styles/third-party/legacy-bootstrap/mixins/_reset-filter.scss +7 -0
- package/styles/third-party/legacy-bootstrap/mixins/_reset-text.scss +18 -0
- package/styles/third-party/legacy-bootstrap/mixins/_resize.scss +6 -0
- package/styles/third-party/legacy-bootstrap/mixins/_responsive-visibility.scss +25 -0
- package/styles/third-party/legacy-bootstrap/mixins/_size.scss +10 -0
- package/styles/third-party/legacy-bootstrap/mixins/_tab-focus.scss +9 -0
- package/styles/third-party/legacy-bootstrap/mixins/_table-row.scss +28 -0
- package/styles/third-party/legacy-bootstrap/mixins/_text-emphasis.scss +12 -0
- package/styles/third-party/legacy-bootstrap/mixins/_text-overflow.scss +8 -0
- package/styles/third-party/legacy-bootstrap/mixins/_vendor-prefixes.scss +182 -0
- package/styles/utility/_mixins.scss +12 -11
- package/styles/utility/_utilities.scss +12 -1
- package/svgo.config.js +14 -0
- package/test/components/Accordion.test.js +12 -0
- package/test/components/ErrorUI.test.js +33 -0
- package/test/components/FooterUI.test.js +60 -0
- package/test/components/HeaderUI.test.js +35 -0
- package/test/components/Infotip.test.js +79 -0
- package/test/components/SessionDialogUI.test.js +339 -0
- package/test/components/SideNavUI.test.js +23 -0
- package/test/index.test.js +8 -0
- package/test/session/session.test.js +221 -0
- package/test-setup.js +1 -0
- package/webpack.config.js +137 -0
- package/webpack.config.react.js +75 -0
- package/.sass-cache/3e7387cd32ce4392e618d792efcd09e792ce05b8/_footer.scssc +0 -0
- package/.sass-cache/3e7387cd32ce4392e618d792efcd09e792ce05b8/_header.scssc +0 -0
- package/.sass-cache/4b3dd777ab7832106df7bc479eaaa462d102b08a/_animations.scssc +0 -0
- package/.sass-cache/4b3dd777ab7832106df7bc479eaaa462d102b08a/_cms.scssc +0 -0
- package/.sass-cache/4b3dd777ab7832106df7bc479eaaa462d102b08a/_details.scssc +0 -0
- package/.sass-cache/4b3dd777ab7832106df7bc479eaaa462d102b08a/_links.scssc +0 -0
- package/.sass-cache/4b3dd777ab7832106df7bc479eaaa462d102b08a/_sidebar.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_accordion.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_alerts.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_breadcrumbs.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_buttons.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_fonts.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_footer.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_forms.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_grid.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_header.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_info-modal.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_links.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_modals.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_panels.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_pie-chart.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_score-chart.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_session-dialog.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_sidebar.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_tables.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_text.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_toggles.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_tool-tips.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_variables.scssc +0 -0
- package/.sass-cache/4bd2b87409801cd1c2c2d14f3b4ba7f954836013/_wells.scssc +0 -0
- package/.sass-cache/5c21c43f3d373dd19958b57d9f271467abf65ccf/_layout.scssc +0 -0
- package/.sass-cache/6b6017e458fe0ea5864ebd9da1d35223cfce75de/_global.scssc +0 -0
- package/.sass-cache/6b6017e458fe0ea5864ebd9da1d35223cfce75de/_main.scssc +0 -0
- package/.sass-cache/6b6017e458fe0ea5864ebd9da1d35223cfce75de/_paths.scssc +0 -0
- package/.sass-cache/6b6017e458fe0ea5864ebd9da1d35223cfce75de/_qpp-style.scssc +0 -0
- package/.sass-cache/c7cd1c57e96d43cd7197e070665e8c3abeda3881/_mixins.scssc +0 -0
- package/.sass-cache/c7cd1c57e96d43cd7197e070665e8c3abeda3881/_utilities.scssc +0 -0
- package/Dockerfile +0 -27
- package/Jenkinsfile +0 -22
- package/_config.dev.yml +0 -17
- package/_layouts/base.html +0 -42
- package/css/main.scss +0 -5
- package/dist/default.css +0 -2
- package/dist/default.css.map +0 -1
- package/dist/fonts/FontAwesome.otf +0 -0
- package/dist/fonts/Rubik-Bold.ttf +0 -0
- package/dist/fonts/Rubik-Light.ttf +0 -0
- package/dist/fonts/Rubik-Medium.ttf +0 -0
- package/dist/fonts/Rubik-Regular.ttf +0 -0
- package/dist/fonts/fontawesome-webfont.eot +0 -0
- package/dist/fonts/fontawesome-webfont.ttf +0 -0
- package/dist/fonts/fontawesome-webfont.woff +0 -0
- package/dist/fonts/fontawesome-webfont.woff2 +0 -0
- package/dist/report.html +0 -25
- package/js/components/Footer/FooterUI.jsx +0 -39
- package/js/components/Footer/footer.js +0 -17
- package/js/components/Header/HeaderAbout.jsx +0 -27
- package/js/components/Header/HeaderAccountMenu.jsx +0 -114
- package/js/components/Header/HeaderApms.jsx +0 -25
- package/js/components/Header/HeaderMips.jsx +0 -43
- package/js/components/Header/HeaderUI.jsx +0 -87
- package/js/components/Header/header.js +0 -15
- package/js/components/InfoModal/index.jsx +0 -43
- package/js/components/SessionDialogUI.jsx +0 -181
- package/js/components/SideNav/Chart/ScoreChart.jsx +0 -246
- package/js/components/SideNav/Chart/__tests__/ScoreChart.test.js +0 -28
- package/js/components/SideNav/Chart/__tests__/__snapshots__/ScoreChart.test.js.snap +0 -57
- package/js/components/SideNav/Chart/index.js +0 -1
- package/js/components/SideNav/Content/CmsContent.jsx +0 -81
- package/js/components/SideNav/Content/LevelOneContent.jsx +0 -53
- package/js/components/SideNav/Content/LevelThreeContent.jsx +0 -98
- package/js/components/SideNav/Content/LevelTwoContent.jsx +0 -87
- package/js/components/SideNav/Content/index.js +0 -4
- package/js/components/SideNav/Details/IndividualDetails.jsx +0 -35
- package/js/components/SideNav/Details/PracticeDetails.jsx +0 -33
- package/js/components/SideNav/Details/index.js +0 -2
- package/js/components/SideNav/Links/CmsReportLink.jsx +0 -114
- package/js/components/SideNav/Links/NavLinkBack.jsx +0 -8
- package/js/components/SideNav/Links/NavLinkContainer.jsx +0 -33
- package/js/components/SideNav/Links/NavLinkDrawer.jsx +0 -72
- package/js/components/SideNav/Links/NavLinkInline.jsx +0 -20
- package/js/components/SideNav/Links/NavLinkSlideOut.jsx +0 -47
- package/js/components/SideNav/Links/NavLinkToggle.jsx +0 -25
- package/js/components/SideNav/Links/index.js +0 -7
- package/js/components/SideNav/UI/SideNavUI.jsx +0 -109
- package/js/components/SideNav/UI/index.js +0 -1
- package/js/components/SideNav/index.js +0 -24
- package/js/components/index.js +0 -9
- package/js/index.js +0 -24
- package/js/session/logout.js +0 -41
- package/sidebar-demo.html +0 -48
- package/styles/components/_footer.scss +0 -164
- package/styles/components/_header.scss +0 -393
- package/styles/components/_sidebar.scss +0 -6
- package/styles/components/_tool-tips.scss +0 -6
- package/styles/components/sidebar/_animations.scss +0 -16
- package/styles/components/sidebar/_links.scss +0 -269
- package/styles/components/sidebar/_sidebar.scss +0 -107
- package/styles/guide/_layout.scss +0 -120
- package/styles/guide/sidebar-demo.css +0 -121
- package/test.html +0 -38
- package/yarn-error.log +0 -5759
- package/yarn.lock +0 -5694
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import FeatherIcon from 'feather-icons-react';
|
|
4
|
+
|
|
5
|
+
const Card = ({
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
cta,
|
|
9
|
+
description,
|
|
10
|
+
eyebrow,
|
|
11
|
+
img,
|
|
12
|
+
parentTag,
|
|
13
|
+
responsive,
|
|
14
|
+
routerComponent,
|
|
15
|
+
size,
|
|
16
|
+
title,
|
|
17
|
+
variant,
|
|
18
|
+
}) => {
|
|
19
|
+
const classes = [
|
|
20
|
+
'qppds',
|
|
21
|
+
'qpp-c-card',
|
|
22
|
+
size && `qpp-c-card--${size}`,
|
|
23
|
+
img && 'qpp-c-card--image',
|
|
24
|
+
variant === 'flag' && responsive && 'qpp-c-xs-card--flag',
|
|
25
|
+
variant === 'flag' && !responsive && 'qpp-c-card--flag',
|
|
26
|
+
className,
|
|
27
|
+
]
|
|
28
|
+
.filter(Boolean)
|
|
29
|
+
.join(' ');
|
|
30
|
+
|
|
31
|
+
const Container = parentTag || 'div';
|
|
32
|
+
const HeadingComponent = title?.headingLevel || 'h3';
|
|
33
|
+
const LinkComponent = routerComponent || 'a';
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<Container className={classes}>
|
|
37
|
+
<div className="qpp-c-card__content">
|
|
38
|
+
<div className="qpp-c-card__header">
|
|
39
|
+
{title && (
|
|
40
|
+
<HeadingComponent className="h3 qpp-c-card__title">
|
|
41
|
+
{typeof title === 'object' ? title.text : title}
|
|
42
|
+
</HeadingComponent>
|
|
43
|
+
)}
|
|
44
|
+
{eyebrow && <span className="l2 qpp-c-card__eyebrow">{eyebrow}</span>}
|
|
45
|
+
</div>
|
|
46
|
+
{description && (
|
|
47
|
+
<div className="qpp-c-card__body">
|
|
48
|
+
<p className="p1">{description}</p>
|
|
49
|
+
</div>
|
|
50
|
+
)}
|
|
51
|
+
{children && <div className="qpp-c-card__body">{children}</div>}
|
|
52
|
+
{cta && (
|
|
53
|
+
<div className="qpp-c-card__cta">
|
|
54
|
+
{React.isValidElement(cta) ? (
|
|
55
|
+
cta
|
|
56
|
+
) : (
|
|
57
|
+
<LinkComponent
|
|
58
|
+
href={cta.href}
|
|
59
|
+
className="qpp-c-button qpp-c-button--text qpp-c-button--icon-after"
|
|
60
|
+
{...cta}
|
|
61
|
+
>
|
|
62
|
+
{cta.text} <FeatherIcon icon={cta.icon || 'chevron-right'} />
|
|
63
|
+
</LinkComponent>
|
|
64
|
+
)}
|
|
65
|
+
</div>
|
|
66
|
+
)}
|
|
67
|
+
</div>
|
|
68
|
+
{img &&
|
|
69
|
+
(() => {
|
|
70
|
+
const { useBgImage, url, alt, ...restImg } = img;
|
|
71
|
+
return (
|
|
72
|
+
<div className="qpp-c-card__media">
|
|
73
|
+
{useBgImage ? (
|
|
74
|
+
<div
|
|
75
|
+
role="img"
|
|
76
|
+
style={{ backgroundImage: `url(${url})` }}
|
|
77
|
+
aria-label={alt}
|
|
78
|
+
{...restImg}
|
|
79
|
+
/>
|
|
80
|
+
) : (
|
|
81
|
+
<img src={url} alt={alt} {...restImg} />
|
|
82
|
+
)}
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
})()}
|
|
86
|
+
</Container>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
Card.propTypes = {
|
|
91
|
+
children: PropTypes.node,
|
|
92
|
+
className: PropTypes.string,
|
|
93
|
+
cta: PropTypes.oneOfType([
|
|
94
|
+
PropTypes.node,
|
|
95
|
+
PropTypes.shape({
|
|
96
|
+
href: PropTypes.string,
|
|
97
|
+
text: PropTypes.string,
|
|
98
|
+
icon: PropTypes.string,
|
|
99
|
+
}),
|
|
100
|
+
]),
|
|
101
|
+
description: PropTypes.string,
|
|
102
|
+
eyebrow: PropTypes.string,
|
|
103
|
+
img: PropTypes.shape({
|
|
104
|
+
url: PropTypes.string,
|
|
105
|
+
alt: PropTypes.string,
|
|
106
|
+
useBgImage: PropTypes.bool,
|
|
107
|
+
}),
|
|
108
|
+
parentTag: PropTypes.string,
|
|
109
|
+
responsive: PropTypes.bool,
|
|
110
|
+
routerComponent: PropTypes.func,
|
|
111
|
+
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
112
|
+
title: PropTypes.oneOfType([
|
|
113
|
+
PropTypes.string,
|
|
114
|
+
PropTypes.shape({
|
|
115
|
+
text: PropTypes.string,
|
|
116
|
+
headingLevel: PropTypes.string,
|
|
117
|
+
}),
|
|
118
|
+
]),
|
|
119
|
+
variant: PropTypes.oneOf(['default', 'flag']),
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
Card.defaultProps = {
|
|
123
|
+
children: null,
|
|
124
|
+
className: null,
|
|
125
|
+
cta: null,
|
|
126
|
+
description: null,
|
|
127
|
+
eyebrow: null,
|
|
128
|
+
img: null,
|
|
129
|
+
parentTag: null,
|
|
130
|
+
responsive: false,
|
|
131
|
+
routerComponent: null,
|
|
132
|
+
size: null,
|
|
133
|
+
title: null,
|
|
134
|
+
variant: 'default',
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export default Card;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
export const Add = ({ iconText }) => (
|
|
5
|
+
<>
|
|
6
|
+
<svg
|
|
7
|
+
className="qpp-c-details--icon-closed qpp-icon-mat qpp-icon-inline--md"
|
|
8
|
+
aria-hidden="true"
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
role="img"
|
|
12
|
+
focusable="false"
|
|
13
|
+
>
|
|
14
|
+
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
|
|
15
|
+
</svg>{' '}
|
|
16
|
+
{iconText}
|
|
17
|
+
</>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
Add.propTypes = {
|
|
21
|
+
iconText: PropTypes.string,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
Add.defaultProps = {
|
|
25
|
+
iconText: null,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const Remove = ({ iconText }) => (
|
|
29
|
+
<>
|
|
30
|
+
<svg
|
|
31
|
+
className="qpp-c-details--icon-open qpp-icon-mat qpp-icon-inline--md"
|
|
32
|
+
aria-hidden="true"
|
|
33
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
34
|
+
viewBox="0 0 24 24"
|
|
35
|
+
role="img"
|
|
36
|
+
focusable="false"
|
|
37
|
+
>
|
|
38
|
+
<path d="M19 13H5v-2h14v2z" />
|
|
39
|
+
</svg>
|
|
40
|
+
{iconText}
|
|
41
|
+
</>
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
Remove.propTypes = {
|
|
45
|
+
iconText: PropTypes.string,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
Remove.defaultProps = {
|
|
49
|
+
iconText: null,
|
|
50
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Add, Remove } from './DetailsIcons';
|
|
4
|
+
|
|
5
|
+
const Details = ({ children, title, variant, className, ...rest }) => {
|
|
6
|
+
if (variant === 'header') {
|
|
7
|
+
return (
|
|
8
|
+
<details className="qpp-c-details qpp-c-details--header">
|
|
9
|
+
<summary>
|
|
10
|
+
{title}
|
|
11
|
+
<span className="qpp-c-details--icon-closed" aria-hidden="true">
|
|
12
|
+
<Add iconText="View" />
|
|
13
|
+
</span>
|
|
14
|
+
<span className="qpp-c-details--icon-open" aria-hidden="true">
|
|
15
|
+
<Remove iconText="Hide" />
|
|
16
|
+
</span>
|
|
17
|
+
</summary>
|
|
18
|
+
{children}
|
|
19
|
+
</details>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<details className={`qpp-c-details ${className}`} {...rest}>
|
|
25
|
+
<summary
|
|
26
|
+
className={
|
|
27
|
+
variant === 'text-button' ? 'qpp-c-button qpp-c-button--text' : ''
|
|
28
|
+
}
|
|
29
|
+
>
|
|
30
|
+
<Add />
|
|
31
|
+
<Remove />
|
|
32
|
+
{title}
|
|
33
|
+
</summary>
|
|
34
|
+
{children}
|
|
35
|
+
</details>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
Details.propTypes = {
|
|
40
|
+
children: PropTypes.node,
|
|
41
|
+
title: PropTypes.node,
|
|
42
|
+
variant: PropTypes.oneOf(['header', 'text-button']),
|
|
43
|
+
className: PropTypes.string,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
Details.defaultProps = {
|
|
47
|
+
children: false,
|
|
48
|
+
title: null,
|
|
49
|
+
variant: null,
|
|
50
|
+
className: '',
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default Details;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const Dropdown = ({
|
|
5
|
+
className,
|
|
6
|
+
id,
|
|
7
|
+
ariaLabelledBy,
|
|
8
|
+
ariaLabel,
|
|
9
|
+
onChange,
|
|
10
|
+
dataTestId,
|
|
11
|
+
name,
|
|
12
|
+
dataType,
|
|
13
|
+
disabled,
|
|
14
|
+
size,
|
|
15
|
+
options,
|
|
16
|
+
children,
|
|
17
|
+
parentElement,
|
|
18
|
+
...rest
|
|
19
|
+
}) => {
|
|
20
|
+
const dropdownClass = [
|
|
21
|
+
'qpp-c-dropdown',
|
|
22
|
+
size === 'big' && 'qpp-c-dropdown--big',
|
|
23
|
+
className,
|
|
24
|
+
]
|
|
25
|
+
.filter(Boolean)
|
|
26
|
+
.join(' ');
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<select
|
|
30
|
+
id={id}
|
|
31
|
+
aria-labelledby={ariaLabelledBy}
|
|
32
|
+
aria-label={ariaLabel}
|
|
33
|
+
className={dropdownClass || ''}
|
|
34
|
+
onChange={onChange}
|
|
35
|
+
data-testid={dataTestId}
|
|
36
|
+
name={name}
|
|
37
|
+
disabled={disabled}
|
|
38
|
+
data-type={dataType}
|
|
39
|
+
{...rest}
|
|
40
|
+
>
|
|
41
|
+
{children}
|
|
42
|
+
{options.map(({ disabled, name, value }) => (
|
|
43
|
+
<option disabled={disabled} key={value} value={value}>
|
|
44
|
+
{name}
|
|
45
|
+
</option>
|
|
46
|
+
))}
|
|
47
|
+
</select>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
Dropdown.propTypes = {
|
|
52
|
+
children: PropTypes.node,
|
|
53
|
+
className: PropTypes.string,
|
|
54
|
+
id: PropTypes.string,
|
|
55
|
+
ariaLabelledBy: PropTypes.string,
|
|
56
|
+
ariaLabel: PropTypes.string,
|
|
57
|
+
onChange: PropTypes.func,
|
|
58
|
+
value: PropTypes.string,
|
|
59
|
+
defaultValue: PropTypes.string,
|
|
60
|
+
dataTestId: PropTypes.string,
|
|
61
|
+
name: PropTypes.string,
|
|
62
|
+
dataType: PropTypes.string,
|
|
63
|
+
disabled: PropTypes.bool,
|
|
64
|
+
size: PropTypes.oneOf(['big']),
|
|
65
|
+
options: PropTypes.array,
|
|
66
|
+
parentElement: PropTypes.string,
|
|
67
|
+
};
|
|
68
|
+
|
|
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
|
+
export default Dropdown;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Menu as AriaKitMenu } from 'ariakit/menu';
|
|
4
|
+
|
|
5
|
+
function Menu({ state, className, children, ...props }) {
|
|
6
|
+
return (
|
|
7
|
+
<AriaKitMenu as="ul" state={state} className={className} {...props}>
|
|
8
|
+
{children}
|
|
9
|
+
</AriaKitMenu>
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
Menu.propTypes = {
|
|
14
|
+
state: PropTypes.object.isRequired,
|
|
15
|
+
className: PropTypes.string,
|
|
16
|
+
children: PropTypes.node,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
Menu.defaultProps = {
|
|
20
|
+
className:
|
|
21
|
+
'qpp-c-dropdown-menu qpp-c-dropdown-menu__box qpp-c-dropdown-menu__list',
|
|
22
|
+
children: null,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default Menu;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { MenuButton as AriaKitButton } from 'ariakit/menu';
|
|
4
|
+
|
|
5
|
+
function MenuButton({ state, className, iconExist, children, ...props }) {
|
|
6
|
+
const dropDownIsOpen = state.open;
|
|
7
|
+
|
|
8
|
+
const CheveronUpIcon = 'M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z';
|
|
9
|
+
const CheveronDownIcon = 'M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z';
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<AriaKitButton state={state} className={className} {...props}>
|
|
13
|
+
{children}{' '}
|
|
14
|
+
{iconExist && (
|
|
15
|
+
<svg
|
|
16
|
+
className="qpp-icon-mat qpp-icon-inline--lg"
|
|
17
|
+
focusable="false"
|
|
18
|
+
viewBox="0 0 24 24"
|
|
19
|
+
aria-hidden="true"
|
|
20
|
+
>
|
|
21
|
+
<path d={dropDownIsOpen ? CheveronUpIcon : CheveronDownIcon} />
|
|
22
|
+
</svg>
|
|
23
|
+
)}
|
|
24
|
+
</AriaKitButton>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
MenuButton.propTypes = {
|
|
29
|
+
state: PropTypes.object.isRequired,
|
|
30
|
+
className: PropTypes.string,
|
|
31
|
+
iconExist: PropTypes.bool,
|
|
32
|
+
children: PropTypes.node,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
MenuButton.defaultProps = {
|
|
36
|
+
className: 'qpp-c-button',
|
|
37
|
+
iconExist: true,
|
|
38
|
+
children: null,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default MenuButton;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { MenuItem as AriaKitMenuItem } from 'ariakit/menu';
|
|
4
|
+
|
|
5
|
+
function MenuItem({ as, className, children, ...props }) {
|
|
6
|
+
return (
|
|
7
|
+
<AriaKitMenuItem as={as} className={className} {...props}>
|
|
8
|
+
{children}
|
|
9
|
+
</AriaKitMenuItem>
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
MenuItem.propTypes = {
|
|
14
|
+
as: PropTypes.string,
|
|
15
|
+
className: PropTypes.string,
|
|
16
|
+
children: PropTypes.node,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
MenuItem.defaultProps = {
|
|
20
|
+
as: 'li',
|
|
21
|
+
className: 'qpp-c-dropdown-menu__item',
|
|
22
|
+
children: null,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default MenuItem;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { MenuItem as AriaKitMenuItem } from 'ariakit/menu';
|
|
4
|
+
|
|
5
|
+
function MenuItemLink({ as, className, children, ...props }) {
|
|
6
|
+
return (
|
|
7
|
+
<li role="none">
|
|
8
|
+
<AriaKitMenuItem as={as} className={className} {...props}>
|
|
9
|
+
{children}
|
|
10
|
+
</AriaKitMenuItem>
|
|
11
|
+
</li>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
MenuItemLink.propTypes = {
|
|
16
|
+
as: PropTypes.string,
|
|
17
|
+
className: PropTypes.string,
|
|
18
|
+
children: PropTypes.node,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
MenuItemLink.defaultProps = {
|
|
22
|
+
as: 'a',
|
|
23
|
+
className: 'qpp-c-dropdown-menu__item',
|
|
24
|
+
children: null,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default MenuItemLink;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
class Collapsible extends Component {
|
|
5
|
+
constructor(props) {
|
|
6
|
+
super(props);
|
|
7
|
+
|
|
8
|
+
this.state = {
|
|
9
|
+
isExpanded: false,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
this._toggleExpanded = this.toggleExpanded.bind(this);
|
|
13
|
+
this._renderShowButton = this.renderShowButton.bind(this);
|
|
14
|
+
this._renderHideButton = this.renderHideButton.bind(this);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
toggleExpanded() {
|
|
18
|
+
this.setState({
|
|
19
|
+
isExpanded: !this.state.isExpanded,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
renderShowButton() {
|
|
24
|
+
return (
|
|
25
|
+
<span className="collapsible-show-label">{this.props.showLabel}</span>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
renderHideButton() {
|
|
30
|
+
if (this.props.hideLabel) {
|
|
31
|
+
return (
|
|
32
|
+
<span className="collapsible-hide-label">{this.props.hideLabel}</span>
|
|
33
|
+
);
|
|
34
|
+
} else {
|
|
35
|
+
return '';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
render() {
|
|
40
|
+
const isArray = Array.isArray(this.props.content);
|
|
41
|
+
const isHidden = this.state.isExpanded ? undefined : true;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div className="collapsible-container">
|
|
45
|
+
<button
|
|
46
|
+
onClick={this._toggleExpanded}
|
|
47
|
+
className="collapsible-summary"
|
|
48
|
+
type="button"
|
|
49
|
+
aria-expanded={this.state.isExpanded ? true : false}
|
|
50
|
+
>
|
|
51
|
+
{this._renderShowButton()}
|
|
52
|
+
{this._renderHideButton()}
|
|
53
|
+
</button>
|
|
54
|
+
|
|
55
|
+
<div className="collapsible-details" hidden={isHidden}>
|
|
56
|
+
{isArray ? (
|
|
57
|
+
<ul className="items">
|
|
58
|
+
{this.props.content.map((c) => (
|
|
59
|
+
<li key={c.contentTitle}>
|
|
60
|
+
<p>
|
|
61
|
+
<b>{c.contentTitle}</b>
|
|
62
|
+
</p>
|
|
63
|
+
<p>{c.content}</p>
|
|
64
|
+
</li>
|
|
65
|
+
))}
|
|
66
|
+
</ul>
|
|
67
|
+
) : (
|
|
68
|
+
<div>
|
|
69
|
+
<p>
|
|
70
|
+
<b>{this.props.contentTitle}</b>
|
|
71
|
+
</p>
|
|
72
|
+
<p>{this.props.content}</p>
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
Collapsible.propTypes = {
|
|
82
|
+
showLabel: PropTypes.string.isRequired,
|
|
83
|
+
hideLabel: PropTypes.string.isRequired,
|
|
84
|
+
content: PropTypes.oneOfType([PropTypes.array, PropTypes.string]).isRequired,
|
|
85
|
+
contentTitle: PropTypes.string,
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export default Collapsible;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Collapsible from './Collapsible';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
|
|
5
|
+
const ErrorUI = (props) => {
|
|
6
|
+
let errorTitle = `${props.type || 'Error'} ${props.code || ''}`;
|
|
7
|
+
let errorDetails = props.message;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<section className="page-error">
|
|
11
|
+
<div className="responsive-container">
|
|
12
|
+
<h1>We’re sorry.</h1>
|
|
13
|
+
<p className="h2">We cannot access this page.</p>
|
|
14
|
+
<Collapsible
|
|
15
|
+
showLabel="Open technical details about the error"
|
|
16
|
+
hideLabel="Close technical details about the error"
|
|
17
|
+
contentTitle={errorTitle}
|
|
18
|
+
content={errorDetails}
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</section>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
ErrorUI.propTypes = {
|
|
26
|
+
code: PropTypes.string,
|
|
27
|
+
message: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
28
|
+
type: PropTypes.string,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default ErrorUI;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from 'react-dom';
|
|
3
|
+
import ErrorUI from './ErrorUI';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Renders the QPP Error Page content.
|
|
7
|
+
*/
|
|
8
|
+
export default class ErrorPage {
|
|
9
|
+
/**
|
|
10
|
+
* @param {Object} options - An object containing content and config data
|
|
11
|
+
* @param {String} options.type - The error type
|
|
12
|
+
* @param {String} options.code - The error code
|
|
13
|
+
* @param {String} options.message - The error message
|
|
14
|
+
* @param {HTMLElement} options.rootElement - Elem inside which to render
|
|
15
|
+
*/
|
|
16
|
+
constructor(options) {
|
|
17
|
+
render(
|
|
18
|
+
<ErrorUI
|
|
19
|
+
type={options.type}
|
|
20
|
+
code={options.code}
|
|
21
|
+
message={options.message}
|
|
22
|
+
/>,
|
|
23
|
+
options.rootElement
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import reactDOM from 'react-dom';
|
|
4
|
+
import { CloseXIcon } from '../../lib/SvgComponents.jsx';
|
|
5
|
+
|
|
6
|
+
class FlashNotification extends Component {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
this.state = { isClosed: true };
|
|
10
|
+
this._closeFlashNotification = this.closeFlashNotification.bind(this);
|
|
11
|
+
this._fadeOutNotification = this.fadeOutNotification.bind(this);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
render() {
|
|
15
|
+
return (
|
|
16
|
+
<div
|
|
17
|
+
className={
|
|
18
|
+
this.state.isClosed
|
|
19
|
+
? 'flash-notification notification-closed'
|
|
20
|
+
: 'flash-notification'
|
|
21
|
+
}
|
|
22
|
+
ref={(elem) => {
|
|
23
|
+
this.element = elem;
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
<div className={this.props.success ? 'success' : 'error'}>
|
|
27
|
+
<div className="icon"></div>
|
|
28
|
+
<div className="text-content">
|
|
29
|
+
<p className="title-text">{this.props.titleText}</p>
|
|
30
|
+
<p className="body-text">{this.props.bodyText}</p>
|
|
31
|
+
</div>
|
|
32
|
+
<div className="close-notification-container">
|
|
33
|
+
<button
|
|
34
|
+
className="closeNotification"
|
|
35
|
+
aria-label="Close notification"
|
|
36
|
+
onClick={this._closeFlashNotification}
|
|
37
|
+
>
|
|
38
|
+
<svg className="close-icon" aria-hidden="true">
|
|
39
|
+
{/* <use xlinkHref="#closex" /> */}
|
|
40
|
+
<CloseXIcon />
|
|
41
|
+
</svg>
|
|
42
|
+
</button>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
componentDidMount() {
|
|
50
|
+
setTimeout(
|
|
51
|
+
function () {
|
|
52
|
+
this.setState({ isClosed: false });
|
|
53
|
+
}.bind(this),
|
|
54
|
+
250
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
this.timer = setTimeout(
|
|
58
|
+
function () {
|
|
59
|
+
this._fadeOutNotification();
|
|
60
|
+
}.bind(this),
|
|
61
|
+
10000
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
fadeOutNotification() {
|
|
66
|
+
this.setState({ isClosed: true });
|
|
67
|
+
setTimeout(
|
|
68
|
+
function () {
|
|
69
|
+
reactDOM.unmountComponentAtNode(this.element.parentElement);
|
|
70
|
+
if (typeof this.props.onClose === 'function') {
|
|
71
|
+
this.props.onClose();
|
|
72
|
+
}
|
|
73
|
+
}.bind(this),
|
|
74
|
+
500
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
closeFlashNotification() {
|
|
79
|
+
clearTimeout(this.timer);
|
|
80
|
+
this._fadeOutNotification();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
FlashNotification.propTypes = {
|
|
85
|
+
bodyText: PropTypes.string,
|
|
86
|
+
success: PropTypes.bool.isRequired,
|
|
87
|
+
titleText: PropTypes.string,
|
|
88
|
+
onClose: PropTypes.func,
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export default FlashNotification;
|