qpp-style 9.33.4 → 9.34.1
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/.eslintrc.js +11 -10
- package/.prettierrc +1 -0
- package/components/Accordion/index.jsx +13 -13
- package/components/Alert/index.js +7 -7
- package/components/Breadcrumb/index.js +5 -5
- package/components/Button/index.js +15 -15
- package/components/Details/DetailsIcons.js +3 -3
- package/components/Details/index.js +7 -7
- package/components/Dropdown/index.js +9 -9
- package/components/DropdownButton/Menu.js +4 -4
- package/components/DropdownButton/MenuButton.js +7 -7
- package/components/DropdownButton/MenuItem.js +5 -5
- package/components/DropdownButton/MenuItemLink.js +5 -5
- package/components/Error/Collapsible.jsx +3 -3
- package/components/Error/ErrorUI.jsx +4 -4
- package/components/Error/error.js +3 -3
- package/components/FlashNotification/FlashNotificationUI.jsx +8 -8
- package/components/FlashNotification/index.js +4 -4
- package/components/Footer/FooterUI.jsx +10 -10
- package/components/Footer/SocialLinks.jsx +1 -1
- package/components/Footer/Subscribe.jsx +1 -1
- package/components/Footer/footer.js +4 -4
- package/components/GovBanner/index.js +2 -2
- package/components/Header/HeaderAccountMenu.jsx +8 -8
- package/components/Header/HeaderCancel.jsx +2 -2
- package/components/Header/HeaderContainer.jsx +13 -13
- package/components/Header/HeaderLogo.jsx +2 -2
- package/components/Header/HeaderMenuButton.js +7 -7
- package/components/Header/HeaderMenuItem.jsx +37 -37
- package/components/Header/HeaderMenuLink.js +9 -9
- package/components/Header/HeaderMenuSignOutButton.js +9 -9
- package/components/Header/HeaderMobileButton.js +4 -4
- package/components/Header/HeaderUI.jsx +12 -12
- package/components/Header/HelpIcon.jsx +1 -1
- package/components/Header/ImpersonatorBanner.jsx +24 -24
- package/components/Header/NavigationButtonIcon.jsx +1 -1
- package/components/Header/header.js +3 -3
- package/components/Header/hooks.js +8 -8
- package/components/Header/utag-helpers.js +1 -1
- package/components/Infotip/Infotip.jsx +11 -11
- package/components/Infotip/InfotipContent.jsx +10 -10
- package/components/Infotip/InfotipIcon.jsx +5 -5
- package/components/Infotip/index.js +1 -1
- package/components/Link/index.js +11 -11
- package/components/Modal/LegacyModal.jsx +8 -8
- package/components/Modal/Modal.jsx +10 -10
- package/components/Modal/index.jsx +5 -5
- package/components/NotificationBanner/CollapsedView.js +4 -4
- package/components/NotificationBanner/ExpandedView.js +5 -5
- package/components/NotificationBanner/index.js +28 -28
- package/components/SanitizedContent/index.jsx +177 -177
- package/components/Search/index.js +14 -14
- package/components/Session/Session.jsx +8 -8
- package/components/Session/SessionDialogWrapped.jsx +3 -3
- package/components/Session/index.jsx +1 -1
- package/components/SideNav/AnimationGroup/AnimationGroup.jsx +5 -5
- package/components/SideNav/Content/LevelOneContent.jsx +10 -10
- package/components/SideNav/Content/SelectRole/index.js +5 -5
- package/components/SideNav/Content/SelectRole/utils.js +22 -22
- package/components/SideNav/Content/index.js +1 -1
- package/components/SideNav/Details/IndividualDetails.jsx +2 -2
- package/components/SideNav/Details/PracticeDetails.jsx +9 -3
- package/components/SideNav/Details/index.js +2 -2
- package/components/SideNav/Links/CmsSwitchLink.jsx +4 -4
- package/components/SideNav/Links/NavItemInline.jsx +7 -7
- package/components/SideNav/Links/NavLinkContainer.jsx +2 -2
- package/components/SideNav/Links/NavLinkDrawer.jsx +32 -32
- package/components/SideNav/Links/NavLinkInline.jsx +14 -14
- package/components/SideNav/Links/NavLinkToggle.jsx +7 -7
- package/components/SideNav/Links/index.js +5 -5
- package/components/SideNav/UI/SideNavUI.jsx +31 -30
- package/components/SideNav/UI/index.js +1 -1
- package/components/SideNav/helpers.js +82 -78
- package/components/SideNav/index.js +3 -3
- package/components/Tabs/Tabs.js +4 -4
- package/components/TextInput/index.js +21 -21
- package/components/hooks/useGetConfig.js +6 -6
- package/components/index.js +18 -18
- package/coverage/clover.xml +321 -427
- package/coverage/coverage-final.json +19 -21
- package/coverage/lcov-report/index.html +85 -115
- package/coverage/lcov-report/react/components/Accordion/index.html +1 -1
- package/coverage/lcov-report/react/components/Accordion/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Button/index.html +1 -1
- package/coverage/lcov-report/react/components/Button/index.js.html +1 -1
- package/coverage/lcov-report/react/components/Dropdown/index.html +1 -1
- package/coverage/lcov-report/react/components/Dropdown/index.js.html +1 -1
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Error/error.js.html +1 -1
- package/coverage/lcov-report/react/components/Error/index.html +1 -1
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Footer/footer.js.html +1 -1
- package/coverage/lcov-report/react/components/Footer/index.html +1 -1
- package/coverage/lcov-report/react/components/GovBanner/index.html +1 -1
- package/coverage/lcov-report/react/components/GovBanner/index.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +3 -3
- package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/header.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/hooks.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/index.html +1 -1
- package/coverage/lcov-report/react/components/Header/utag-helpers.js.html +1 -1
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +30 -30
- package/coverage/lcov-report/react/components/Infotip/InfotipContent.jsx.html +8 -8
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +9 -9
- package/coverage/lcov-report/react/components/Infotip/index.html +23 -38
- package/coverage/lcov-report/react/components/Modal/LegacyModal.jsx.html +3 -3
- package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +40 -40
- package/coverage/lcov-report/react/components/Modal/index.html +32 -32
- package/coverage/lcov-report/react/components/Modal/index.jsx.html +19 -19
- package/coverage/lcov-report/react/components/NotificationBanner/CollapsedView.js.html +1 -1
- package/coverage/lcov-report/react/components/NotificationBanner/ExpandedView.js.html +1 -1
- package/coverage/lcov-report/react/components/NotificationBanner/index.html +1 -1
- package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SanitizedContent/index.html +1 -1
- package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +5 -5
- package/coverage/lcov-report/react/components/Session/Session.jsx.html +382 -0
- package/coverage/lcov-report/react/components/Session/SessionDialogWrapped.jsx.html +121 -0
- package/coverage/lcov-report/react/components/Session/index.html +146 -0
- package/coverage/lcov-report/react/components/Session/index.jsx.html +94 -0
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/utils.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +25 -7
- package/coverage/lcov-report/react/components/SideNav/Details/index.html +13 -13
- package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +177 -66
- package/coverage/lcov-report/react/components/SideNav/UI/default-markup.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/UI/index.html +19 -19
- package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/helpers.js.html +40 -58
- package/coverage/lcov-report/react/components/SideNav/index.html +25 -25
- package/coverage/lcov-report/react/components/SideNav/index.js.html +13 -79
- package/coverage/lcov-report/react/components/hooks/index.html +1 -1
- package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +1 -1
- package/coverage/lcov-report/react/index.html +1 -1
- package/coverage/lcov-report/react/index.js.html +3 -3
- package/coverage/lcov-report/react/lib/Chevron.jsx.html +1 -1
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +71 -71
- package/coverage/lcov-report/react/lib/index.html +15 -15
- package/coverage/lcov-report/react/session/index.html +41 -41
- package/coverage/lcov-report/react/session/index.js.html +1 -1
- package/coverage/lcov-report/react/session/isAuthV2.js.html +21 -21
- package/coverage/lcov-report/react/session/logout.js.html +43 -43
- package/coverage/lcov-report/react/session/refresh.js.html +5 -8
- package/coverage/lcov-report/react/session/ttl.js.html +30 -30
- package/coverage/lcov.info +510 -715
- 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/package.json +3 -3
- package/styles/qppds/components/_modal.scss +45 -12
- package/styles/qppds/components/sidebar/_details.scss +3 -0
package/.eslintrc.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
extends: [
|
|
3
|
-
parser:
|
|
2
|
+
extends: ["eslint:recommended", "plugin:react/recommended"],
|
|
3
|
+
parser: "@babel/eslint-parser",
|
|
4
4
|
parserOptions: {
|
|
5
|
-
sourceType:
|
|
5
|
+
sourceType: "module",
|
|
6
6
|
ecmaFeatures: {
|
|
7
7
|
jsx: true,
|
|
8
8
|
},
|
|
@@ -15,17 +15,18 @@ module.exports = {
|
|
|
15
15
|
mocha: true,
|
|
16
16
|
},
|
|
17
17
|
rules: {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
"no-unused-vars": [
|
|
19
|
+
"error",
|
|
20
20
|
{
|
|
21
|
-
args:
|
|
21
|
+
args: "none",
|
|
22
22
|
},
|
|
23
23
|
],
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
"linebreak-style": ["error", "unix"],
|
|
25
|
+
"no-console": 0,
|
|
26
|
+
"no-prototype-builtins": [0],
|
|
27
|
+
"react/no-deprecated": [0],
|
|
27
28
|
},
|
|
28
29
|
settings: {
|
|
29
|
-
react: { version:
|
|
30
|
+
react: { version: "detect" },
|
|
30
31
|
},
|
|
31
32
|
};
|
package/.prettierrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import React, { useState, useRef, useEffect } from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { Chevron } from
|
|
1
|
+
import React, { useState, useRef, useEffect } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { Chevron } from "../../lib/Chevron.jsx";
|
|
4
4
|
|
|
5
5
|
const Accordion = (props) => {
|
|
6
6
|
const content = useRef(null);
|
|
7
|
-
const [setActive, setActiveState] = useState(props.isOpen ?
|
|
8
|
-
const ariaPressed = setActive ?
|
|
7
|
+
const [setActive, setActiveState] = useState(props.isOpen ? "active" : "");
|
|
8
|
+
const ariaPressed = setActive ? "true" : "false";
|
|
9
9
|
const getHeight = (node) => {
|
|
10
10
|
if (node) {
|
|
11
11
|
return `${node.scrollHeight}px`;
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return "auto";
|
|
14
14
|
};
|
|
15
|
-
const height = setActive ? getHeight(content.current) :
|
|
16
|
-
const rotate = setActive ?
|
|
15
|
+
const height = setActive ? getHeight(content.current) : "0px";
|
|
16
|
+
const rotate = setActive ? "accordion-icon rotate" : "accordion-icon";
|
|
17
17
|
|
|
18
18
|
function toggleAccordion() {
|
|
19
|
-
setActiveState(setActive ===
|
|
19
|
+
setActiveState(setActive === "" ? "active" : "");
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function openAccordion() {
|
|
23
|
-
setActiveState(
|
|
23
|
+
setActiveState("active");
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function closeAccordion() {
|
|
27
|
-
setActiveState(
|
|
27
|
+
setActiveState("");
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
useEffect(() => {
|
|
@@ -39,7 +39,7 @@ const Accordion = (props) => {
|
|
|
39
39
|
<div className="accordion-section" data-testid="accordion">
|
|
40
40
|
<button
|
|
41
41
|
className={`accordion ${setActive} ${
|
|
42
|
-
setActive && props.isSticky ?
|
|
42
|
+
setActive && props.isSticky ? "sticky" : ""
|
|
43
43
|
}`}
|
|
44
44
|
aria-label={props.title}
|
|
45
45
|
aria-pressed={ariaPressed}
|
|
@@ -89,7 +89,7 @@ Accordion.propTypes = {
|
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
Accordion.defaultProps = {
|
|
92
|
-
title:
|
|
92
|
+
title: "",
|
|
93
93
|
isOpen: false,
|
|
94
94
|
isSticky: false,
|
|
95
95
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
4
|
const Alert = ({
|
|
5
5
|
title,
|
|
@@ -9,7 +9,7 @@ const Alert = ({
|
|
|
9
9
|
className,
|
|
10
10
|
...rest
|
|
11
11
|
}) => {
|
|
12
|
-
const HeadingComponent = title?.headingLevel ||
|
|
12
|
+
const HeadingComponent = title?.headingLevel || "h2";
|
|
13
13
|
return (
|
|
14
14
|
<div
|
|
15
15
|
className={`qpp-c-alert qpp-c-alert--${variant} ${className}`}
|
|
@@ -19,7 +19,7 @@ const Alert = ({
|
|
|
19
19
|
<div className="qpp-c-alert__body">
|
|
20
20
|
{title && (
|
|
21
21
|
<HeadingComponent className="h4 qpp-c-alert__heading">
|
|
22
|
-
{typeof title ===
|
|
22
|
+
{typeof title === "object" ? title.text : title}
|
|
23
23
|
</HeadingComponent>
|
|
24
24
|
)}
|
|
25
25
|
{description && <p className="qpp-c-alert__text">{description}</p>}
|
|
@@ -40,14 +40,14 @@ Alert.propTypes = {
|
|
|
40
40
|
headingLevel: PropTypes.string,
|
|
41
41
|
}),
|
|
42
42
|
]),
|
|
43
|
-
variant: PropTypes.oneOf([
|
|
43
|
+
variant: PropTypes.oneOf(["info", "warning", "success", "error"]),
|
|
44
44
|
};
|
|
45
45
|
Alert.defaultProps = {
|
|
46
46
|
children: null,
|
|
47
|
-
className:
|
|
47
|
+
className: "",
|
|
48
48
|
description: null,
|
|
49
49
|
title: null,
|
|
50
|
-
variant:
|
|
50
|
+
variant: "info",
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export default Alert;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
4
|
const Breadcrumb = ({
|
|
5
5
|
breadcrumbClass,
|
|
@@ -11,7 +11,7 @@ const Breadcrumb = ({
|
|
|
11
11
|
return (
|
|
12
12
|
<nav
|
|
13
13
|
className={`qpp-c-breadcrumbs ${
|
|
14
|
-
!dark ?
|
|
14
|
+
!dark ? "qpp-c-breadcrumbs--light" : ""
|
|
15
15
|
} ${breadcrumbClass}`}
|
|
16
16
|
aria-label="Breadcrumbs"
|
|
17
17
|
>
|
|
@@ -51,7 +51,7 @@ const Breadcrumb = ({
|
|
|
51
51
|
<li
|
|
52
52
|
key={crumb}
|
|
53
53
|
className={`${
|
|
54
|
-
i === crumbs.length - 1 ?
|
|
54
|
+
i === crumbs.length - 1 ? "sr-only" : ""
|
|
55
55
|
} qpp-c-breadcrumbs__list-itemqpp-c-breadcrumbs__list-item--current`}
|
|
56
56
|
aria-current="page"
|
|
57
57
|
>
|
|
@@ -74,7 +74,7 @@ Breadcrumb.propTypes = {
|
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
Breadcrumb.defaultProps = {
|
|
77
|
-
breadcrumbClass:
|
|
77
|
+
breadcrumbClass: "",
|
|
78
78
|
dark: false,
|
|
79
79
|
RouterLink: null,
|
|
80
80
|
routerExcludedLinks: [],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
|
-
const VARIANTS = [
|
|
5
|
-
const SIZES = [
|
|
4
|
+
const VARIANTS = ["secondary", "outline", "danger", "white"];
|
|
5
|
+
const SIZES = ["big"];
|
|
6
6
|
|
|
7
7
|
const Button = ({
|
|
8
8
|
children,
|
|
@@ -15,16 +15,16 @@ const Button = ({
|
|
|
15
15
|
type,
|
|
16
16
|
...rest
|
|
17
17
|
}) => {
|
|
18
|
-
let btnClass =
|
|
18
|
+
let btnClass = "qpp-c-button";
|
|
19
19
|
|
|
20
20
|
if (VARIANTS.includes(variant)) {
|
|
21
|
-
btnClass = btnClass.concat(
|
|
21
|
+
btnClass = btnClass.concat(" ", `qpp-c-button--${variant}`);
|
|
22
22
|
}
|
|
23
23
|
if (SIZES.includes(size)) {
|
|
24
|
-
btnClass = btnClass.concat(
|
|
24
|
+
btnClass = btnClass.concat(" ", `qpp-c-button--${size}`);
|
|
25
25
|
}
|
|
26
26
|
if (className) {
|
|
27
|
-
btnClass = btnClass.concat(
|
|
27
|
+
btnClass = btnClass.concat(" ", className);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
if (href) {
|
|
@@ -32,7 +32,7 @@ const Button = ({
|
|
|
32
32
|
<a
|
|
33
33
|
href={href}
|
|
34
34
|
data-testid="ds-btn"
|
|
35
|
-
className={btnClass ||
|
|
35
|
+
className={btnClass || ""}
|
|
36
36
|
onClick={onClick}
|
|
37
37
|
>
|
|
38
38
|
{children}
|
|
@@ -42,7 +42,7 @@ const Button = ({
|
|
|
42
42
|
return (
|
|
43
43
|
<button
|
|
44
44
|
data-testid="ds-btn"
|
|
45
|
-
className={btnClass ||
|
|
45
|
+
className={btnClass || ""}
|
|
46
46
|
onClick={onClick}
|
|
47
47
|
disabled={loading}
|
|
48
48
|
type={type}
|
|
@@ -66,16 +66,16 @@ Button.propTypes = {
|
|
|
66
66
|
|
|
67
67
|
Button.defaultProps = {
|
|
68
68
|
children: false,
|
|
69
|
-
className:
|
|
70
|
-
href:
|
|
69
|
+
className: "",
|
|
70
|
+
href: "",
|
|
71
71
|
loading: false,
|
|
72
72
|
onClick: () => null,
|
|
73
73
|
size: null,
|
|
74
|
-
type:
|
|
74
|
+
type: "button",
|
|
75
75
|
variant: null,
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
export const TextButton = ({ className =
|
|
78
|
+
export const TextButton = ({ className = "", ...props }) => (
|
|
79
79
|
<Button className={`qpp-c-button--text ${className}`} {...props} />
|
|
80
80
|
);
|
|
81
81
|
|
|
@@ -84,7 +84,7 @@ TextButton.propTypes = {
|
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
TextButton.defaultProps = {
|
|
87
|
-
className:
|
|
87
|
+
className: "",
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
export default Button;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
4
|
export const Add = ({ iconText }) => (
|
|
5
5
|
<>
|
|
@@ -12,7 +12,7 @@ export const Add = ({ iconText }) => (
|
|
|
12
12
|
focusable="false"
|
|
13
13
|
>
|
|
14
14
|
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
|
|
15
|
-
</svg>{
|
|
15
|
+
</svg>{" "}
|
|
16
16
|
{iconText}
|
|
17
17
|
</>
|
|
18
18
|
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { Add, Remove } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { Add, Remove } from "./DetailsIcons";
|
|
4
4
|
|
|
5
5
|
const Details = ({ children, title, variant, className, ...rest }) => {
|
|
6
|
-
if (variant ===
|
|
6
|
+
if (variant === "header") {
|
|
7
7
|
return (
|
|
8
8
|
<details className="qpp-c-details qpp-c-details--header">
|
|
9
9
|
<summary>
|
|
@@ -24,7 +24,7 @@ const Details = ({ children, title, variant, className, ...rest }) => {
|
|
|
24
24
|
<details className={`qpp-c-details ${className}`} {...rest}>
|
|
25
25
|
<summary
|
|
26
26
|
className={
|
|
27
|
-
variant ===
|
|
27
|
+
variant === "text-button" ? "qpp-c-button qpp-c-button--text" : ""
|
|
28
28
|
}
|
|
29
29
|
>
|
|
30
30
|
<Add />
|
|
@@ -39,7 +39,7 @@ const Details = ({ children, title, variant, className, ...rest }) => {
|
|
|
39
39
|
Details.propTypes = {
|
|
40
40
|
children: PropTypes.node,
|
|
41
41
|
title: PropTypes.node,
|
|
42
|
-
variant: PropTypes.oneOf([
|
|
42
|
+
variant: PropTypes.oneOf(["header", "text-button"]),
|
|
43
43
|
className: PropTypes.string,
|
|
44
44
|
};
|
|
45
45
|
|
|
@@ -47,7 +47,7 @@ Details.defaultProps = {
|
|
|
47
47
|
children: false,
|
|
48
48
|
title: null,
|
|
49
49
|
variant: null,
|
|
50
|
-
className:
|
|
50
|
+
className: "",
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export default Details;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
4
|
const Dropdown = ({
|
|
5
5
|
className,
|
|
@@ -18,19 +18,19 @@ const Dropdown = ({
|
|
|
18
18
|
...rest
|
|
19
19
|
}) => {
|
|
20
20
|
const dropdownClass = [
|
|
21
|
-
|
|
22
|
-
size ===
|
|
21
|
+
"qpp-c-dropdown",
|
|
22
|
+
size === "big" && "qpp-c-dropdown--big",
|
|
23
23
|
className,
|
|
24
24
|
]
|
|
25
25
|
.filter(Boolean)
|
|
26
|
-
.join(
|
|
26
|
+
.join(" ");
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
29
|
<select
|
|
30
30
|
id={id}
|
|
31
31
|
aria-labelledby={ariaLabelledBy}
|
|
32
32
|
aria-label={ariaLabel}
|
|
33
|
-
className={dropdownClass ||
|
|
33
|
+
className={dropdownClass || ""}
|
|
34
34
|
onChange={onChange}
|
|
35
35
|
data-testid={dataTestId}
|
|
36
36
|
name={name}
|
|
@@ -61,14 +61,14 @@ Dropdown.propTypes = {
|
|
|
61
61
|
name: PropTypes.string,
|
|
62
62
|
dataType: PropTypes.string,
|
|
63
63
|
disabled: PropTypes.bool,
|
|
64
|
-
size: PropTypes.oneOf([
|
|
64
|
+
size: PropTypes.oneOf(["big"]),
|
|
65
65
|
options: PropTypes.array,
|
|
66
66
|
parentElement: PropTypes.string,
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
Dropdown.defaultProps = {
|
|
70
70
|
children: false,
|
|
71
|
-
className:
|
|
71
|
+
className: "qpp-u-width--100",
|
|
72
72
|
id: null,
|
|
73
73
|
ariaLabelledBy: null,
|
|
74
74
|
ariaLabel: null,
|
|
@@ -79,7 +79,7 @@ Dropdown.defaultProps = {
|
|
|
79
79
|
disabled: false,
|
|
80
80
|
size: null,
|
|
81
81
|
options: [],
|
|
82
|
-
parentElement:
|
|
82
|
+
parentElement: "span",
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
export default Dropdown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { Menu as AriaKitMenu } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { Menu as AriaKitMenu } from "ariakit/menu";
|
|
4
4
|
|
|
5
5
|
function Menu({ state, className, children, ...props }) {
|
|
6
6
|
return (
|
|
@@ -18,7 +18,7 @@ Menu.propTypes = {
|
|
|
18
18
|
|
|
19
19
|
Menu.defaultProps = {
|
|
20
20
|
className:
|
|
21
|
-
|
|
21
|
+
"qpp-c-dropdown-menu qpp-c-dropdown-menu__box qpp-c-dropdown-menu__list",
|
|
22
22
|
children: null,
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { MenuButton as AriaKitButton } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { MenuButton as AriaKitButton } from "ariakit/menu";
|
|
4
4
|
|
|
5
5
|
function MenuButton({ state, className, iconExist, children, ...props }) {
|
|
6
6
|
const dropDownIsOpen = state.open;
|
|
7
7
|
|
|
8
|
-
const CheveronUpIcon =
|
|
9
|
-
const CheveronDownIcon =
|
|
8
|
+
const CheveronUpIcon = "M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z";
|
|
9
|
+
const CheveronDownIcon = "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z";
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<AriaKitButton state={state} className={className} {...props}>
|
|
13
|
-
{children}{
|
|
13
|
+
{children}{" "}
|
|
14
14
|
{iconExist && (
|
|
15
15
|
<svg
|
|
16
16
|
className="qpp-icon-mat qpp-icon-inline--lg"
|
|
@@ -33,7 +33,7 @@ MenuButton.propTypes = {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
MenuButton.defaultProps = {
|
|
36
|
-
className:
|
|
36
|
+
className: "qpp-c-button",
|
|
37
37
|
iconExist: true,
|
|
38
38
|
children: null,
|
|
39
39
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { MenuItem as AriaKitMenuItem } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { MenuItem as AriaKitMenuItem } from "ariakit/menu";
|
|
4
4
|
|
|
5
5
|
function MenuItem({ as, className, children, ...props }) {
|
|
6
6
|
return (
|
|
@@ -17,8 +17,8 @@ MenuItem.propTypes = {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
MenuItem.defaultProps = {
|
|
20
|
-
as:
|
|
21
|
-
className:
|
|
20
|
+
as: "li",
|
|
21
|
+
className: "qpp-c-dropdown-menu__item",
|
|
22
22
|
children: null,
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { MenuItem as AriaKitMenuItem } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { MenuItem as AriaKitMenuItem } from "ariakit/menu";
|
|
4
4
|
|
|
5
5
|
function MenuItemLink({ as, className, children, ...props }) {
|
|
6
6
|
return (
|
|
@@ -19,8 +19,8 @@ MenuItemLink.propTypes = {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
MenuItemLink.defaultProps = {
|
|
22
|
-
as:
|
|
23
|
-
className:
|
|
22
|
+
as: "a",
|
|
23
|
+
className: "qpp-c-dropdown-menu__item",
|
|
24
24
|
children: null,
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
4
|
class Collapsible extends Component {
|
|
5
5
|
constructor(props) {
|
|
@@ -32,7 +32,7 @@ class Collapsible extends Component {
|
|
|
32
32
|
<span className="collapsible-hide-label">{this.props.hideLabel}</span>
|
|
33
33
|
);
|
|
34
34
|
} else {
|
|
35
|
-
return
|
|
35
|
+
return "";
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import Collapsible from
|
|
3
|
-
import PropTypes from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Collapsible from "./Collapsible";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
4
|
|
|
5
5
|
const ErrorUI = (props) => {
|
|
6
|
-
let errorTitle = `${props.type ||
|
|
6
|
+
let errorTitle = `${props.type || "Error"} ${props.code || ""}`;
|
|
7
7
|
let errorDetails = props.message;
|
|
8
8
|
|
|
9
9
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { Component } from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import reactDOM from
|
|
4
|
-
import { CloseXIcon } from
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import reactDOM from "react-dom";
|
|
4
|
+
import { CloseXIcon } from "../../lib/SvgComponents.jsx";
|
|
5
5
|
|
|
6
6
|
class FlashNotification extends Component {
|
|
7
7
|
constructor(props) {
|
|
@@ -16,14 +16,14 @@ class FlashNotification extends Component {
|
|
|
16
16
|
<div
|
|
17
17
|
className={
|
|
18
18
|
this.state.isClosed
|
|
19
|
-
?
|
|
20
|
-
:
|
|
19
|
+
? "flash-notification notification-closed"
|
|
20
|
+
: "flash-notification"
|
|
21
21
|
}
|
|
22
22
|
ref={(elem) => {
|
|
23
23
|
this.element = elem;
|
|
24
24
|
}}
|
|
25
25
|
>
|
|
26
|
-
<div className={this.props.success ?
|
|
26
|
+
<div className={this.props.success ? "success" : "error"}>
|
|
27
27
|
<div className="icon"></div>
|
|
28
28
|
<div className="text-content">
|
|
29
29
|
<p className="title-text">{this.props.titleText}</p>
|
|
@@ -67,7 +67,7 @@ class FlashNotification extends Component {
|
|
|
67
67
|
setTimeout(
|
|
68
68
|
function () {
|
|
69
69
|
reactDOM.unmountComponentAtNode(this.element.parentElement);
|
|
70
|
-
if (typeof this.props.onClose ===
|
|
70
|
+
if (typeof this.props.onClose === "function") {
|
|
71
71
|
this.props.onClose();
|
|
72
72
|
}
|
|
73
73
|
}.bind(this),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { render } from
|
|
3
|
-
import FlashNotificationUI from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "react-dom";
|
|
3
|
+
import FlashNotificationUI from "./FlashNotificationUI";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Renders the Confirmation/Error Flash Component
|
|
@@ -14,7 +14,7 @@ export default class FlashNotification {
|
|
|
14
14
|
* @param {HTMLElement} options.rootElement - Elem inside which to render
|
|
15
15
|
*/
|
|
16
16
|
constructor(options) {
|
|
17
|
-
if (options.hasOwnProperty(
|
|
17
|
+
if (options.hasOwnProperty("rootElement")) {
|
|
18
18
|
render(
|
|
19
19
|
<FlashNotificationUI
|
|
20
20
|
success={options.success}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import InfoTip from
|
|
3
|
-
import Subscribe from
|
|
4
|
-
import SocialLinks from
|
|
5
|
-
import pjson from
|
|
6
|
-
import { OpenInNewIcon } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import InfoTip from "../Infotip/Infotip";
|
|
3
|
+
import Subscribe from "./Subscribe";
|
|
4
|
+
import SocialLinks from "./SocialLinks";
|
|
5
|
+
import pjson from "../../package.json";
|
|
6
|
+
import { OpenInNewIcon } from "../../lib/SvgComponents";
|
|
7
7
|
|
|
8
8
|
const infoTipLabel =
|
|
9
|
-
|
|
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
10
|
const { version: buildVersion } = pjson;
|
|
11
11
|
|
|
12
12
|
const FooterUI = () => (
|
|
@@ -16,7 +16,7 @@ const FooterUI = () => (
|
|
|
16
16
|
<hr />
|
|
17
17
|
<p>
|
|
18
18
|
<strong>Help shape the future of QPP.</strong> Participate in a user
|
|
19
|
-
feedback session.{
|
|
19
|
+
feedback session.{" "}
|
|
20
20
|
<a className="email-note-link" href="/about/hcd-research">
|
|
21
21
|
Sign up now
|
|
22
22
|
</a>
|
|
@@ -152,7 +152,7 @@ const FooterUI = () => (
|
|
|
152
152
|
CMS Privacy Notice
|
|
153
153
|
</a>
|
|
154
154
|
</li>
|
|
155
|
-
<li className="divider"></li>{
|
|
155
|
+
<li className="divider"></li>{" "}
|
|
156
156
|
<li>
|
|
157
157
|
<a
|
|
158
158
|
href="/accessibility"
|
|
@@ -164,7 +164,7 @@ const FooterUI = () => (
|
|
|
164
164
|
Accessibility
|
|
165
165
|
</a>
|
|
166
166
|
</li>
|
|
167
|
-
<li className="divider"></li>{
|
|
167
|
+
<li className="divider"></li>{" "}
|
|
168
168
|
<li>
|
|
169
169
|
<a
|
|
170
170
|
aria-label="Download Adobe Reader"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { render } from
|
|
3
|
-
import FooterUI from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "react-dom";
|
|
3
|
+
import FooterUI from "./FooterUI";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Renders the QPP Footer content.
|
|
@@ -11,7 +11,7 @@ export default class Footer {
|
|
|
11
11
|
* @param {HTMLElement} options.rootElement - Elem inside which to render
|
|
12
12
|
*/
|
|
13
13
|
constructor(options) {
|
|
14
|
-
if (options.hasOwnProperty(
|
|
14
|
+
if (options.hasOwnProperty("rootElement")) {
|
|
15
15
|
render(<FooterUI />, options.rootElement);
|
|
16
16
|
} else {
|
|
17
17
|
render(<FooterUI />, options);
|