qpp-style 9.45.2 → 9.45.4

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.
@@ -0,0 +1,65 @@
1
+ /* eslint-disable react/prop-types */
2
+ import React, { useState } from "react";
3
+
4
+ export default function FooterTooltip({
5
+ triggerContent,
6
+ tooltipContent,
7
+ tooltipId,
8
+ }) {
9
+ const [isHidden, setIsHidden] = useState(true);
10
+ const ariaHidden = isHidden ? "true" : "false";
11
+ const tooltipButtonStyles = {
12
+ position: "relative",
13
+ background: "transparent",
14
+ border: "none",
15
+ display: "inline-block",
16
+ };
17
+ const triangleStyles = {
18
+ position: "absolute",
19
+ top: "100%",
20
+ left: "50%",
21
+ translate: "-50% 0",
22
+ border: "6px solid transparent",
23
+ borderTop: "6px solid rgb(51,51,51)",
24
+ width: "6px",
25
+ height: "6px",
26
+ };
27
+ const tooltipStyles = isHidden
28
+ ? {
29
+ display: "none",
30
+ }
31
+ : {
32
+ position: "absolute",
33
+ bottom: "calc(100% + 6px)",
34
+ left: "50%",
35
+ width: "300px",
36
+ padding: "8px",
37
+ borderRadius: "4px",
38
+ fontSize: "0.9rem",
39
+ backgroundColor: "rgb(51,51,51)",
40
+ color: "rgb(255,255,255)",
41
+ maxWidth: "max-content",
42
+ translate: "-50% 0",
43
+ };
44
+ console.log(ariaHidden);
45
+ return (
46
+ <span className="tooltip-wrapper" style={{ position: "relative" }}>
47
+ <button
48
+ role="tooltip"
49
+ className="tooltip"
50
+ type="button"
51
+ style={tooltipButtonStyles}
52
+ onMouseEnter={() => setIsHidden(false)}
53
+ onMouseLeave={() => setIsHidden(true)}
54
+ onFocus={() => setIsHidden(false)}
55
+ onBlur={() => setIsHidden(true)}
56
+ >
57
+ {triggerContent}
58
+ <span style={tooltipStyles}>
59
+ {tooltipContent}
60
+ <div style={triangleStyles} />
61
+ </span>
62
+ </button>
63
+ </span>
64
+ );
65
+ }
@@ -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
- 1-866-288-8292 (TRS: 711)
98
- <span id="info-tip" className="footer-trs-infotip">
99
- <InfoTip
100
- aria-labelledby="footer-trs-infotip"
101
- ariaLabel="TRS Communications Assistant Information"
102
- label={infoTipLabel}
103
- />
104
- </span>
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
  >
@@ -18,7 +18,7 @@ function shouldShowInactiveDialog(
18
18
  timeRemainingSeconds,
19
19
  warningTimeoutSeconds = DEFAULT_WARNING_TIMEOUT_SECONDS,
20
20
  ) {
21
- return timeRemainingSeconds < warningTimeoutSeconds;
21
+ return timeRemainingSeconds <= warningTimeoutSeconds;
22
22
  }
23
23
 
24
24
  const Session = () => {