@madie/madie-design-system 1.0.2 → 1.0.3
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/.storybook/main.js +3 -0
- package/components/Accordion/Accordion.stories.js +11 -11
- package/components/Accordion/index.jsx +78 -76
- package/components/Alert/Alert.stories.js +60 -51
- package/components/Alert/index.js +46 -37
- package/components/Breadcrumb/Breadcrumb.stories.js +62 -62
- package/components/Breadcrumb/index.js +80 -71
- package/components/Button/Button.stories.js +92 -86
- package/components/Button/index.js +65 -65
- package/components/CalloutBox/CalloutBox.stories.js +75 -75
- package/components/CalloutBox/index.js +92 -92
- package/components/Card/Card.stories.js +135 -135
- package/components/Card/index.js +128 -121
- package/components/Dropdown/Dropdown.stories.js +73 -73
- package/components/Dropdown/index.js +72 -72
- package/components/Error/Collapsible.jsx +75 -70
- package/components/Error/ErrorUI.jsx +22 -22
- package/components/Error/error.js +20 -20
- package/components/FlashNotification/FlashNotificationUI.jsx +77 -77
- package/components/FlashNotification/index.js +23 -23
- package/components/Footer/Footer.stories.js +13 -13
- package/components/Footer/FooterUI.jsx +264 -252
- package/components/Footer/LegacyFooterUI.jsx +190 -180
- package/components/Footer/SocialLinks.jsx +58 -55
- package/components/Footer/Subscribe.jsx +29 -29
- package/components/Footer/footer.js +21 -21
- package/components/FormControlLabel/index.jsx +23 -0
- package/components/Header/Header.stories.js +29 -26
- package/components/Header/HeaderAccountMenu.jsx +163 -149
- package/components/Header/HeaderCancel.jsx +8 -8
- package/components/Header/HeaderContainer.jsx +48 -43
- package/components/Header/HeaderLogo.jsx +34 -34
- package/components/Header/HeaderMenuButton.js +39 -39
- package/components/Header/HeaderMenuItem.jsx +252 -205
- package/components/Header/HeaderMenuLink.js +37 -37
- package/components/Header/HeaderMenuSignOutButton.js +50 -50
- package/components/Header/HeaderMobileButton.js +29 -29
- package/components/Header/HeaderUI.jsx +164 -147
- package/components/Header/HelpIcon.jsx +15 -15
- package/components/Header/ImpersonatorBanner.jsx +50 -47
- package/components/Header/NavigationButtonIcon.jsx +21 -21
- package/components/Header/header.js +36 -34
- package/components/Header/hooks.js +42 -35
- package/components/Header/utag-helpers.js +8 -8
- package/components/Infotip/Infotip.jsx +48 -48
- package/components/Infotip/Infotip.stories.js +32 -30
- package/components/Infotip/InfotipIcon.jsx +30 -30
- package/components/Infotip/index.js +1 -1
- package/components/InputLabel/index.jsx +58 -0
- package/components/Link/Link.stories.js +65 -64
- package/components/Link/index.js +46 -46
- package/components/Modal/LegacyModal.jsx +56 -54
- package/components/Modal/Modal.jsx +121 -121
- package/components/Modal/Modal.stories.js +152 -144
- package/components/Modal/index.jsx +11 -11
- package/components/NotificationBanner/NotificationBanner.stories.js +16 -16
- package/components/NotificationBanner/index.js +239 -225
- package/components/Pagination/index.jsx +171 -160
- package/components/SanitizedContent/index.jsx +183 -183
- package/components/Search/Search.stories.js +14 -14
- package/components/Search/index.js +72 -72
- package/components/Select/Select.stories.js +168 -0
- package/components/Select/index.jsx +103 -0
- package/components/SessionDialog/sessionDialog.js +20 -20
- package/components/SessionDialogUI.jsx +231 -219
- package/components/SideNav/AnimationGroup/AnimationGroup.jsx +19 -17
- package/components/SideNav/Chart/ScoreChart.jsx +238 -229
- package/components/SideNav/Chart/__tests__/ScoreChart.test.js +15 -15
- package/components/SideNav/Chart/index.js +1 -1
- package/components/SideNav/Content/LevelOneContent.jsx +194 -190
- package/components/SideNav/Content/LevelTwoContent.jsx +208 -195
- package/components/SideNav/Content/index.js +2 -2
- package/components/SideNav/Details/IndividualDetails.jsx +10 -10
- package/components/SideNav/Details/PracticeDetails.jsx +36 -34
- package/components/SideNav/Details/index.js +2 -2
- package/components/SideNav/Links/CmsSwitchLink.jsx +32 -32
- package/components/SideNav/Links/NavItemInline.jsx +44 -44
- package/components/SideNav/Links/NavLinkContainer.jsx +27 -25
- package/components/SideNav/Links/NavLinkDrawer.jsx +267 -231
- package/components/SideNav/Links/NavLinkInline.jsx +94 -92
- package/components/SideNav/Links/NavLinkToggle.jsx +25 -25
- package/components/SideNav/Links/index.js +10 -10
- package/components/SideNav/SideNav.stories.js +320 -288
- package/components/SideNav/UI/SideNavUI.jsx +321 -301
- package/components/SideNav/UI/index.js +1 -1
- package/components/SideNav/helpers.js +33 -33
- package/components/SideNav/index.js +46 -46
- package/components/Spinner/index.js +6 -6
- package/components/Tabs/Tab.js +19 -19
- package/components/Tabs/TabPanel.js +31 -24
- package/components/Tabs/Tabs.stories.js +118 -108
- package/components/Tabs/index.js +81 -76
- package/components/TextField/TextField.stories.js +103 -0
- package/components/TextField/index.jsx +80 -0
- package/components/TextInput/TextInput.stories.js +84 -84
- package/components/TextInput/index.js +123 -123
- package/components/Tooltip/Tooltip.jsx +57 -57
- package/components/Tooltip/Tooltip.stories.js +50 -50
- package/components/Tooltip/index.js +1 -1
- package/components/Tooltip/position.js +42 -34
- package/components/UnwrappedSpinner/index.js +5 -5
- package/components/hooks/useGetConfig.js +64 -55
- package/components/index.js +129 -121
- package/coverage/clover.xml +368 -331
- package/coverage/coverage-final.json +57 -54
- package/coverage/lcov-report/InputLabel/index.html +116 -0
- package/coverage/lcov-report/InputLabel/index.jsx.html +214 -0
- package/coverage/lcov-report/Select/index.html +116 -0
- package/coverage/lcov-report/Select/index.jsx.html +391 -0
- package/coverage/lcov-report/Textfield/index.html +116 -0
- package/coverage/lcov-report/Textfield/index.jsx.html +322 -0
- package/coverage/lcov-report/index.html +54 -9
- package/coverage/lcov-report/react/components/Accordion/index.html +1 -1
- package/coverage/lcov-report/react/components/Accordion/index.jsx.html +84 -78
- package/coverage/lcov-report/react/components/Button/index.html +1 -1
- package/coverage/lcov-report/react/components/Button/index.js.html +66 -66
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +87 -72
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +23 -23
- package/coverage/lcov-report/react/components/Error/error.js.html +21 -21
- package/coverage/lcov-report/react/components/Error/index.html +1 -1
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +290 -254
- package/coverage/lcov-report/react/components/Footer/LegacyFooterUI.jsx.html +212 -182
- package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +66 -57
- package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +30 -30
- package/coverage/lcov-report/react/components/Footer/footer.js.html +22 -22
- package/coverage/lcov-report/react/components/Footer/index.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +193 -151
- package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +9 -9
- package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +60 -45
- package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +36 -36
- package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +40 -40
- package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +348 -207
- package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +38 -38
- package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +51 -51
- package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +30 -30
- package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +201 -150
- package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +16 -16
- package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +58 -49
- package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +22 -22
- package/coverage/lcov-report/react/components/Header/header.js.html +42 -36
- package/coverage/lcov-report/react/components/Header/hooks.js.html +58 -37
- package/coverage/lcov-report/react/components/Header/index.html +1 -1
- package/coverage/lcov-report/react/components/Header/utag-helpers.js.html +9 -9
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +49 -49
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +31 -31
- package/coverage/lcov-report/react/components/Infotip/index.html +1 -1
- package/coverage/lcov-report/react/components/Infotip/index.js.html +2 -2
- package/coverage/lcov-report/react/components/InputLabel/index.html +116 -0
- package/coverage/lcov-report/react/components/InputLabel/index.jsx.html +214 -0
- package/coverage/lcov-report/react/components/Modal/LegacyModal.jsx.html +62 -56
- package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +122 -122
- package/coverage/lcov-report/react/components/Modal/index.html +1 -1
- package/coverage/lcov-report/react/components/Modal/index.jsx.html +12 -12
- package/coverage/lcov-report/react/components/NotificationBanner/index.html +1 -1
- package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +269 -227
- package/coverage/lcov-report/react/components/Pagination/index.html +1 -1
- package/coverage/lcov-report/react/components/Pagination/index.jsx.html +195 -162
- package/coverage/lcov-report/react/components/SanitizedContent/index.html +1 -1
- package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +184 -184
- package/coverage/lcov-report/react/components/Select/index.html +116 -0
- package/coverage/lcov-report/react/components/Select/index.jsx.html +391 -0
- package/coverage/lcov-report/react/components/SessionDialog/index.html +1 -1
- package/coverage/lcov-report/react/components/SessionDialog/sessionDialog.js.html +21 -21
- package/coverage/lcov-report/react/components/SessionDialogUI.jsx.html +257 -221
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +25 -19
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Chart/ScoreChart.jsx.html +261 -234
- package/coverage/lcov-report/react/components/SideNav/Chart/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Chart/index.js.html +2 -2
- package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +197 -185
- package/coverage/lcov-report/react/components/SideNav/Content/LevelTwoContent.jsx.html +236 -197
- package/coverage/lcov-report/react/components/SideNav/Content/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +3 -3
- package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +11 -11
- package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +42 -36
- package/coverage/lcov-report/react/components/SideNav/Details/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +3 -3
- package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +33 -33
- package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +45 -45
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +33 -27
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +323 -215
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +100 -94
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +26 -26
- package/coverage/lcov-report/react/components/SideNav/Links/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +11 -11
- package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +363 -303
- package/coverage/lcov-report/react/components/SideNav/UI/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +2 -2
- package/coverage/lcov-report/react/components/SideNav/helpers.js.html +34 -34
- package/coverage/lcov-report/react/components/SideNav/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/index.js.html +47 -47
- package/coverage/lcov-report/react/components/Textfield/index.html +116 -0
- package/coverage/lcov-report/react/components/Textfield/index.jsx.html +322 -0
- package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +58 -58
- package/coverage/lcov-report/react/components/Tooltip/index.html +1 -1
- package/coverage/lcov-report/react/components/Tooltip/index.js.html +2 -2
- package/coverage/lcov-report/react/components/Tooltip/position.js.html +60 -36
- package/coverage/lcov-report/react/components/hooks/index.html +1 -1
- package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +84 -57
- package/coverage/lcov-report/react/components/index.html +1 -1
- package/coverage/lcov-report/react/index.html +1 -1
- package/coverage/lcov-report/react/index.js.html +1 -1
- package/coverage/lcov-report/react/lib/Chevron.jsx.html +1 -1
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +1 -1
- package/coverage/lcov-report/react/lib/index.html +1 -1
- package/coverage/lcov-report/react/lib/svg-definitions.svg.html +1 -1
- package/coverage/lcov-report/react/session/index.html +1 -1
- package/coverage/lcov-report/react/session/index.js.html +1 -1
- package/coverage/lcov-report/react/session/logout.js.html +1 -1
- package/coverage/lcov-report/react/session/refresh.js.html +1 -1
- package/coverage/lcov-report/react/session/ttl.js.html +1 -1
- package/coverage/lcov.info +855 -779
- package/dist/browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +16 -16
- package/dist/react/index.js.LICENSE.txt +1 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +16 -9
- package/styles/qppds/components/_button.scss +29 -1
- package/test/components/Accordion.test.js +10 -10
- package/test/components/ErrorUI.test.js +29 -30
- package/test/components/FooterUI.test.js +82 -80
- package/test/components/HeaderUI.test.js +42 -38
- package/test/components/Infotip.test.js +64 -61
- package/test/components/Pagination.test.js +50 -50
- package/test/components/Select.test.js +113 -0
- package/test/components/SessionDialogUI.test.js +302 -294
- package/test/components/SideNavUI.test.js +19 -19
- package/test/components/TextField.test.js +50 -0
- package/test/components/Tooltip.test.js +133 -133
- package/test/index.test.js +6 -6
- package/test/session/session.test.js +200 -200
- package/storybook-static/0.5651be4a8d0b1984a772.manager.bundle.js +0 -2
- package/storybook-static/0.5651be4a8d0b1984a772.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/0.ce0ed568.iframe.bundle.js +0 -1
- package/storybook-static/1.1b179d27.iframe.bundle.js +0 -3
- package/storybook-static/1.1b179d27.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/1.1b179d27.iframe.bundle.js.map +0 -1
- package/storybook-static/1.c46d7d065aa0aa5a87ca.manager.bundle.js +0 -1
- package/storybook-static/10.99011d85.iframe.bundle.js +0 -3
- package/storybook-static/10.99011d85.iframe.bundle.js.LICENSE.txt +0 -11
- package/storybook-static/10.99011d85.iframe.bundle.js.map +0 -1
- package/storybook-static/2.35ddc55d.iframe.bundle.js +0 -1
- package/storybook-static/3.ed97833d.iframe.bundle.js +0 -1
- package/storybook-static/5.333e450fad8648669908.manager.bundle.js +0 -1
- package/storybook-static/6.505ea3c696ed314e90c8.manager.bundle.js +0 -2
- package/storybook-static/6.505ea3c696ed314e90c8.manager.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/7.94be8178.iframe.bundle.js +0 -1
- package/storybook-static/7.d26483fcb6f4087398a8.manager.bundle.js +0 -1
- package/storybook-static/8.68cd1217.iframe.bundle.js +0 -3
- package/storybook-static/8.68cd1217.iframe.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/8.68cd1217.iframe.bundle.js.map +0 -1
- package/storybook-static/8.7adf0ef161215cd35a66.manager.bundle.js +0 -1
- package/storybook-static/9.488e3969.iframe.bundle.js +0 -1
- package/storybook-static/fonts/FontAwesome.otf +0 -0
- package/storybook-static/fonts/OFL.txt +0 -92
- package/storybook-static/fonts/Rubik-Black.ttf +0 -0
- package/storybook-static/fonts/Rubik-BlackItalic.ttf +0 -0
- package/storybook-static/fonts/Rubik-Bold.ttf +0 -0
- package/storybook-static/fonts/Rubik-BoldItalic.ttf +0 -0
- package/storybook-static/fonts/Rubik-Italic.ttf +0 -0
- package/storybook-static/fonts/Rubik-Light.ttf +0 -0
- package/storybook-static/fonts/Rubik-LightItalic.ttf +0 -0
- package/storybook-static/fonts/Rubik-Medium.ttf +0 -0
- package/storybook-static/fonts/Rubik-MediumItalic.ttf +0 -0
- package/storybook-static/fonts/Rubik-Regular.ttf +0 -0
- package/storybook-static/fonts/fontawesome-webfont.eot +0 -0
- package/storybook-static/fonts/fontawesome-webfont.svg +0 -2671
- package/storybook-static/fonts/fontawesome-webfont.ttf +0 -0
- package/storybook-static/fonts/fontawesome-webfont.woff +0 -0
- package/storybook-static/fonts/fontawesome-webfont.woff2 +0 -0
- package/storybook-static/iframe.html +0 -348
- package/storybook-static/images/favicon/android-chrome-192x192.png +0 -0
- package/storybook-static/images/favicon/android-chrome-256x256.png +0 -0
- package/storybook-static/images/favicon/apple-touch-icon.png +0 -0
- package/storybook-static/images/favicon/browserconfig.xml +0 -9
- package/storybook-static/images/favicon/favicon-16x16.png +0 -0
- package/storybook-static/images/favicon/favicon-32x32.png +0 -0
- package/storybook-static/images/favicon/favicon.ico +0 -0
- package/storybook-static/images/favicon/manifest.json +0 -18
- package/storybook-static/images/favicon/mstile-150x150.png +0 -0
- package/storybook-static/images/favicon/safari-pinned-tab.svg +0 -32
- package/storybook-static/images/hhs-logo-black.svg +0 -10
- package/storybook-static/images/hhs-logo-white.svg +0 -10
- package/storybook-static/images/icons/close-x.svg +0 -6
- package/storybook-static/images/icons/help-headset.svg +0 -21
- package/storybook-static/images/icons/svg/arrow-down.svg +0 -1
- package/storybook-static/images/icons/svg/arrow-download.svg +0 -1
- package/storybook-static/images/icons/svg/arrow-right.svg +0 -1
- package/storybook-static/images/icons/svg/calendar.svg +0 -1
- package/storybook-static/images/icons/svg/close.svg +0 -1
- package/storybook-static/images/icons/svg/download.svg +0 -1
- package/storybook-static/images/icons/svg/external.svg +0 -1
- package/storybook-static/images/icons/svg/file-upload.svg +0 -1
- package/storybook-static/images/icons/svg/print.svg +0 -1
- package/storybook-static/images/icons/svg/search.svg +0 -7
- package/storybook-static/images/icons/svg/tooltip-question.svg +0 -6
- package/storybook-static/images/icons/svg/trash.svg +0 -1
- package/storybook-static/images/icons/svg/upload.svg +0 -1
- package/storybook-static/images/qpp_logo_reversed.png +0 -0
- package/storybook-static/images/qpp_logo_rgb_color.png +0 -0
- package/storybook-static/index.html +0 -59
- package/storybook-static/main.5ae8041695a4f0c06f75.manager.bundle.js +0 -1
- package/storybook-static/main.ee2cae16.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.7eeb017b9a4ce6a70a00.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.e2794f2d.iframe.bundle.js +0 -1
- package/storybook-static/static/media/Bitter-Bold.091bd4b7.woff +0 -0
- package/storybook-static/static/media/Bitter-Bold.24bf01e4.woff2 +0 -0
- package/storybook-static/static/media/Bitter-Bold.46bc29e4.ttf +0 -0
- package/storybook-static/static/media/Bitter-Bold.790f4f2f.eot +0 -0
- package/storybook-static/static/media/Bitter-Italic.1fa5390c.eot +0 -0
- package/storybook-static/static/media/Bitter-Italic.25e5675f.woff +0 -0
- package/storybook-static/static/media/Bitter-Italic.2eb18f5a.ttf +0 -0
- package/storybook-static/static/media/Bitter-Italic.34644574.woff2 +0 -0
- package/storybook-static/static/media/Bitter-Regular.4b22b6e8.woff +0 -0
- package/storybook-static/static/media/Bitter-Regular.559e7075.eot +0 -0
- package/storybook-static/static/media/Bitter-Regular.8db0301b.ttf +0 -0
- package/storybook-static/static/media/Bitter-Regular.f4e2f1f1.woff2 +0 -0
- package/storybook-static/static/media/FontAwesome.91f80bba.otf +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.202d819d.eot +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.92e570c6.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.da71e99a.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.e75949bb.woff +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.72daa33a.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.74ead3a8.woff +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.ae19388f.eot +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.ec7a2746.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.63a5fa7d.woff +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.66451be4.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.7882d20f.eot +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.ca4dd835.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.17ded75f.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.2a5adf6c.woff +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.6059fecb.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.c9808185.eot +0 -0
- package/storybook-static/static/media/Rubik-Bold.31bbd4d2.ttf +0 -0
- package/storybook-static/static/media/Rubik-Light.c90e2014.ttf +0 -0
- package/storybook-static/static/media/Rubik-Medium.5daa89aa.ttf +0 -0
- package/storybook-static/static/media/Rubik-Regular.cdf97d58.ttf +0 -0
- package/storybook-static/static/media/fontawesome-webfont.1e59d233.ttf +0 -0
- package/storybook-static/static/media/fontawesome-webfont.20fd1704.woff2 +0 -0
- package/storybook-static/static/media/fontawesome-webfont.8b43027f.eot +0 -0
- package/storybook-static/static/media/fontawesome-webfont.f691f37e.woff +0 -0
- package/storybook-static/vendors~main.c7e1bdf2e91d9cdba380.manager.bundle.js +0 -2
- package/storybook-static/vendors~main.c7e1bdf2e91d9cdba380.manager.bundle.js.LICENSE.txt +0 -104
- package/storybook-static/vendors~main.f299a23f.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.f299a23f.iframe.bundle.js.LICENSE.txt +0 -145
- package/storybook-static/vendors~main.f299a23f.iframe.bundle.js.map +0 -1
|
@@ -156,7 +156,9 @@
|
|
|
156
156
|
<a name='L91'></a><a href='#L91'>91</a>
|
|
157
157
|
<a name='L92'></a><a href='#L92'>92</a>
|
|
158
158
|
<a name='L93'></a><a href='#L93'>93</a>
|
|
159
|
-
<a name='L94'></a><a href='#L94'>94</a
|
|
159
|
+
<a name='L94'></a><a href='#L94'>94</a>
|
|
160
|
+
<a name='L95'></a><a href='#L95'>95</a>
|
|
161
|
+
<a name='L96'></a><a href='#L96'>96</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
160
162
|
<span class="cline-any cline-neutral"> </span>
|
|
161
163
|
<span class="cline-any cline-neutral"> </span>
|
|
162
164
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -234,6 +236,8 @@
|
|
|
234
236
|
<span class="cline-any cline-neutral"> </span>
|
|
235
237
|
<span class="cline-any cline-neutral"> </span>
|
|
236
238
|
<span class="cline-any cline-neutral"> </span>
|
|
239
|
+
<span class="cline-any cline-neutral"> </span>
|
|
240
|
+
<span class="cline-any cline-neutral"> </span>
|
|
237
241
|
<span class="cline-any cline-yes">3x</span>
|
|
238
242
|
<span class="cline-any cline-neutral"> </span>
|
|
239
243
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -249,96 +253,98 @@
|
|
|
249
253
|
<span class="cline-any cline-neutral"> </span>
|
|
250
254
|
<span class="cline-any cline-neutral"> </span>
|
|
251
255
|
<span class="cline-any cline-neutral"> </span>
|
|
252
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useState, useRef, useEffect } from
|
|
253
|
-
import PropTypes from
|
|
254
|
-
import { Chevron } from
|
|
256
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useState, useRef, useEffect } from "react";
|
|
257
|
+
import PropTypes from "prop-types";
|
|
258
|
+
import { Chevron } from "../../lib/Chevron.jsx";
|
|
255
259
|
|
|
256
260
|
const Accordion = (props) => {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
<span class="cstat-no" title="statement not covered" >
|
|
262
|
-
<span class="cstat-no" title="statement not covered" >
|
|
263
|
-
|
|
264
|
-
<span class="cstat-no" title="statement not covered" >
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
function <span class="fstat-no" title="function not covered" >toggleAccordion(</span>) {
|
|
270
|
-
<span class="cstat-no" title="statement not covered" > setActiveState(setActive === '' ? 'active' : '');</span>
|
|
271
|
-
}
|
|
261
|
+
const content = useRef(null);
|
|
262
|
+
const [setActive, setActiveState] = useState(props.isOpen ? <span class="branch-0 cbranch-no" title="branch not covered" >"active" </span>: "");
|
|
263
|
+
const ariaPressed = setActive ? <span class="branch-0 cbranch-no" title="branch not covered" >"true" </span>: "false";
|
|
264
|
+
const getHeight = <span class="fstat-no" title="function not covered" >(n</span>ode) => {
|
|
265
|
+
<span class="cstat-no" title="statement not covered" > if (node) {</span>
|
|
266
|
+
<span class="cstat-no" title="statement not covered" > return `${node.scrollHeight}px`;</span>
|
|
267
|
+
}
|
|
268
|
+
<span class="cstat-no" title="statement not covered" > return "auto";</span>
|
|
269
|
+
};
|
|
270
|
+
const height = setActive ? <span class="branch-0 cbranch-no" title="branch not covered" >getHeight(content.current) </span>: "0px";
|
|
271
|
+
const rotate = setActive ? <span class="branch-0 cbranch-no" title="branch not covered" >"accordion-icon rotate" </span>: "accordion-icon";
|
|
272
272
|
|
|
273
|
-
|
|
274
|
-
<span class="cstat-no" title="statement not covered" >
|
|
275
|
-
|
|
273
|
+
function <span class="fstat-no" title="function not covered" >toggleAccordion(</span>) {
|
|
274
|
+
<span class="cstat-no" title="statement not covered" > setActiveState(setActive === "" ? "active" : "");</span>
|
|
275
|
+
}
|
|
276
276
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
function <span class="fstat-no" title="function not covered" >openAccordion(</span>) {
|
|
278
|
+
<span class="cstat-no" title="statement not covered" > setActiveState("active");</span>
|
|
279
|
+
}
|
|
280
280
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
<span class="cstat-no" title="statement not covered" > openAccordion();</span>
|
|
284
|
-
} else {
|
|
285
|
-
closeAccordion();
|
|
281
|
+
function closeAccordion() {
|
|
282
|
+
setActiveState("");
|
|
286
283
|
}
|
|
287
|
-
}, [props.isOpen]);
|
|
288
284
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
285
|
+
useEffect(() => {
|
|
286
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (props.isOpen) {
|
|
287
|
+
<span class="cstat-no" title="statement not covered" > openAccordion();</span>
|
|
288
|
+
} else {
|
|
289
|
+
closeAccordion();
|
|
290
|
+
}
|
|
291
|
+
}, [props.isOpen]);
|
|
292
|
+
|
|
293
|
+
return (
|
|
294
|
+
<div className="accordion-section" data-testid="accordion">
|
|
295
|
+
<button
|
|
296
|
+
className={`accordion ${setActive}`}
|
|
297
|
+
aria-label={props.title}
|
|
298
|
+
aria-pressed={ariaPressed}
|
|
299
|
+
aria-expanded={ariaPressed}
|
|
300
|
+
tabIndex="0"
|
|
301
|
+
onClick={toggleAccordion}
|
|
302
|
+
>
|
|
303
|
+
<div className="accordion-left-title">
|
|
304
|
+
<p className="accordion-title">{props.title}</p>
|
|
305
|
+
{props.subTitle && (
|
|
306
|
+
<span class="branch-1 cbranch-no" title="branch not covered" > <p className="accordion-subtitle">{props.subTitle}</p></span>
|
|
307
|
+
)}
|
|
308
|
+
</div>
|
|
309
|
+
{props.centerItem && (
|
|
310
|
+
<span class="branch-1 cbranch-no" title="branch not covered" > <div className="accordion-center"></span>
|
|
311
|
+
<p>{props.centerItem}</p>
|
|
312
|
+
</div>
|
|
313
|
+
)}
|
|
314
|
+
{props.rightItem && (
|
|
315
|
+
<span class="branch-1 cbranch-no" title="branch not covered" > <div className="accordion-right"></span>
|
|
316
|
+
<p>{props.rightItem}</p>
|
|
317
|
+
</div>
|
|
318
|
+
)}
|
|
319
|
+
<div className="chevron-container">
|
|
320
|
+
<Chevron className={rotate} />
|
|
321
|
+
</div>
|
|
322
|
+
</button>
|
|
323
|
+
<div
|
|
324
|
+
ref={content}
|
|
325
|
+
style={{ maxHeight: height }}
|
|
326
|
+
className="accordion-content"
|
|
327
|
+
>
|
|
328
|
+
<div className="accordion-text dashed-border">
|
|
329
|
+
{props.children}
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
317
332
|
</div>
|
|
318
|
-
|
|
319
|
-
<div
|
|
320
|
-
ref={content}
|
|
321
|
-
style={{ maxHeight: height }}
|
|
322
|
-
className="accordion-content"
|
|
323
|
-
>
|
|
324
|
-
<div className="accordion-text dashed-border">{props.children}</div>
|
|
325
|
-
</div>
|
|
326
|
-
</div>
|
|
327
|
-
);
|
|
333
|
+
);
|
|
328
334
|
};
|
|
329
335
|
|
|
330
336
|
Accordion.propTypes = {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
+
title: PropTypes.string.isRequired,
|
|
338
|
+
subTitle: PropTypes.string,
|
|
339
|
+
children: PropTypes.any.isRequired,
|
|
340
|
+
centerItem: PropTypes.string,
|
|
341
|
+
rightItem: PropTypes.string,
|
|
342
|
+
isOpen: PropTypes.bool,
|
|
337
343
|
};
|
|
338
344
|
|
|
339
345
|
Accordion.defaultProps = {
|
|
340
|
-
|
|
341
|
-
|
|
346
|
+
title: "",
|
|
347
|
+
isOpen: false,
|
|
342
348
|
};
|
|
343
349
|
|
|
344
350
|
export default Accordion;
|
|
@@ -349,7 +355,7 @@ export default Accordion;
|
|
|
349
355
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
350
356
|
Code coverage generated by
|
|
351
357
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
352
|
-
at
|
|
358
|
+
at Thu Mar 24 2022 11:31:04 GMT-0700 (Pacific Daylight Time)
|
|
353
359
|
</div>
|
|
354
360
|
<script src="../../../prettify.js"></script>
|
|
355
361
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Thu Mar 24 2022 11:31:04 GMT-0700 (Pacific Daylight Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -243,93 +243,93 @@
|
|
|
243
243
|
<span class="cline-any cline-neutral"> </span>
|
|
244
244
|
<span class="cline-any cline-neutral"> </span>
|
|
245
245
|
<span class="cline-any cline-neutral"> </span>
|
|
246
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React from
|
|
247
|
-
import PropTypes from
|
|
246
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React from "react";
|
|
247
|
+
import PropTypes from "prop-types";
|
|
248
248
|
|
|
249
|
-
const VARIANTS = [
|
|
250
|
-
const SIZES = [
|
|
249
|
+
const VARIANTS = ["secondary", "outline", "danger", "white"];
|
|
250
|
+
const SIZES = ["big"];
|
|
251
251
|
|
|
252
252
|
const Button = <span class="fstat-no" title="function not covered" >({</span>
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
253
|
+
children,
|
|
254
|
+
className,
|
|
255
|
+
href,
|
|
256
|
+
loading,
|
|
257
|
+
onClick,
|
|
258
|
+
size,
|
|
259
|
+
variant,
|
|
260
|
+
type,
|
|
261
|
+
...rest
|
|
262
262
|
}) => {
|
|
263
|
-
|
|
263
|
+
let btnClass = <span class="cstat-no" title="statement not covered" >"qpp-c-button";</span>
|
|
264
264
|
|
|
265
|
-
<span class="cstat-no" title="statement not covered" >
|
|
266
|
-
<span class="cstat-no" title="statement not covered" >
|
|
267
|
-
|
|
268
|
-
<span class="cstat-no" title="statement not covered" >
|
|
269
|
-
<span class="cstat-no" title="statement not covered" >
|
|
270
|
-
|
|
271
|
-
<span class="cstat-no" title="statement not covered" >
|
|
272
|
-
<span class="cstat-no" title="statement not covered" >
|
|
273
|
-
|
|
265
|
+
<span class="cstat-no" title="statement not covered" > if (VARIANTS.includes(variant)) {</span>
|
|
266
|
+
<span class="cstat-no" title="statement not covered" > btnClass = btnClass.concat(" ", `qpp-c-button--${variant}`);</span>
|
|
267
|
+
}
|
|
268
|
+
<span class="cstat-no" title="statement not covered" > if (SIZES.includes(size)) {</span>
|
|
269
|
+
<span class="cstat-no" title="statement not covered" > btnClass = btnClass.concat(" ", `qpp-c-button--${size}`);</span>
|
|
270
|
+
}
|
|
271
|
+
<span class="cstat-no" title="statement not covered" > if (className) {</span>
|
|
272
|
+
<span class="cstat-no" title="statement not covered" > btnClass = btnClass.concat(" ", className);</span>
|
|
273
|
+
}
|
|
274
274
|
|
|
275
|
-
<span class="cstat-no" title="statement not covered" >
|
|
275
|
+
<span class="cstat-no" title="statement not covered" > if (href) {</span>
|
|
276
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
277
|
+
<a
|
|
278
|
+
href={href}
|
|
279
|
+
data-testid="ds-btn"
|
|
280
|
+
className={btnClass || ""}
|
|
281
|
+
onClick={onClick}
|
|
282
|
+
>
|
|
283
|
+
{children}
|
|
284
|
+
</a>
|
|
285
|
+
);
|
|
286
|
+
}
|
|
276
287
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
288
|
+
<button
|
|
289
|
+
data-testid="ds-btn"
|
|
290
|
+
className={btnClass || ""}
|
|
291
|
+
onClick={onClick}
|
|
292
|
+
disabled={loading}
|
|
293
|
+
type={type}
|
|
294
|
+
{...rest}
|
|
295
|
+
>
|
|
296
|
+
{children}
|
|
297
|
+
</button>
|
|
285
298
|
);
|
|
286
|
-
}
|
|
287
|
-
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
288
|
-
<button
|
|
289
|
-
data-testid="ds-btn"
|
|
290
|
-
className={btnClass || ''}
|
|
291
|
-
onClick={onClick}
|
|
292
|
-
disabled={loading}
|
|
293
|
-
type={type}
|
|
294
|
-
{...rest}
|
|
295
|
-
>
|
|
296
|
-
{children}
|
|
297
|
-
</button>
|
|
298
|
-
);
|
|
299
299
|
};
|
|
300
300
|
|
|
301
301
|
Button.propTypes = {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
302
|
+
children: PropTypes.node,
|
|
303
|
+
className: PropTypes.string,
|
|
304
|
+
href: PropTypes.string,
|
|
305
|
+
loading: PropTypes.bool,
|
|
306
|
+
onClick: PropTypes.func,
|
|
307
|
+
size: PropTypes.oneOf(SIZES),
|
|
308
|
+
type: PropTypes.string,
|
|
309
|
+
variant: PropTypes.oneOf(VARIANTS),
|
|
310
310
|
};
|
|
311
311
|
|
|
312
312
|
Button.defaultProps = {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
313
|
+
children: false,
|
|
314
|
+
className: "",
|
|
315
|
+
href: "",
|
|
316
|
+
loading: false,
|
|
317
|
+
onClick: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >null,</span>
|
|
318
|
+
size: null,
|
|
319
|
+
type: "button",
|
|
320
|
+
variant: null,
|
|
321
321
|
};
|
|
322
322
|
|
|
323
|
-
export const TextButton = <span class="fstat-no" title="function not covered" >({</span> className = <span class="branch-0 cbranch-no" title="branch not covered" >
|
|
324
|
-
<span class="cstat-no" title="statement not covered" >
|
|
323
|
+
export const TextButton = <span class="fstat-no" title="function not covered" >({</span> className = <span class="branch-0 cbranch-no" title="branch not covered" >"",</span> ...props }) => (
|
|
324
|
+
<span class="cstat-no" title="statement not covered" > <Button className={`qpp-c-button--text ${className}`} {...props} /></span>
|
|
325
325
|
);
|
|
326
326
|
|
|
327
327
|
TextButton.propTypes = {
|
|
328
|
-
|
|
328
|
+
className: PropTypes.string,
|
|
329
329
|
};
|
|
330
330
|
|
|
331
331
|
TextButton.defaultProps = {
|
|
332
|
-
|
|
332
|
+
className: "",
|
|
333
333
|
};
|
|
334
334
|
|
|
335
335
|
export default Button;
|
|
@@ -340,7 +340,7 @@ export default Button;
|
|
|
340
340
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
341
341
|
Code coverage generated by
|
|
342
342
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
343
|
-
at
|
|
343
|
+
at Thu Mar 24 2022 11:31:04 GMT-0700 (Pacific Daylight Time)
|
|
344
344
|
</div>
|
|
345
345
|
<script src="../../../prettify.js"></script>
|
|
346
346
|
<script>
|
|
@@ -151,7 +151,12 @@
|
|
|
151
151
|
<a name='L86'></a><a href='#L86'>86</a>
|
|
152
152
|
<a name='L87'></a><a href='#L87'>87</a>
|
|
153
153
|
<a name='L88'></a><a href='#L88'>88</a>
|
|
154
|
-
<a name='L89'></a><a href='#L89'>89</a
|
|
154
|
+
<a name='L89'></a><a href='#L89'>89</a>
|
|
155
|
+
<a name='L90'></a><a href='#L90'>90</a>
|
|
156
|
+
<a name='L91'></a><a href='#L91'>91</a>
|
|
157
|
+
<a name='L92'></a><a href='#L92'>92</a>
|
|
158
|
+
<a name='L93'></a><a href='#L93'>93</a>
|
|
159
|
+
<a name='L94'></a><a href='#L94'>94</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
155
160
|
<span class="cline-any cline-neutral"> </span>
|
|
156
161
|
<span class="cline-any cline-neutral"> </span>
|
|
157
162
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -180,11 +185,15 @@
|
|
|
180
185
|
<span class="cline-any cline-neutral"> </span>
|
|
181
186
|
<span class="cline-any cline-neutral"> </span>
|
|
182
187
|
<span class="cline-any cline-neutral"> </span>
|
|
188
|
+
<span class="cline-any cline-neutral"> </span>
|
|
189
|
+
<span class="cline-any cline-neutral"> </span>
|
|
183
190
|
<span class="cline-any cline-yes">2x</span>
|
|
184
191
|
<span class="cline-any cline-yes">2x</span>
|
|
185
192
|
<span class="cline-any cline-neutral"> </span>
|
|
186
193
|
<span class="cline-any cline-neutral"> </span>
|
|
187
194
|
<span class="cline-any cline-neutral"> </span>
|
|
195
|
+
<span class="cline-any cline-neutral"> </span>
|
|
196
|
+
<span class="cline-any cline-neutral"> </span>
|
|
188
197
|
<span class="cline-any cline-no"> </span>
|
|
189
198
|
<span class="cline-any cline-neutral"> </span>
|
|
190
199
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -239,91 +248,97 @@
|
|
|
239
248
|
<span class="cline-any cline-neutral"> </span>
|
|
240
249
|
<span class="cline-any cline-neutral"> </span>
|
|
241
250
|
<span class="cline-any cline-neutral"> </span>
|
|
242
|
-
<span class="cline-any cline-neutral"> </span
|
|
243
|
-
import
|
|
251
|
+
<span class="cline-any cline-neutral"> </span>
|
|
252
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { Component } from "react";
|
|
253
|
+
import PropTypes from "prop-types";
|
|
244
254
|
|
|
245
255
|
class Collapsible extends Component {
|
|
246
|
-
|
|
247
|
-
|
|
256
|
+
constructor(props) {
|
|
257
|
+
super(props);
|
|
248
258
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
259
|
+
this.state = {
|
|
260
|
+
isExpanded: false,
|
|
261
|
+
};
|
|
252
262
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
263
|
+
this._toggleExpanded = this.toggleExpanded.bind(this);
|
|
264
|
+
this._renderShowButton = this.renderShowButton.bind(this);
|
|
265
|
+
this._renderHideButton = this.renderHideButton.bind(this);
|
|
266
|
+
}
|
|
257
267
|
|
|
258
|
-
<span class="fstat-no" title="function not covered" >
|
|
259
|
-
<span class="cstat-no" title="statement not covered" >
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
268
|
+
<span class="fstat-no" title="function not covered" > to</span>ggleExpanded() {
|
|
269
|
+
<span class="cstat-no" title="statement not covered" > this.setState({</span>
|
|
270
|
+
isExpanded: !this.state.isExpanded,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
263
273
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
274
|
+
renderShowButton() {
|
|
275
|
+
return (
|
|
276
|
+
<span className="collapsible-show-label">
|
|
277
|
+
{this.props.showLabel}
|
|
278
|
+
</span>
|
|
279
|
+
);
|
|
280
|
+
}
|
|
269
281
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
282
|
+
renderHideButton() {
|
|
283
|
+
if (this.props.hideLabel) {
|
|
284
|
+
return (
|
|
285
|
+
<span className="collapsible-hide-label">
|
|
286
|
+
{this.props.hideLabel}
|
|
287
|
+
</span>
|
|
288
|
+
);
|
|
289
|
+
} else <span class="missing-if-branch" title="else path not taken" >E</span>{
|
|
290
|
+
<span class="cstat-no" title="statement not covered" > return "";</span>
|
|
291
|
+
}
|
|
277
292
|
}
|
|
278
|
-
}
|
|
279
293
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
294
|
+
render() {
|
|
295
|
+
const isArray = Array.isArray(this.props.content);
|
|
296
|
+
const isHidden = this.state.isExpanded ? <span class="branch-0 cbranch-no" title="branch not covered" >undefined </span>: true;
|
|
283
297
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
298
|
+
return (
|
|
299
|
+
<div className="collapsible-container">
|
|
300
|
+
<button
|
|
301
|
+
onClick={this._toggleExpanded}
|
|
302
|
+
className="collapsible-summary"
|
|
303
|
+
type="button"
|
|
304
|
+
aria-expanded={this.state.isExpanded ? <span class="branch-0 cbranch-no" title="branch not covered" >true </span>: false}
|
|
305
|
+
>
|
|
306
|
+
{this._renderShowButton()}
|
|
307
|
+
{this._renderHideButton()}
|
|
308
|
+
</button>
|
|
295
309
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
310
|
+
<div className="collapsible-details" hidden={isHidden}>
|
|
311
|
+
{isArray ? (
|
|
312
|
+
<ul className="items">
|
|
313
|
+
{this.props.content.map((c) => (
|
|
314
|
+
<li key={c.contentTitle}>
|
|
315
|
+
<p>
|
|
316
|
+
<b>{c.contentTitle}</b>
|
|
317
|
+
</p>
|
|
318
|
+
<p>{c.content}</p>
|
|
319
|
+
</li>
|
|
320
|
+
))}
|
|
321
|
+
</ul>
|
|
322
|
+
) : (
|
|
323
|
+
<div>
|
|
324
|
+
<p>
|
|
325
|
+
<b>{this.props.contentTitle}</b>
|
|
326
|
+
</p>
|
|
327
|
+
<p>{this.props.content}</p>
|
|
328
|
+
</div>
|
|
329
|
+
)}
|
|
330
|
+
</div>
|
|
314
331
|
</div>
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
</div>
|
|
318
|
-
);
|
|
319
|
-
}
|
|
332
|
+
);
|
|
333
|
+
}
|
|
320
334
|
}
|
|
321
335
|
|
|
322
336
|
Collapsible.propTypes = {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
337
|
+
showLabel: PropTypes.string.isRequired,
|
|
338
|
+
hideLabel: PropTypes.string.isRequired,
|
|
339
|
+
content: PropTypes.oneOfType([PropTypes.array, PropTypes.string])
|
|
340
|
+
.isRequired,
|
|
341
|
+
contentTitle: PropTypes.string,
|
|
327
342
|
};
|
|
328
343
|
|
|
329
344
|
export default Collapsible;
|
|
@@ -334,7 +349,7 @@ export default Collapsible;
|
|
|
334
349
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
335
350
|
Code coverage generated by
|
|
336
351
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
337
|
-
at
|
|
352
|
+
at Thu Mar 24 2022 11:31:04 GMT-0700 (Pacific Daylight Time)
|
|
338
353
|
</div>
|
|
339
354
|
<script src="../../../prettify.js"></script>
|
|
340
355
|
<script>
|