qpp-style 9.16.0 → 9.16.2
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/components/Header/ImpersonatorBanner.jsx +18 -10
- package/components/SideNav/helpers.js +2 -0
- package/coverage/clover.xml +1287 -0
- package/coverage/coverage-final.json +70 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/components/Accordion/index.html +116 -0
- package/coverage/lcov-report/components/Accordion/index.jsx.html +364 -0
- package/coverage/lcov-report/components/Error/Collapsible.jsx.html +349 -0
- package/coverage/lcov-report/components/Error/ErrorUI.jsx.html +178 -0
- package/coverage/lcov-report/components/Error/index.html +131 -0
- package/coverage/lcov-report/components/Footer/FooterUI.jsx.html +880 -0
- package/coverage/lcov-report/components/Footer/LegacyFooterUI.jsx.html +667 -0
- package/coverage/lcov-report/components/Footer/SocialLinks.jsx.html +265 -0
- package/coverage/lcov-report/components/Footer/Subscribe.jsx.html +187 -0
- package/coverage/lcov-report/components/Footer/index.html +161 -0
- package/coverage/lcov-report/components/Infotip/Infotip.jsx.html +310 -0
- package/coverage/lcov-report/components/Infotip/InfotipIcon.jsx.html +208 -0
- package/coverage/lcov-report/components/Infotip/index.html +146 -0
- package/coverage/lcov-report/components/Infotip/index.js.html +94 -0
- package/coverage/lcov-report/components/Modal/LegacyModal.jsx.html +301 -0
- package/coverage/lcov-report/components/Modal/Modal.jsx.html +505 -0
- package/coverage/lcov-report/components/Modal/index.html +146 -0
- package/coverage/lcov-report/components/Modal/index.jsx.html +151 -0
- package/coverage/lcov-report/components/SanitizedContent/index.html +116 -0
- package/coverage/lcov-report/components/SanitizedContent/index.jsx.html +685 -0
- package/coverage/lcov-report/components/SessionDialogUI.jsx.html +868 -0
- package/coverage/lcov-report/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +166 -0
- package/coverage/lcov-report/components/SideNav/AnimationGroup/index.html +116 -0
- package/coverage/lcov-report/components/SideNav/Chart/ScoreChart.jsx.html +889 -0
- package/coverage/lcov-report/components/SideNav/Chart/index.html +131 -0
- package/coverage/lcov-report/components/SideNav/Chart/index.js.html +94 -0
- package/coverage/lcov-report/components/SideNav/Content/LevelOneContent.jsx.html +709 -0
- package/coverage/lcov-report/components/SideNav/Content/LevelTwoContent.jsx.html +733 -0
- package/coverage/lcov-report/components/SideNav/Content/index.html +146 -0
- package/coverage/lcov-report/components/SideNav/Content/index.js.html +97 -0
- package/coverage/lcov-report/components/SideNav/Details/IndividualDetails.jsx.html +139 -0
- package/coverage/lcov-report/components/SideNav/Details/PracticeDetails.jsx.html +220 -0
- package/coverage/lcov-report/components/SideNav/Details/index.html +146 -0
- package/coverage/lcov-report/components/SideNav/Details/index.js.html +97 -0
- package/coverage/lcov-report/components/SideNav/Links/CmsSwitchLink.jsx.html +208 -0
- package/coverage/lcov-report/components/SideNav/Links/NavItemInline.jsx.html +247 -0
- package/coverage/lcov-report/components/SideNav/Links/NavLinkContainer.jsx.html +199 -0
- package/coverage/lcov-report/components/SideNav/Links/NavLinkDrawer.jsx.html +832 -0
- package/coverage/lcov-report/components/SideNav/Links/NavLinkInline.jsx.html +406 -0
- package/coverage/lcov-report/components/SideNav/Links/NavLinkToggle.jsx.html +187 -0
- package/coverage/lcov-report/components/SideNav/Links/index.html +206 -0
- package/coverage/lcov-report/components/SideNav/Links/index.js.html +124 -0
- package/coverage/lcov-report/components/SideNav/UI/SideNavUI.jsx.html +1084 -0
- package/coverage/lcov-report/components/SideNav/UI/index.html +131 -0
- package/coverage/lcov-report/components/SideNav/UI/index.js.html +94 -0
- package/coverage/lcov-report/components/SideNav/helpers.js.html +238 -0
- package/coverage/lcov-report/components/SideNav/index.html +116 -0
- package/coverage/lcov-report/components/Tooltip/Tooltip.jsx.html +349 -0
- package/coverage/lcov-report/components/Tooltip/index.html +146 -0
- package/coverage/lcov-report/components/Tooltip/index.js.html +94 -0
- package/coverage/lcov-report/components/Tooltip/position.js.html +289 -0
- package/coverage/lcov-report/components/hooks/index.html +116 -0
- package/coverage/lcov-report/components/hooks/useGetConfig.js.html +307 -0
- package/coverage/lcov-report/components/index.html +116 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +461 -0
- package/coverage/lcov-report/lib/Chevron.jsx.html +181 -0
- package/coverage/lcov-report/lib/SvgComponents.jsx.html +1702 -0
- package/coverage/lcov-report/lib/index.html +146 -0
- package/coverage/lcov-report/lib/svg-definitions.svg.html +460 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/react/components/Accordion/index.html +116 -0
- package/coverage/lcov-report/react/components/Accordion/index.jsx.html +364 -0
- package/coverage/lcov-report/react/components/Button/index.html +116 -0
- package/coverage/lcov-report/react/components/Button/index.js.html +355 -0
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +349 -0
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +178 -0
- package/coverage/lcov-report/react/components/Error/error.js.html +163 -0
- package/coverage/lcov-report/react/components/Error/index.html +146 -0
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +880 -0
- package/coverage/lcov-report/react/components/Footer/LegacyFooterUI.jsx.html +667 -0
- package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +265 -0
- package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +187 -0
- package/coverage/lcov-report/react/components/Footer/footer.js.html +175 -0
- package/coverage/lcov-report/react/components/Footer/index.html +176 -0
- package/coverage/lcov-report/react/components/GovBanner/index.html +116 -0
- package/coverage/lcov-report/react/components/GovBanner/index.js.html +409 -0
- package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +592 -0
- package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +133 -0
- package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +280 -0
- package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +211 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +235 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +781 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +235 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +271 -0
- package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +196 -0
- package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +586 -0
- package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +181 -0
- package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +331 -0
- package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +166 -0
- package/coverage/lcov-report/react/components/Header/header.js.html +205 -0
- package/coverage/lcov-report/react/components/Header/hooks.js.html +241 -0
- package/coverage/lcov-report/react/components/Header/index.html +341 -0
- package/coverage/lcov-report/react/components/Header/utag-helpers.js.html +112 -0
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +310 -0
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +208 -0
- package/coverage/lcov-report/react/components/Infotip/index.html +146 -0
- package/coverage/lcov-report/react/components/Infotip/index.js.html +94 -0
- package/coverage/lcov-report/react/components/Modal/LegacyModal.jsx.html +301 -0
- package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +505 -0
- package/coverage/lcov-report/react/components/Modal/index.html +146 -0
- package/coverage/lcov-report/react/components/Modal/index.jsx.html +151 -0
- package/coverage/lcov-report/react/components/NotificationBanner/index.html +116 -0
- package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +880 -0
- package/coverage/lcov-report/react/components/SanitizedContent/index.html +116 -0
- package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +685 -0
- package/coverage/lcov-report/react/components/SessionDialog/index.html +116 -0
- package/coverage/lcov-report/react/components/SessionDialog/sessionDialog.js.html +163 -0
- package/coverage/lcov-report/react/components/SessionDialogUI.jsx.html +868 -0
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +166 -0
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +116 -0
- package/coverage/lcov-report/react/components/SideNav/Chart/ScoreChart.jsx.html +889 -0
- package/coverage/lcov-report/react/components/SideNav/Chart/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/Chart/index.js.html +94 -0
- package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +709 -0
- package/coverage/lcov-report/react/components/SideNav/Content/LevelTwoContent.jsx.html +733 -0
- package/coverage/lcov-report/react/components/SideNav/Content/index.html +146 -0
- package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +97 -0
- package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +139 -0
- package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +220 -0
- package/coverage/lcov-report/react/components/SideNav/Details/index.html +146 -0
- package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +97 -0
- package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +208 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +247 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +199 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +832 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +406 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +187 -0
- package/coverage/lcov-report/react/components/SideNav/Links/index.html +206 -0
- package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +124 -0
- package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +1084 -0
- package/coverage/lcov-report/react/components/SideNav/UI/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +94 -0
- package/coverage/lcov-report/react/components/SideNav/helpers.js.html +238 -0
- package/coverage/lcov-report/react/components/SideNav/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/index.js.html +244 -0
- package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +349 -0
- package/coverage/lcov-report/react/components/Tooltip/index.html +146 -0
- package/coverage/lcov-report/react/components/Tooltip/index.js.html +94 -0
- package/coverage/lcov-report/react/components/Tooltip/position.js.html +289 -0
- package/coverage/lcov-report/react/components/hooks/index.html +116 -0
- package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +307 -0
- package/coverage/lcov-report/react/components/index.html +116 -0
- package/coverage/lcov-report/react/index.html +116 -0
- package/coverage/lcov-report/react/index.js.html +178 -0
- package/coverage/lcov-report/react/lib/Chevron.jsx.html +181 -0
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +1702 -0
- package/coverage/lcov-report/react/lib/index.html +146 -0
- package/coverage/lcov-report/react/lib/svg-definitions.svg.html +460 -0
- package/coverage/lcov-report/react/session/index.html +161 -0
- package/coverage/lcov-report/react/session/index.js.html +100 -0
- package/coverage/lcov-report/react/session/logout.js.html +307 -0
- package/coverage/lcov-report/react/session/refresh.js.html +232 -0
- package/coverage/lcov-report/react/session/ttl.js.html +196 -0
- package/coverage/lcov-report/session/index.html +161 -0
- package/coverage/lcov-report/session/index.js.html +100 -0
- package/coverage/lcov-report/session/logout.js.html +298 -0
- package/coverage/lcov-report/session/refresh.js.html +232 -0
- package/coverage/lcov-report/session/ttl.js.html +196 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +2908 -0
- package/dist/browser.js +1 -1
- package/dist/browser.js.LICENSE.txt +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.LICENSE.txt +1 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
- package/session/logout.js +5 -2
- package/styles/components/_footer.scss +593 -0
- package/styles/components/_header.scss +890 -0
- package/styles/components/_sidebar.scss +8 -0
- package/styles/components/sidebar/_animations.scss +38 -0
- package/styles/components/sidebar/_cms.scss +61 -0
- package/styles/components/sidebar/_details.scss +58 -0
- package/styles/components/sidebar/_links.scss +415 -0
- package/styles/components/sidebar/_sidebar-animation.scss +121 -0
- package/styles/components/sidebar/_sidebar-tooltip.scss +33 -0
- package/styles/components/sidebar/_sidebar.scss +141 -0
- package/styles/components/sidebar/project-specific/_wi.scss +42 -0
- package/styles/qppds/components/_gov-banner.scss +1 -8
- package/styles/qppds/components/_step-indicator.scss +190 -0
- package/styles/qppds/components/_table.scss +19 -1
- package/styles/qppds/components/index.scss +1 -0
- package/styles/qppds/utilities/_vertical-align.scss +72 -0
- package/styles/qppds/utilities/index.scss +1 -0
- package/storybook-static/favicon.ico +0 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for react/components/SideNav/index.js</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> / <a href="index.html">react/components/SideNav</a> index.js</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">25% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>1/4</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>0/1</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>0/1</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">25% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>1/4</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
+
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
+
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
+
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
+
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
+
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
+
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
+
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
+
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
+
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
+
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
+
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
+
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
+
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
+
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
+
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
+
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
+
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
+
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
+
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
+
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
+
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
|
+
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
|
+
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
+
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
+
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
|
+
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
|
+
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
+
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
|
+
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
+
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
+
<a name='L53'></a><a href='#L53'>53</a>
|
|
119
|
+
<a name='L54'></a><a href='#L54'>54</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
120
|
+
<span class="cline-any cline-neutral"> </span>
|
|
121
|
+
<span class="cline-any cline-neutral"> </span>
|
|
122
|
+
<span class="cline-any cline-neutral"> </span>
|
|
123
|
+
<span class="cline-any cline-yes">1x</span>
|
|
124
|
+
<span class="cline-any cline-neutral"> </span>
|
|
125
|
+
<span class="cline-any cline-neutral"> </span>
|
|
126
|
+
<span class="cline-any cline-neutral"> </span>
|
|
127
|
+
<span class="cline-any cline-neutral"> </span>
|
|
128
|
+
<span class="cline-any cline-neutral"> </span>
|
|
129
|
+
<span class="cline-any cline-neutral"> </span>
|
|
130
|
+
<span class="cline-any cline-neutral"> </span>
|
|
131
|
+
<span class="cline-any cline-neutral"> </span>
|
|
132
|
+
<span class="cline-any cline-neutral"> </span>
|
|
133
|
+
<span class="cline-any cline-neutral"> </span>
|
|
134
|
+
<span class="cline-any cline-neutral"> </span>
|
|
135
|
+
<span class="cline-any cline-neutral"> </span>
|
|
136
|
+
<span class="cline-any cline-neutral"> </span>
|
|
137
|
+
<span class="cline-any cline-neutral"> </span>
|
|
138
|
+
<span class="cline-any cline-neutral"> </span>
|
|
139
|
+
<span class="cline-any cline-neutral"> </span>
|
|
140
|
+
<span class="cline-any cline-neutral"> </span>
|
|
141
|
+
<span class="cline-any cline-neutral"> </span>
|
|
142
|
+
<span class="cline-any cline-neutral"> </span>
|
|
143
|
+
<span class="cline-any cline-no"> </span>
|
|
144
|
+
<span class="cline-any cline-neutral"> </span>
|
|
145
|
+
<span class="cline-any cline-no"> </span>
|
|
146
|
+
<span class="cline-any cline-neutral"> </span>
|
|
147
|
+
<span class="cline-any cline-neutral"> </span>
|
|
148
|
+
<span class="cline-any cline-neutral"> </span>
|
|
149
|
+
<span class="cline-any cline-neutral"> </span>
|
|
150
|
+
<span class="cline-any cline-neutral"> </span>
|
|
151
|
+
<span class="cline-any cline-neutral"> </span>
|
|
152
|
+
<span class="cline-any cline-neutral"> </span>
|
|
153
|
+
<span class="cline-any cline-neutral"> </span>
|
|
154
|
+
<span class="cline-any cline-neutral"> </span>
|
|
155
|
+
<span class="cline-any cline-neutral"> </span>
|
|
156
|
+
<span class="cline-any cline-neutral"> </span>
|
|
157
|
+
<span class="cline-any cline-neutral"> </span>
|
|
158
|
+
<span class="cline-any cline-neutral"> </span>
|
|
159
|
+
<span class="cline-any cline-neutral"> </span>
|
|
160
|
+
<span class="cline-any cline-neutral"> </span>
|
|
161
|
+
<span class="cline-any cline-neutral"> </span>
|
|
162
|
+
<span class="cline-any cline-neutral"> </span>
|
|
163
|
+
<span class="cline-any cline-neutral"> </span>
|
|
164
|
+
<span class="cline-any cline-neutral"> </span>
|
|
165
|
+
<span class="cline-any cline-neutral"> </span>
|
|
166
|
+
<span class="cline-any cline-neutral"> </span>
|
|
167
|
+
<span class="cline-any cline-neutral"> </span>
|
|
168
|
+
<span class="cline-any cline-no"> </span>
|
|
169
|
+
<span class="cline-any cline-neutral"> </span>
|
|
170
|
+
<span class="cline-any cline-neutral"> </span>
|
|
171
|
+
<span class="cline-any cline-neutral"> </span>
|
|
172
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React from 'react';
|
|
173
|
+
import { render } from 'react-dom';
|
|
174
|
+
import { SideNavUI } from './UI';
|
|
175
|
+
|
|
176
|
+
const SideNav = <span class="fstat-no" title="function not covered" >(o</span>ptions = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => {
|
|
177
|
+
const {
|
|
178
|
+
rootElement,
|
|
179
|
+
isExpanded,
|
|
180
|
+
onExpanded,
|
|
181
|
+
onCollapsed,
|
|
182
|
+
chartData,
|
|
183
|
+
currentLevel,
|
|
184
|
+
config,
|
|
185
|
+
feedbackPerformanceYear,
|
|
186
|
+
fbpPerformanceYear,
|
|
187
|
+
showDevPreDfpLink,
|
|
188
|
+
showPhysicianCompareLink,
|
|
189
|
+
showFacilityBasedPreviewLink,
|
|
190
|
+
showSelfNomination,
|
|
191
|
+
showApmIncentivePaymentLink,
|
|
192
|
+
items,
|
|
193
|
+
isAltStyle,
|
|
194
|
+
showReportsPortal,
|
|
195
|
+
showTargetedReviewLink,
|
|
196
|
+
} = <span class="cstat-no" title="statement not covered" >options;</span>
|
|
197
|
+
|
|
198
|
+
const { expand, collapse } = <span class="cstat-no" title="statement not covered" >render(</span>
|
|
199
|
+
<SideNavUI
|
|
200
|
+
isExpanded={isExpanded}
|
|
201
|
+
onExpanded={onExpanded}
|
|
202
|
+
onCollapsed={onCollapsed}
|
|
203
|
+
chartData={chartData}
|
|
204
|
+
currentLevel={currentLevel}
|
|
205
|
+
config={config}
|
|
206
|
+
feedbackPerformanceYear={feedbackPerformanceYear}
|
|
207
|
+
fbpPerformanceYear={fbpPerformanceYear}
|
|
208
|
+
showDevPreDfpLink={showDevPreDfpLink}
|
|
209
|
+
showPhysicianCompareLink={showPhysicianCompareLink}
|
|
210
|
+
showFacilityBasedPreviewLink={showFacilityBasedPreviewLink}
|
|
211
|
+
showSelfNomination={showSelfNomination}
|
|
212
|
+
showApmIncentivePaymentLink={showApmIncentivePaymentLink}
|
|
213
|
+
items={items}
|
|
214
|
+
isAltStyle={isAltStyle}
|
|
215
|
+
showReportsPortal={showReportsPortal}
|
|
216
|
+
showTargetedReviewLink={showTargetedReviewLink}
|
|
217
|
+
/>,
|
|
218
|
+
rootElement
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
<span class="cstat-no" title="statement not covered" > return { expand, collapse };</span>
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
export default SideNav;
|
|
225
|
+
</pre></td></tr></table></pre>
|
|
226
|
+
|
|
227
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
228
|
+
</div><!-- /wrapper -->
|
|
229
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
230
|
+
Code coverage generated by
|
|
231
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
232
|
+
at Tue May 10 2022 11:18:12 GMT-0400 (Eastern Daylight Time)
|
|
233
|
+
</div>
|
|
234
|
+
<script src="../../../prettify.js"></script>
|
|
235
|
+
<script>
|
|
236
|
+
window.onload = function () {
|
|
237
|
+
prettyPrint();
|
|
238
|
+
};
|
|
239
|
+
</script>
|
|
240
|
+
<script src="../../../sorter.js"></script>
|
|
241
|
+
<script src="../../../block-navigation.js"></script>
|
|
242
|
+
</body>
|
|
243
|
+
</html>
|
|
244
|
+
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for react/components/Tooltip/Tooltip.jsx</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> / <a href="index.html">react/components/Tooltip</a> Tooltip.jsx</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>16/16</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>7/7</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>2/2</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>16/16</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
+
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
+
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
+
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
+
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
+
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
+
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
+
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
+
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
+
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
+
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
+
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
+
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
+
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
+
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
+
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
+
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
+
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
+
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
+
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
+
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
+
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
|
+
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
|
+
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
+
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
+
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
|
+
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
|
+
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
+
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
|
+
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
+
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
+
<a name='L53'></a><a href='#L53'>53</a>
|
|
119
|
+
<a name='L54'></a><a href='#L54'>54</a>
|
|
120
|
+
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
|
+
<a name='L56'></a><a href='#L56'>56</a>
|
|
122
|
+
<a name='L57'></a><a href='#L57'>57</a>
|
|
123
|
+
<a name='L58'></a><a href='#L58'>58</a>
|
|
124
|
+
<a name='L59'></a><a href='#L59'>59</a>
|
|
125
|
+
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
|
+
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
|
+
<a name='L62'></a><a href='#L62'>62</a>
|
|
128
|
+
<a name='L63'></a><a href='#L63'>63</a>
|
|
129
|
+
<a name='L64'></a><a href='#L64'>64</a>
|
|
130
|
+
<a name='L65'></a><a href='#L65'>65</a>
|
|
131
|
+
<a name='L66'></a><a href='#L66'>66</a>
|
|
132
|
+
<a name='L67'></a><a href='#L67'>67</a>
|
|
133
|
+
<a name='L68'></a><a href='#L68'>68</a>
|
|
134
|
+
<a name='L69'></a><a href='#L69'>69</a>
|
|
135
|
+
<a name='L70'></a><a href='#L70'>70</a>
|
|
136
|
+
<a name='L71'></a><a href='#L71'>71</a>
|
|
137
|
+
<a name='L72'></a><a href='#L72'>72</a>
|
|
138
|
+
<a name='L73'></a><a href='#L73'>73</a>
|
|
139
|
+
<a name='L74'></a><a href='#L74'>74</a>
|
|
140
|
+
<a name='L75'></a><a href='#L75'>75</a>
|
|
141
|
+
<a name='L76'></a><a href='#L76'>76</a>
|
|
142
|
+
<a name='L77'></a><a href='#L77'>77</a>
|
|
143
|
+
<a name='L78'></a><a href='#L78'>78</a>
|
|
144
|
+
<a name='L79'></a><a href='#L79'>79</a>
|
|
145
|
+
<a name='L80'></a><a href='#L80'>80</a>
|
|
146
|
+
<a name='L81'></a><a href='#L81'>81</a>
|
|
147
|
+
<a name='L82'></a><a href='#L82'>82</a>
|
|
148
|
+
<a name='L83'></a><a href='#L83'>83</a>
|
|
149
|
+
<a name='L84'></a><a href='#L84'>84</a>
|
|
150
|
+
<a name='L85'></a><a href='#L85'>85</a>
|
|
151
|
+
<a name='L86'></a><a href='#L86'>86</a>
|
|
152
|
+
<a name='L87'></a><a href='#L87'>87</a>
|
|
153
|
+
<a name='L88'></a><a href='#L88'>88</a>
|
|
154
|
+
<a name='L89'></a><a href='#L89'>89</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
155
|
+
<span class="cline-any cline-neutral"> </span>
|
|
156
|
+
<span class="cline-any cline-neutral"> </span>
|
|
157
|
+
<span class="cline-any cline-neutral"> </span>
|
|
158
|
+
<span class="cline-any cline-neutral"> </span>
|
|
159
|
+
<span class="cline-any cline-neutral"> </span>
|
|
160
|
+
<span class="cline-any cline-neutral"> </span>
|
|
161
|
+
<span class="cline-any cline-neutral"> </span>
|
|
162
|
+
<span class="cline-any cline-yes">4x</span>
|
|
163
|
+
<span class="cline-any cline-yes">4x</span>
|
|
164
|
+
<span class="cline-any cline-neutral"> </span>
|
|
165
|
+
<span class="cline-any cline-neutral"> </span>
|
|
166
|
+
<span class="cline-any cline-neutral"> </span>
|
|
167
|
+
<span class="cline-any cline-neutral"> </span>
|
|
168
|
+
<span class="cline-any cline-neutral"> </span>
|
|
169
|
+
<span class="cline-any cline-neutral"> </span>
|
|
170
|
+
<span class="cline-any cline-neutral"> </span>
|
|
171
|
+
<span class="cline-any cline-neutral"> </span>
|
|
172
|
+
<span class="cline-any cline-yes">4x</span>
|
|
173
|
+
<span class="cline-any cline-yes">41x</span>
|
|
174
|
+
<span class="cline-any cline-yes">41x</span>
|
|
175
|
+
<span class="cline-any cline-yes">41x</span>
|
|
176
|
+
<span class="cline-any cline-yes">41x</span>
|
|
177
|
+
<span class="cline-any cline-neutral"> </span>
|
|
178
|
+
<span class="cline-any cline-yes">41x</span>
|
|
179
|
+
<span class="cline-any cline-neutral"> </span>
|
|
180
|
+
<span class="cline-any cline-neutral"> </span>
|
|
181
|
+
<span class="cline-any cline-neutral"> </span>
|
|
182
|
+
<span class="cline-any cline-neutral"> </span>
|
|
183
|
+
<span class="cline-any cline-yes">38x</span>
|
|
184
|
+
<span class="cline-any cline-yes">3x</span>
|
|
185
|
+
<span class="cline-any cline-yes">3x</span>
|
|
186
|
+
<span class="cline-any cline-yes">3x</span>
|
|
187
|
+
<span class="cline-any cline-neutral"> </span>
|
|
188
|
+
<span class="cline-any cline-neutral"> </span>
|
|
189
|
+
<span class="cline-any cline-neutral"> </span>
|
|
190
|
+
<span class="cline-any cline-neutral"> </span>
|
|
191
|
+
<span class="cline-any cline-neutral"> </span>
|
|
192
|
+
<span class="cline-any cline-neutral"> </span>
|
|
193
|
+
<span class="cline-any cline-neutral"> </span>
|
|
194
|
+
<span class="cline-any cline-neutral"> </span>
|
|
195
|
+
<span class="cline-any cline-yes">3x</span>
|
|
196
|
+
<span class="cline-any cline-neutral"> </span>
|
|
197
|
+
<span class="cline-any cline-neutral"> </span>
|
|
198
|
+
<span class="cline-any cline-neutral"> </span>
|
|
199
|
+
<span class="cline-any cline-yes">41x</span>
|
|
200
|
+
<span class="cline-any cline-neutral"> </span>
|
|
201
|
+
<span class="cline-any cline-neutral"> </span>
|
|
202
|
+
<span class="cline-any cline-neutral"> </span>
|
|
203
|
+
<span class="cline-any cline-neutral"> </span>
|
|
204
|
+
<span class="cline-any cline-neutral"> </span>
|
|
205
|
+
<span class="cline-any cline-neutral"> </span>
|
|
206
|
+
<span class="cline-any cline-neutral"> </span>
|
|
207
|
+
<span class="cline-any cline-neutral"> </span>
|
|
208
|
+
<span class="cline-any cline-neutral"> </span>
|
|
209
|
+
<span class="cline-any cline-neutral"> </span>
|
|
210
|
+
<span class="cline-any cline-neutral"> </span>
|
|
211
|
+
<span class="cline-any cline-neutral"> </span>
|
|
212
|
+
<span class="cline-any cline-neutral"> </span>
|
|
213
|
+
<span class="cline-any cline-neutral"> </span>
|
|
214
|
+
<span class="cline-any cline-neutral"> </span>
|
|
215
|
+
<span class="cline-any cline-neutral"> </span>
|
|
216
|
+
<span class="cline-any cline-neutral"> </span>
|
|
217
|
+
<span class="cline-any cline-neutral"> </span>
|
|
218
|
+
<span class="cline-any cline-neutral"> </span>
|
|
219
|
+
<span class="cline-any cline-neutral"> </span>
|
|
220
|
+
<span class="cline-any cline-neutral"> </span>
|
|
221
|
+
<span class="cline-any cline-neutral"> </span>
|
|
222
|
+
<span class="cline-any cline-neutral"> </span>
|
|
223
|
+
<span class="cline-any cline-neutral"> </span>
|
|
224
|
+
<span class="cline-any cline-neutral"> </span>
|
|
225
|
+
<span class="cline-any cline-neutral"> </span>
|
|
226
|
+
<span class="cline-any cline-neutral"> </span>
|
|
227
|
+
<span class="cline-any cline-neutral"> </span>
|
|
228
|
+
<span class="cline-any cline-neutral"> </span>
|
|
229
|
+
<span class="cline-any cline-yes">4x</span>
|
|
230
|
+
<span class="cline-any cline-neutral"> </span>
|
|
231
|
+
<span class="cline-any cline-neutral"> </span>
|
|
232
|
+
<span class="cline-any cline-neutral"> </span>
|
|
233
|
+
<span class="cline-any cline-neutral"> </span>
|
|
234
|
+
<span class="cline-any cline-neutral"> </span>
|
|
235
|
+
<span class="cline-any cline-neutral"> </span>
|
|
236
|
+
<span class="cline-any cline-yes">4x</span>
|
|
237
|
+
<span class="cline-any cline-neutral"> </span>
|
|
238
|
+
<span class="cline-any cline-neutral"> </span>
|
|
239
|
+
<span class="cline-any cline-neutral"> </span>
|
|
240
|
+
<span class="cline-any cline-neutral"> </span>
|
|
241
|
+
<span class="cline-any cline-neutral"> </span>
|
|
242
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { cloneElement, useLayoutEffect, useRef } from 'react';
|
|
243
|
+
import PropTypes from 'prop-types';
|
|
244
|
+
import positionTip, { positionTriangle } from './position';
|
|
245
|
+
import { useTooltip, TooltipPopup } from '@reach/tooltip';
|
|
246
|
+
import Portal from '@reach/portal';
|
|
247
|
+
|
|
248
|
+
// TODO: investigate ways to allow more styling via css? the triangle
|
|
249
|
+
// positioning effect issue may need to be resolved to allow for this.
|
|
250
|
+
const TEXT_COLOR = '#FFF';
|
|
251
|
+
const BACKGROUND_COLOR = '#333';
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Generic styled tooltip component.
|
|
255
|
+
* Corresponding styles: /styles/components/_tooltip.scss
|
|
256
|
+
*
|
|
257
|
+
* Extends implementation from @reach/tooltip:
|
|
258
|
+
* https://reacttraining.com/reach-ui/tooltip
|
|
259
|
+
*/
|
|
260
|
+
const Tooltip = ({ children, label, ariaLabel, DEBUG_STYLE }) => {
|
|
261
|
+
const [trigger, tooltip] = useTooltip({ DEBUG_STYLE });
|
|
262
|
+
const { isVisible, triggerRect } = tooltip;
|
|
263
|
+
const tooltipPopupRef = useRef();
|
|
264
|
+
const triangleRef = useRef();
|
|
265
|
+
|
|
266
|
+
useLayoutEffect(() => {
|
|
267
|
+
// For some reason, the forwardRef for the tooltipPopup points to an undefined
|
|
268
|
+
// dom element when we first render the portal containing the triangle. Using
|
|
269
|
+
// an effect here will ensure that the ref is available when applying styles.
|
|
270
|
+
// TODO: investigate and make issue for @reach-ui/tooltip?
|
|
271
|
+
if (isVisible && tooltipPopupRef.current && triggerRect) {
|
|
272
|
+
const tooltipRect = tooltipPopupRef.current.getBoundingClientRect();
|
|
273
|
+
const positionCssText = positionTriangle(triggerRect, tooltipRect);
|
|
274
|
+
const cssText = `
|
|
275
|
+
position: absolute;
|
|
276
|
+
width: 0;
|
|
277
|
+
height: 0;
|
|
278
|
+
${positionCssText}
|
|
279
|
+
border-top-color: ${BACKGROUND_COLOR};
|
|
280
|
+
border-bottom-color: ${BACKGROUND_COLOR};
|
|
281
|
+
z-index: 1;
|
|
282
|
+
`;
|
|
283
|
+
triangleRef.current.style.cssText = cssText;
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
return (
|
|
288
|
+
<>
|
|
289
|
+
{cloneElement(children, trigger)}
|
|
290
|
+
<TooltipPopup
|
|
291
|
+
{...tooltip}
|
|
292
|
+
label={label}
|
|
293
|
+
ariaLabel={ariaLabel}
|
|
294
|
+
style={{
|
|
295
|
+
background: BACKGROUND_COLOR,
|
|
296
|
+
color: TEXT_COLOR,
|
|
297
|
+
}}
|
|
298
|
+
ref={tooltipPopupRef}
|
|
299
|
+
position={positionTip}
|
|
300
|
+
/>
|
|
301
|
+
{isVisible && (
|
|
302
|
+
<Portal>
|
|
303
|
+
<div
|
|
304
|
+
ref={triangleRef}
|
|
305
|
+
style={{
|
|
306
|
+
position: 'absolute',
|
|
307
|
+
width: 0,
|
|
308
|
+
height: 0,
|
|
309
|
+
}}
|
|
310
|
+
/>
|
|
311
|
+
</Portal>
|
|
312
|
+
)}
|
|
313
|
+
</>
|
|
314
|
+
);
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
Tooltip.propTypes = {
|
|
318
|
+
children: PropTypes.node.isRequired,
|
|
319
|
+
label: PropTypes.node.isRequired,
|
|
320
|
+
ariaLabel: PropTypes.string,
|
|
321
|
+
DEBUG_STYLE: PropTypes.bool,
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
Tooltip.defaultProps = {
|
|
325
|
+
ariaLabel: undefined,
|
|
326
|
+
DEBUG_STYLE: undefined,
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
export default Tooltip;
|
|
330
|
+
</pre></td></tr></table></pre>
|
|
331
|
+
|
|
332
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
333
|
+
</div><!-- /wrapper -->
|
|
334
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
335
|
+
Code coverage generated by
|
|
336
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
337
|
+
at Tue May 10 2022 11:18:12 GMT-0400 (Eastern Daylight Time)
|
|
338
|
+
</div>
|
|
339
|
+
<script src="../../../prettify.js"></script>
|
|
340
|
+
<script>
|
|
341
|
+
window.onload = function () {
|
|
342
|
+
prettyPrint();
|
|
343
|
+
};
|
|
344
|
+
</script>
|
|
345
|
+
<script src="../../../sorter.js"></script>
|
|
346
|
+
<script src="../../../block-navigation.js"></script>
|
|
347
|
+
</body>
|
|
348
|
+
</html>
|
|
349
|
+
|