@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
|
@@ -312,7 +312,43 @@
|
|
|
312
312
|
<a name='L247'></a><a href='#L247'>247</a>
|
|
313
313
|
<a name='L248'></a><a href='#L248'>248</a>
|
|
314
314
|
<a name='L249'></a><a href='#L249'>249</a>
|
|
315
|
-
<a name='L250'></a><a href='#L250'>250</a
|
|
315
|
+
<a name='L250'></a><a href='#L250'>250</a>
|
|
316
|
+
<a name='L251'></a><a href='#L251'>251</a>
|
|
317
|
+
<a name='L252'></a><a href='#L252'>252</a>
|
|
318
|
+
<a name='L253'></a><a href='#L253'>253</a>
|
|
319
|
+
<a name='L254'></a><a href='#L254'>254</a>
|
|
320
|
+
<a name='L255'></a><a href='#L255'>255</a>
|
|
321
|
+
<a name='L256'></a><a href='#L256'>256</a>
|
|
322
|
+
<a name='L257'></a><a href='#L257'>257</a>
|
|
323
|
+
<a name='L258'></a><a href='#L258'>258</a>
|
|
324
|
+
<a name='L259'></a><a href='#L259'>259</a>
|
|
325
|
+
<a name='L260'></a><a href='#L260'>260</a>
|
|
326
|
+
<a name='L261'></a><a href='#L261'>261</a>
|
|
327
|
+
<a name='L262'></a><a href='#L262'>262</a>
|
|
328
|
+
<a name='L263'></a><a href='#L263'>263</a>
|
|
329
|
+
<a name='L264'></a><a href='#L264'>264</a>
|
|
330
|
+
<a name='L265'></a><a href='#L265'>265</a>
|
|
331
|
+
<a name='L266'></a><a href='#L266'>266</a>
|
|
332
|
+
<a name='L267'></a><a href='#L267'>267</a>
|
|
333
|
+
<a name='L268'></a><a href='#L268'>268</a>
|
|
334
|
+
<a name='L269'></a><a href='#L269'>269</a>
|
|
335
|
+
<a name='L270'></a><a href='#L270'>270</a>
|
|
336
|
+
<a name='L271'></a><a href='#L271'>271</a>
|
|
337
|
+
<a name='L272'></a><a href='#L272'>272</a>
|
|
338
|
+
<a name='L273'></a><a href='#L273'>273</a>
|
|
339
|
+
<a name='L274'></a><a href='#L274'>274</a>
|
|
340
|
+
<a name='L275'></a><a href='#L275'>275</a>
|
|
341
|
+
<a name='L276'></a><a href='#L276'>276</a>
|
|
342
|
+
<a name='L277'></a><a href='#L277'>277</a>
|
|
343
|
+
<a name='L278'></a><a href='#L278'>278</a>
|
|
344
|
+
<a name='L279'></a><a href='#L279'>279</a>
|
|
345
|
+
<a name='L280'></a><a href='#L280'>280</a>
|
|
346
|
+
<a name='L281'></a><a href='#L281'>281</a>
|
|
347
|
+
<a name='L282'></a><a href='#L282'>282</a>
|
|
348
|
+
<a name='L283'></a><a href='#L283'>283</a>
|
|
349
|
+
<a name='L284'></a><a href='#L284'>284</a>
|
|
350
|
+
<a name='L285'></a><a href='#L285'>285</a>
|
|
351
|
+
<a name='L286'></a><a href='#L286'>286</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
316
352
|
<span class="cline-any cline-neutral"> </span>
|
|
317
353
|
<span class="cline-any cline-neutral"> </span>
|
|
318
354
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -404,6 +440,8 @@
|
|
|
404
440
|
<span class="cline-any cline-neutral"> </span>
|
|
405
441
|
<span class="cline-any cline-neutral"> </span>
|
|
406
442
|
<span class="cline-any cline-neutral"> </span>
|
|
443
|
+
<span class="cline-any cline-neutral"> </span>
|
|
444
|
+
<span class="cline-any cline-neutral"> </span>
|
|
407
445
|
<span class="cline-any cline-no"> </span>
|
|
408
446
|
<span class="cline-any cline-no"> </span>
|
|
409
447
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -420,6 +458,8 @@
|
|
|
420
458
|
<span class="cline-any cline-no"> </span>
|
|
421
459
|
<span class="cline-any cline-neutral"> </span>
|
|
422
460
|
<span class="cline-any cline-neutral"> </span>
|
|
461
|
+
<span class="cline-any cline-neutral"> </span>
|
|
462
|
+
<span class="cline-any cline-neutral"> </span>
|
|
423
463
|
<span class="cline-any cline-no"> </span>
|
|
424
464
|
<span class="cline-any cline-no"> </span>
|
|
425
465
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -467,6 +507,7 @@
|
|
|
467
507
|
<span class="cline-any cline-neutral"> </span>
|
|
468
508
|
<span class="cline-any cline-neutral"> </span>
|
|
469
509
|
<span class="cline-any cline-neutral"> </span>
|
|
510
|
+
<span class="cline-any cline-neutral"> </span>
|
|
470
511
|
<span class="cline-any cline-no"> </span>
|
|
471
512
|
<span class="cline-any cline-neutral"> </span>
|
|
472
513
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -492,6 +533,16 @@
|
|
|
492
533
|
<span class="cline-any cline-neutral"> </span>
|
|
493
534
|
<span class="cline-any cline-neutral"> </span>
|
|
494
535
|
<span class="cline-any cline-neutral"> </span>
|
|
536
|
+
<span class="cline-any cline-neutral"> </span>
|
|
537
|
+
<span class="cline-any cline-neutral"> </span>
|
|
538
|
+
<span class="cline-any cline-neutral"> </span>
|
|
539
|
+
<span class="cline-any cline-neutral"> </span>
|
|
540
|
+
<span class="cline-any cline-neutral"> </span>
|
|
541
|
+
<span class="cline-any cline-neutral"> </span>
|
|
542
|
+
<span class="cline-any cline-neutral"> </span>
|
|
543
|
+
<span class="cline-any cline-neutral"> </span>
|
|
544
|
+
<span class="cline-any cline-neutral"> </span>
|
|
545
|
+
<span class="cline-any cline-neutral"> </span>
|
|
495
546
|
<span class="cline-any cline-no"> </span>
|
|
496
547
|
<span class="cline-any cline-neutral"> </span>
|
|
497
548
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -538,6 +589,27 @@
|
|
|
538
589
|
<span class="cline-any cline-neutral"> </span>
|
|
539
590
|
<span class="cline-any cline-neutral"> </span>
|
|
540
591
|
<span class="cline-any cline-neutral"> </span>
|
|
592
|
+
<span class="cline-any cline-neutral"> </span>
|
|
593
|
+
<span class="cline-any cline-neutral"> </span>
|
|
594
|
+
<span class="cline-any cline-neutral"> </span>
|
|
595
|
+
<span class="cline-any cline-neutral"> </span>
|
|
596
|
+
<span class="cline-any cline-neutral"> </span>
|
|
597
|
+
<span class="cline-any cline-neutral"> </span>
|
|
598
|
+
<span class="cline-any cline-neutral"> </span>
|
|
599
|
+
<span class="cline-any cline-neutral"> </span>
|
|
600
|
+
<span class="cline-any cline-neutral"> </span>
|
|
601
|
+
<span class="cline-any cline-neutral"> </span>
|
|
602
|
+
<span class="cline-any cline-neutral"> </span>
|
|
603
|
+
<span class="cline-any cline-neutral"> </span>
|
|
604
|
+
<span class="cline-any cline-neutral"> </span>
|
|
605
|
+
<span class="cline-any cline-neutral"> </span>
|
|
606
|
+
<span class="cline-any cline-neutral"> </span>
|
|
607
|
+
<span class="cline-any cline-neutral"> </span>
|
|
608
|
+
<span class="cline-any cline-neutral"> </span>
|
|
609
|
+
<span class="cline-any cline-neutral"> </span>
|
|
610
|
+
<span class="cline-any cline-neutral"> </span>
|
|
611
|
+
<span class="cline-any cline-neutral"> </span>
|
|
612
|
+
<span class="cline-any cline-neutral"> </span>
|
|
541
613
|
<span class="cline-any cline-yes">2x</span>
|
|
542
614
|
<span class="cline-any cline-neutral"> </span>
|
|
543
615
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -561,252 +633,288 @@
|
|
|
561
633
|
<span class="cline-any cline-neutral"> </span>
|
|
562
634
|
<span class="cline-any cline-neutral"> </span>
|
|
563
635
|
<span class="cline-any cline-neutral"> </span>
|
|
564
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useState, useEffect } from
|
|
565
|
-
import PropTypes from
|
|
636
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useState, useEffect } from "react";
|
|
637
|
+
import PropTypes from "prop-types";
|
|
566
638
|
|
|
567
|
-
import { handleNavigation } from
|
|
568
|
-
import AnimationGroup from
|
|
639
|
+
import { handleNavigation } from "../helpers";
|
|
640
|
+
import AnimationGroup from "../AnimationGroup/AnimationGroup";
|
|
569
641
|
|
|
570
642
|
const NavLinkDrawer = <span class="fstat-no" title="function not covered" >({</span>
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
643
|
+
className,
|
|
644
|
+
disabled,
|
|
645
|
+
isAlwaysOpen,
|
|
646
|
+
isExpanded,
|
|
647
|
+
items,
|
|
648
|
+
label,
|
|
649
|
+
leftIcon,
|
|
650
|
+
linkActiveFunc,
|
|
651
|
+
linkCallback,
|
|
652
|
+
listOfLinks,
|
|
653
|
+
openByDefault,
|
|
654
|
+
rightIcon,
|
|
655
|
+
sidebarExpand,
|
|
656
|
+
staticDrawer,
|
|
657
|
+
url,
|
|
658
|
+
isHighlighted,
|
|
659
|
+
darkerBackground,
|
|
660
|
+
leftBorderHighlightDisabled,
|
|
661
|
+
largerDrawerBottomPadding,
|
|
590
662
|
}) => {
|
|
591
|
-
|
|
663
|
+
const [isOpen, setIsOpen] = <span class="cstat-no" title="statement not covered" >useState(openByDefault);</span>
|
|
592
664
|
|
|
593
|
-
|
|
594
|
-
<span class="cstat-no" title="statement not covered" >
|
|
595
|
-
<span class="cstat-no" title="statement not covered" >
|
|
596
|
-
<span class="cstat-no" title="statement not covered" >
|
|
597
|
-
<span class="cstat-no" title="statement not covered" >
|
|
598
|
-
|
|
665
|
+
const toggleDrawer = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
666
|
+
<span class="cstat-no" title="statement not covered" > if (!isExpanded && typeof sidebarExpand === "function") {</span>
|
|
667
|
+
<span class="cstat-no" title="statement not covered" > sidebarExpand();</span>
|
|
668
|
+
<span class="cstat-no" title="statement not covered" > setIsOpen(true);</span>
|
|
669
|
+
<span class="cstat-no" title="statement not covered" > return;</span>
|
|
670
|
+
}
|
|
599
671
|
|
|
600
|
-
<span class="cstat-no" title="statement not covered" >
|
|
601
|
-
<span class="cstat-no" title="statement not covered" >
|
|
602
|
-
|
|
603
|
-
|
|
672
|
+
<span class="cstat-no" title="statement not covered" > if (!isAlwaysOpen && !disabled) {</span>
|
|
673
|
+
<span class="cstat-no" title="statement not covered" > setIsOpen(!isOpen);</span>
|
|
674
|
+
}
|
|
675
|
+
};
|
|
604
676
|
|
|
605
|
-
|
|
606
|
-
<span class="cstat-no" title="statement not covered" >
|
|
607
|
-
<span class="cstat-no" title="statement not covered" >
|
|
608
|
-
|
|
609
|
-
<span class="cstat-no" title="statement not covered" >
|
|
610
|
-
|
|
677
|
+
const isLinkActive = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(l</span>ink, func) => {</span>
|
|
678
|
+
<span class="cstat-no" title="statement not covered" > if (typeof func === "function") {</span>
|
|
679
|
+
<span class="cstat-no" title="statement not covered" > return func(link);</span>
|
|
680
|
+
}
|
|
681
|
+
<span class="cstat-no" title="statement not covered" > return window.location.href.indexOf(link.url) > 0;</span>
|
|
682
|
+
};
|
|
611
683
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
<span class="cstat-no" title="statement not covered" >
|
|
615
|
-
<span class="cstat-no" title="statement not covered" >
|
|
616
|
-
|
|
617
|
-
<span class="cstat-no" title="statement not covered" >
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
684
|
+
const isCurrentPage = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(l</span>ink, linkActiveFunc) => {</span>
|
|
685
|
+
const targetItems = <span class="cstat-no" title="statement not covered" >link.items || link.listOfLinks;</span>
|
|
686
|
+
<span class="cstat-no" title="statement not covered" > if (link.url && isLinkActive(link, linkActiveFunc)) {</span>
|
|
687
|
+
<span class="cstat-no" title="statement not covered" > return true;</span>
|
|
688
|
+
}
|
|
689
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
690
|
+
targetItems &&
|
|
691
|
+
targetItems.some(<span class="fstat-no" title="function not covered" >(i</span>tem) => <span class="cstat-no" title="statement not covered" >isCurrentPage(item, linkActiveFunc))</span>
|
|
692
|
+
);
|
|
693
|
+
};
|
|
622
694
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
<span class="cstat-no" title="statement not covered" > if (isAlwaysOpen) {</span>
|
|
627
|
-
<span class="cstat-no" title="statement not covered" > leftIcon += ` always-open`;</span>
|
|
628
|
-
}
|
|
695
|
+
const buildLeftIconClasses = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
696
|
+
let leftIcon = <span class="cstat-no" title="statement not covered" >`left-icon`;</span>
|
|
629
697
|
|
|
630
|
-
<span class="cstat-no" title="statement not covered" >
|
|
631
|
-
<span class="cstat-no" title="statement not covered" >
|
|
632
|
-
|
|
698
|
+
<span class="cstat-no" title="statement not covered" > if (isAlwaysOpen) {</span>
|
|
699
|
+
<span class="cstat-no" title="statement not covered" > leftIcon += ` always-open`;</span>
|
|
700
|
+
}
|
|
633
701
|
|
|
634
|
-
<span class="cstat-no" title="statement not covered" >
|
|
635
|
-
|
|
702
|
+
<span class="cstat-no" title="statement not covered" > if (isHighlighted) {</span>
|
|
703
|
+
<span class="cstat-no" title="statement not covered" > leftIcon += " fill-white";</span>
|
|
704
|
+
}
|
|
636
705
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
{ items, listOfLinks, url },
|
|
640
|
-
linkActiveFunc
|
|
641
|
-
);
|
|
642
|
-
const expandedClass = <span class="cstat-no" title="statement not covered" >currentPage ? 'expanded' : '';</span>
|
|
706
|
+
<span class="cstat-no" title="statement not covered" > return leftIcon;</span>
|
|
707
|
+
};
|
|
643
708
|
|
|
644
|
-
|
|
645
|
-
<span class="cstat-no" title="statement not covered" >
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
>
|
|
651
|
-
{leftIcon}
|
|
652
|
-
</svg>)
|
|
653
|
-
}
|
|
654
|
-
}
|
|
709
|
+
// Classes for the link drawer button
|
|
710
|
+
const currentPage = <span class="cstat-no" title="statement not covered" >isCurrentPage(</span>
|
|
711
|
+
{ items, listOfLinks, url },
|
|
712
|
+
linkActiveFunc
|
|
713
|
+
);
|
|
714
|
+
const expandedClass = <span class="cstat-no" title="statement not covered" >currentPage ? "expanded" : "";</span>
|
|
655
715
|
|
|
656
|
-
|
|
657
|
-
<span class="cstat-no" title="statement not covered" >
|
|
658
|
-
|
|
716
|
+
const renderLeftIcon = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(l</span>eftIcon) => {</span>
|
|
717
|
+
<span class="cstat-no" title="statement not covered" > if (leftIcon) {</span>
|
|
718
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
719
|
+
<svg
|
|
720
|
+
className={`${buildLeftIconClasses()}`}
|
|
721
|
+
aria-hidden="true"
|
|
722
|
+
focusable="false"
|
|
723
|
+
>
|
|
724
|
+
{leftIcon}
|
|
725
|
+
</svg>
|
|
726
|
+
);
|
|
727
|
+
}
|
|
728
|
+
};
|
|
659
729
|
|
|
660
|
-
|
|
661
|
-
<span class="cstat-no" title="statement not covered" >
|
|
662
|
-
|
|
730
|
+
const hasDarkerBackground = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(d</span>arkerBackground) => {</span>
|
|
731
|
+
<span class="cstat-no" title="statement not covered" > return darkerBackground ? "background-highlight" : "";</span>
|
|
732
|
+
};
|
|
663
733
|
|
|
664
|
-
|
|
665
|
-
<span class="cstat-no" title="statement not covered" >
|
|
666
|
-
|
|
734
|
+
const hasDarkerTitle = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(d</span>arkerBackground) => {</span>
|
|
735
|
+
<span class="cstat-no" title="statement not covered" > return darkerBackground ? "expanded currentPage" : "";</span>
|
|
736
|
+
};
|
|
667
737
|
|
|
668
|
-
|
|
669
|
-
<span class="cstat-no" title="statement not covered" >
|
|
670
|
-
|
|
738
|
+
const isLeftBorderHighlightDisabled = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(l</span>eftBorderHighlightDisabled) => {</span>
|
|
739
|
+
<span class="cstat-no" title="statement not covered" > return leftBorderHighlightDisabled ? "left-border-disabled" : "";</span>
|
|
740
|
+
};
|
|
671
741
|
|
|
672
|
-
|
|
673
|
-
<span class="cstat-no" title="statement not covered" >
|
|
674
|
-
|
|
742
|
+
const isHiddenWhileCollapsed = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(i</span>sLeftBorderDisabled, isExpanded) => {</span>
|
|
743
|
+
<span class="cstat-no" title="statement not covered" > return isLeftBorderDisabled && !isExpanded</span>
|
|
744
|
+
? "hidden-nav-link-item"
|
|
745
|
+
: "";
|
|
746
|
+
};
|
|
675
747
|
|
|
676
|
-
|
|
677
|
-
<span class="cstat-no" title="statement not covered" >
|
|
678
|
-
|
|
748
|
+
const highlightTitle = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(i</span>sHighlighted) => {</span>
|
|
749
|
+
<span class="cstat-no" title="statement not covered" > return isHighlighted && isExpanded ? "highlight" : "";</span>
|
|
750
|
+
};
|
|
679
751
|
|
|
680
|
-
|
|
681
|
-
<span class="cstat-no" title="statement not covered" >
|
|
682
|
-
|
|
752
|
+
const hasLargerDrawBottomPadding = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(l</span>argerDrawerBottomPadding) => {</span>
|
|
753
|
+
<span class="cstat-no" title="statement not covered" > return largerDrawerBottomPadding ? "larger-drawer-bottom-padding" : "";</span>
|
|
754
|
+
};
|
|
683
755
|
|
|
684
|
-
<span class="cstat-no" title="statement not covered"
|
|
685
|
-
<span class="cstat-no" title="statement not covered" >
|
|
686
|
-
|
|
687
|
-
}
|
|
688
|
-
<span class="cstat-no" title="statement not covered" > if (isAlwaysOpen) {</span>
|
|
689
|
-
<span class="cstat-no" title="statement not covered" > setIsOpen(isAlwaysOpen);</span>
|
|
690
|
-
}
|
|
691
|
-
}, []);
|
|
756
|
+
const adjustItemSpacing = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(l</span>argerDrawerBottomPadding) => {</span>
|
|
757
|
+
<span class="cstat-no" title="statement not covered" > return largerDrawerBottomPadding ? "larger-item-spacing" : "";</span>
|
|
758
|
+
};
|
|
692
759
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
<span class="cstat-no" title="statement not covered" > if (link.type === 'divider') {</span>
|
|
700
|
-
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
701
|
-
<AnimationGroup display={true}>
|
|
702
|
-
<hr />
|
|
703
|
-
</AnimationGroup>
|
|
704
|
-
);
|
|
760
|
+
<span class="cstat-no" title="statement not covered" > useEffect(<span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
761
|
+
<span class="cstat-no" title="statement not covered" > if (disabled) {</span>
|
|
762
|
+
<span class="cstat-no" title="statement not covered" > setIsOpen(false);</span>
|
|
763
|
+
}
|
|
764
|
+
<span class="cstat-no" title="statement not covered" > if (isAlwaysOpen) {</span>
|
|
765
|
+
<span class="cstat-no" title="statement not covered" > setIsOpen(isAlwaysOpen);</span>
|
|
705
766
|
}
|
|
767
|
+
}, []);
|
|
706
768
|
|
|
769
|
+
// Render the links recursively. This will theoretically allow for an infinite number of nested link items.
|
|
770
|
+
// className will either be empty, parent-link - top most node, or child-link.
|
|
771
|
+
const renderDrawerLinksRecursively = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(n</span>avLinks, className = <span class="branch-0 cbranch-no" title="branch not covered" >"")</span> => {</span>
|
|
707
772
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
773
|
+
navLinks &&
|
|
774
|
+
navLinks.map(<span class="fstat-no" title="function not covered" >(l</span>ink) => {
|
|
775
|
+
<span class="cstat-no" title="statement not covered" > if (link.type === "divider") {</span>
|
|
776
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
777
|
+
<AnimationGroup display={true}>
|
|
778
|
+
<hr />
|
|
779
|
+
</AnimationGroup>
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
784
|
+
<li
|
|
785
|
+
key={link.label}
|
|
786
|
+
className={
|
|
787
|
+
isLinkActive(link, linkActiveFunc)
|
|
788
|
+
? `active-link ${className}`
|
|
789
|
+
: className
|
|
790
|
+
}
|
|
791
|
+
>
|
|
792
|
+
{link.url ? (
|
|
793
|
+
<a
|
|
794
|
+
href={link.url}
|
|
795
|
+
onClick={<span class="fstat-no" title="function not covered" >(e</span>) =>
|
|
796
|
+
<span class="cstat-no" title="statement not covered" > handleNavigation(</span>
|
|
797
|
+
e,
|
|
798
|
+
linkCallback,
|
|
799
|
+
link.label
|
|
800
|
+
)
|
|
801
|
+
}
|
|
802
|
+
tabIndex={isOpen ? "0" : "-1"}
|
|
803
|
+
data-track-category="SidebarNav"
|
|
804
|
+
data-track-action={`GoTo${
|
|
805
|
+
link.label
|
|
806
|
+
? link.label.split(" ").join("")
|
|
807
|
+
: ""
|
|
808
|
+
}`}
|
|
809
|
+
data-track-label={link.label}
|
|
810
|
+
target="_self"
|
|
811
|
+
>
|
|
812
|
+
{link.label}
|
|
813
|
+
</a>
|
|
814
|
+
) : (
|
|
815
|
+
<div>{link.label}</div>
|
|
816
|
+
)}
|
|
817
|
+
{link.items && link.items.length > 0 && (
|
|
818
|
+
<ul aria-hidden={!isOpen}>
|
|
819
|
+
{renderDrawerLinksRecursively(
|
|
820
|
+
link.items,
|
|
821
|
+
"child-link"
|
|
822
|
+
)}
|
|
823
|
+
</ul>
|
|
824
|
+
)}
|
|
825
|
+
</li>
|
|
826
|
+
);
|
|
827
|
+
})
|
|
739
828
|
);
|
|
740
|
-
|
|
741
|
-
);
|
|
742
|
-
};
|
|
829
|
+
};
|
|
743
830
|
|
|
744
|
-
<span class="cstat-no" title="statement not covered" >
|
|
745
|
-
<div className={staticDrawer ? 'static-drawer link-drawer' : 'link-drawer'}>
|
|
746
|
-
<button
|
|
747
|
-
onClick={toggleDrawer}
|
|
748
|
-
{...(!isAlwaysOpen ? { 'aria-pressed': isOpen } : {})}
|
|
749
|
-
tabIndex="0"
|
|
750
|
-
aria-label={label}
|
|
751
|
-
{...(isAlwaysOpen || disabled
|
|
752
|
-
? { disabled: isAlwaysOpen || disabled }
|
|
753
|
-
: {})}
|
|
754
|
-
className={`${className} ${expandedClass} ${highlightTitle(isHighlighted)} ${hasDarkerTitle(darkerBackground)}
|
|
755
|
-
${currentPage ? 'currentPage' : ''} ${isLeftBorderHighlightDisabled(leftBorderHighlightDisabled)}
|
|
756
|
-
${isHiddenWhileCollapsed(leftBorderHighlightDisabled, isExpanded)}`}
|
|
757
|
-
>
|
|
758
|
-
<div className={isExpanded ? 'link-body' : 'link-body collapsed'}>
|
|
759
|
-
{renderLeftIcon(leftIcon)}
|
|
760
|
-
<AnimationGroup display={isExpanded}>
|
|
761
|
-
<span>{label}</span>
|
|
762
|
-
</AnimationGroup>
|
|
763
|
-
</div>
|
|
764
|
-
{isExpanded && !isAlwaysOpen && (
|
|
765
|
-
<svg
|
|
766
|
-
className={`${isOpen ? 'right-icon rotated' : 'right-icon'}`}
|
|
767
|
-
focusable="false"
|
|
768
|
-
aria-hidden="true"
|
|
769
|
-
>
|
|
770
|
-
{rightIcon}
|
|
771
|
-
</svg>
|
|
772
|
-
)}
|
|
773
|
-
</button>
|
|
774
|
-
<AnimationGroup display={isExpanded}>
|
|
831
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
775
832
|
<div
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
833
|
+
className={
|
|
834
|
+
staticDrawer ? "static-drawer link-drawer" : "link-drawer"
|
|
835
|
+
}
|
|
779
836
|
>
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
837
|
+
<button
|
|
838
|
+
onClick={toggleDrawer}
|
|
839
|
+
{...(!isAlwaysOpen ? { "aria-pressed": isOpen } : {})}
|
|
840
|
+
tabIndex="0"
|
|
841
|
+
aria-label={label}
|
|
842
|
+
{...(isAlwaysOpen || disabled
|
|
843
|
+
? { disabled: isAlwaysOpen || disabled }
|
|
844
|
+
: {})}
|
|
845
|
+
className={`${className} ${expandedClass} ${highlightTitle(
|
|
846
|
+
isHighlighted
|
|
847
|
+
)} ${hasDarkerTitle(darkerBackground)}
|
|
848
|
+
${currentPage ? "currentPage" : ""} ${isLeftBorderHighlightDisabled(
|
|
849
|
+
leftBorderHighlightDisabled
|
|
850
|
+
)}
|
|
851
|
+
${isHiddenWhileCollapsed(leftBorderHighlightDisabled, isExpanded)}`}
|
|
852
|
+
>
|
|
853
|
+
<div
|
|
854
|
+
className={isExpanded ? "link-body" : "link-body collapsed"}
|
|
855
|
+
>
|
|
856
|
+
{renderLeftIcon(leftIcon)}
|
|
857
|
+
<AnimationGroup display={isExpanded}>
|
|
858
|
+
<span>{label}</span>
|
|
859
|
+
</AnimationGroup>
|
|
860
|
+
</div>
|
|
861
|
+
{isExpanded && !isAlwaysOpen && (
|
|
862
|
+
<svg
|
|
863
|
+
className={`${
|
|
864
|
+
isOpen ? "right-icon rotated" : "right-icon"
|
|
865
|
+
}`}
|
|
866
|
+
focusable="false"
|
|
867
|
+
aria-hidden="true"
|
|
868
|
+
>
|
|
869
|
+
{rightIcon}
|
|
870
|
+
</svg>
|
|
871
|
+
)}
|
|
872
|
+
</button>
|
|
873
|
+
<AnimationGroup display={isExpanded}>
|
|
874
|
+
<div
|
|
875
|
+
className={`${currentPage ? "currentPage" : ""} ${
|
|
876
|
+
isOpen && !disabled ? "drawer open" : "drawer"
|
|
877
|
+
} ${hasDarkerBackground(
|
|
878
|
+
darkerBackground
|
|
879
|
+
)} ${hasLargerDrawBottomPadding(
|
|
880
|
+
largerDrawerBottomPadding
|
|
881
|
+
)}`}
|
|
882
|
+
>
|
|
883
|
+
<ul aria-hidden={!isOpen}>
|
|
884
|
+
{listOfLinks &&
|
|
885
|
+
renderDrawerLinksRecursively(
|
|
886
|
+
listOfLinks,
|
|
887
|
+
`parent-link ${adjustItemSpacing(
|
|
888
|
+
largerDrawerBottomPadding
|
|
889
|
+
)}`
|
|
890
|
+
)}
|
|
891
|
+
</ul>
|
|
892
|
+
</div>
|
|
893
|
+
</AnimationGroup>
|
|
784
894
|
</div>
|
|
785
|
-
|
|
786
|
-
</div>
|
|
787
|
-
);
|
|
895
|
+
);
|
|
788
896
|
};
|
|
789
897
|
|
|
790
898
|
NavLinkDrawer.propTypes = {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
899
|
+
isExpanded: PropTypes.bool,
|
|
900
|
+
isAlwaysOpen: PropTypes.bool,
|
|
901
|
+
openByDefault: PropTypes.bool,
|
|
902
|
+
className: PropTypes.string,
|
|
903
|
+
rightIcon: PropTypes.element,
|
|
904
|
+
leftIcon: PropTypes.element,
|
|
905
|
+
label: PropTypes.string,
|
|
906
|
+
linkActiveFunc: PropTypes.func,
|
|
907
|
+
linkCallback: PropTypes.func,
|
|
908
|
+
listOfLinks: PropTypes.array,
|
|
909
|
+
disabled: PropTypes.bool,
|
|
910
|
+
sidebarExpand: PropTypes.func,
|
|
911
|
+
staticDrawer: PropTypes.bool,
|
|
912
|
+
items: PropTypes.object,
|
|
913
|
+
url: PropTypes.string,
|
|
914
|
+
isHighlighted: PropTypes.bool,
|
|
915
|
+
darkerBackground: PropTypes.bool,
|
|
916
|
+
leftBorderHighlightDisabled: PropTypes.bool,
|
|
917
|
+
largerDrawerBottomPadding: PropTypes.bool,
|
|
810
918
|
};
|
|
811
919
|
|
|
812
920
|
export default NavLinkDrawer;
|
|
@@ -817,7 +925,7 @@ export default NavLinkDrawer;
|
|
|
817
925
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
818
926
|
Code coverage generated by
|
|
819
927
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
820
|
-
at
|
|
928
|
+
at Thu Mar 24 2022 11:31:04 GMT-0700 (Pacific Daylight Time)
|
|
821
929
|
</div>
|
|
822
930
|
<script src="../../../../prettify.js"></script>
|
|
823
931
|
<script>
|