qpp-style 9.45.3 → 9.45.5
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/Footer/FooterTooltip.jsx +61 -0
- package/components/Footer/FooterUI.jsx +11 -12
- package/dist/browser.js +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/images/icons/svg/arrow-downward.svg +1 -0
- package/images/icons/svg/mail.svg +11 -0
- package/images/icons/svg/phone.svg +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* eslint-disable react/prop-types */
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
|
|
4
|
+
export default function FooterTooltip({ triggerContent, tooltipContent }) {
|
|
5
|
+
const [isHidden, setIsHidden] = useState(true);
|
|
6
|
+
const ariaHidden = isHidden ? "true" : "false";
|
|
7
|
+
const tooltipButtonStyles = {
|
|
8
|
+
position: "relative",
|
|
9
|
+
background: "transparent",
|
|
10
|
+
border: "none",
|
|
11
|
+
display: "inline-block",
|
|
12
|
+
};
|
|
13
|
+
const triangleStyles = {
|
|
14
|
+
position: "absolute",
|
|
15
|
+
top: "100%",
|
|
16
|
+
left: "50%",
|
|
17
|
+
translate: "-50% 0",
|
|
18
|
+
border: "6px solid transparent",
|
|
19
|
+
borderTop: "6px solid rgb(51,51,51)",
|
|
20
|
+
width: "6px",
|
|
21
|
+
height: "6px",
|
|
22
|
+
};
|
|
23
|
+
const tooltipStyles = isHidden
|
|
24
|
+
? {
|
|
25
|
+
display: "none",
|
|
26
|
+
}
|
|
27
|
+
: {
|
|
28
|
+
position: "absolute",
|
|
29
|
+
bottom: "calc(100% + 6px)",
|
|
30
|
+
left: "50%",
|
|
31
|
+
width: "300px",
|
|
32
|
+
padding: "8px",
|
|
33
|
+
borderRadius: "4px",
|
|
34
|
+
fontSize: "0.9rem",
|
|
35
|
+
backgroundColor: "rgb(51,51,51)",
|
|
36
|
+
color: "rgb(255,255,255)",
|
|
37
|
+
maxWidth: "max-content",
|
|
38
|
+
translate: "-50% 0",
|
|
39
|
+
};
|
|
40
|
+
console.log(ariaHidden);
|
|
41
|
+
return (
|
|
42
|
+
<span className="qpp-tooltip-wrapper" style={{ position: "relative" }}>
|
|
43
|
+
<button
|
|
44
|
+
role="tooltip"
|
|
45
|
+
className="qpp-tooltip"
|
|
46
|
+
type="button"
|
|
47
|
+
style={tooltipButtonStyles}
|
|
48
|
+
onMouseEnter={() => setIsHidden(false)}
|
|
49
|
+
onMouseLeave={() => setIsHidden(true)}
|
|
50
|
+
onFocus={() => setIsHidden(false)}
|
|
51
|
+
onBlur={() => setIsHidden(true)}
|
|
52
|
+
>
|
|
53
|
+
{triggerContent}
|
|
54
|
+
<span style={tooltipStyles}>
|
|
55
|
+
{tooltipContent}
|
|
56
|
+
<div style={triangleStyles} />
|
|
57
|
+
</span>
|
|
58
|
+
</button>
|
|
59
|
+
</span>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import InfoTip from "../Infotip/Infotip";
|
|
3
2
|
import Subscribe from "./Subscribe";
|
|
4
3
|
import SocialLinks from "./SocialLinks";
|
|
5
4
|
import pjson from "../../package.json";
|
|
6
5
|
import { OpenInNewIcon } from "../../lib/SvgComponents";
|
|
6
|
+
import FooterTooltip from "./FooterTooltip";
|
|
7
7
|
|
|
8
|
-
const infoTipLabel =
|
|
9
|
-
"When dialing 711, you will automatically be connected to a TRS Communications Assistant who will relay your conversation to the help desk agent with strict confidentiality.";
|
|
10
8
|
const { version: buildVersion } = pjson;
|
|
11
9
|
const FooterUI = () => (
|
|
12
10
|
<>
|
|
@@ -94,20 +92,21 @@ const FooterUI = () => (
|
|
|
94
92
|
<p className="contact-title">Phone:</p>
|
|
95
93
|
<p>Monday - Friday 8 a.m - 8 p.m ET</p>
|
|
96
94
|
<p>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
95
|
+
<a href="tel:+18662888292">
|
|
96
|
+
<b className="sr-only">Contact CMS Phone</b>
|
|
97
|
+
<b className="sr-only">Monday - Friday 8 a.m - 8 p.m ET</b>
|
|
98
|
+
1-866-288-8292
|
|
99
|
+
</a>{" "}
|
|
100
|
+
<FooterTooltip
|
|
101
|
+
triggerContent="(TRS: 711)"
|
|
102
|
+
tooltipContent="TRS Communications Assistant Information When dialing 711, you will automatically be connected to a TRS Communications Assistant who will relay your conversation to the help desk agent with strict confidentiality."
|
|
103
|
+
/>
|
|
105
104
|
</p>
|
|
106
105
|
|
|
107
106
|
<p className="contact-title">Email:</p>
|
|
108
107
|
<p>
|
|
109
108
|
<a
|
|
110
|
-
aria-label="QPP@cms.hhs.gov"
|
|
109
|
+
aria-label="Contact CMS Email: QPP@cms.hhs.gov"
|
|
111
110
|
href="mailto:QPP@cms.hhs.gov"
|
|
112
111
|
className="email-link"
|
|
113
112
|
>
|