qpp-style 9.28.3-mo-beta.0 → 9.28.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/components/Accordion/index.jsx +5 -1
- package/components/SideNav/Content/SelectRole/index.js +10 -18
- package/components/SideNav/Links/NavLinkDrawer.jsx +20 -3
- 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/checkmark.svg +2 -2
- package/images/icons/svg/chevron-down.svg +6 -6
- package/images/icons/svg/chevron-left.svg +5 -5
- package/images/icons/svg/chevron-right.svg +5 -5
- package/images/icons/svg/chevron-up.svg +5 -5
- package/images/icons/svg/clipboard.svg +1 -1
- package/images/icons/svg/divide.svg +3 -3
- package/images/icons/svg/doctors-and-clinicians-preview.svg +3 -3
- package/images/icons/svg/equals.svg +3 -3
- package/images/icons/svg/exclamation.svg +4 -5
- package/images/icons/svg/info.svg +7 -10
- package/images/icons/svg/manage-user-access.svg +3 -3
- package/images/icons/svg/multiply.svg +3 -3
- package/images/icons/svg/performance-feedback.svg +1 -1
- package/images/icons/svg/plus.svg +3 -3
- package/images/icons/svg/preview.svg +6 -8
- package/images/icons/svg/reporting.svg +6 -8
- package/images/icons/svg/save-disk.svg +2 -2
- package/images/icons/svg/subtract.svg +2 -2
- package/images/icons/svg/targeted-review.svg +6 -6
- package/package.json +2 -1
- package/styles/components/_accordion.scss +7 -0
|
@@ -38,7 +38,9 @@ const Accordion = (props) => {
|
|
|
38
38
|
return (
|
|
39
39
|
<div className="accordion-section" data-testid="accordion">
|
|
40
40
|
<button
|
|
41
|
-
className={`accordion ${setActive}
|
|
41
|
+
className={`accordion ${setActive} ${
|
|
42
|
+
setActive && props.isSticky ? 'sticky' : ''
|
|
43
|
+
}`}
|
|
42
44
|
aria-label={props.title}
|
|
43
45
|
aria-pressed={ariaPressed}
|
|
44
46
|
aria-expanded={ariaPressed}
|
|
@@ -83,11 +85,13 @@ Accordion.propTypes = {
|
|
|
83
85
|
centerItem: PropTypes.string,
|
|
84
86
|
rightItem: PropTypes.string,
|
|
85
87
|
isOpen: PropTypes.bool,
|
|
88
|
+
isSticky: PropTypes.bool,
|
|
86
89
|
};
|
|
87
90
|
|
|
88
91
|
Accordion.defaultProps = {
|
|
89
92
|
title: '',
|
|
90
93
|
isOpen: false,
|
|
94
|
+
isSticky: false,
|
|
91
95
|
};
|
|
92
96
|
|
|
93
97
|
export default Accordion;
|
|
@@ -54,26 +54,18 @@ const SelectRole = ({ selectedRole, setSelectedRole }) => {
|
|
|
54
54
|
}
|
|
55
55
|
}, []);
|
|
56
56
|
|
|
57
|
-
const singleRoleUser = ROLE_OPTIONS.length === 1;
|
|
58
|
-
|
|
59
|
-
const MultiRoleDropdown = () => (
|
|
60
|
-
<Dropdown
|
|
61
|
-
value={selectedRole}
|
|
62
|
-
name="user-role-selection"
|
|
63
|
-
ariaLabel="Select User Role"
|
|
64
|
-
className="qpp-u-width--100 SelectRole__Dropdown"
|
|
65
|
-
options={ROLE_OPTIONS}
|
|
66
|
-
onChange={handleSelection}
|
|
67
|
-
disabled={isHelpdeskRoleAndImpersonating}
|
|
68
|
-
/>
|
|
69
|
-
);
|
|
70
|
-
|
|
71
57
|
return (
|
|
72
58
|
<div className="SelectRole__Container">
|
|
73
|
-
<p className="SelectRole__Text">
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
59
|
+
<p className="SelectRole__Text">You are viewing as a</p>
|
|
60
|
+
<Dropdown
|
|
61
|
+
value={selectedRole}
|
|
62
|
+
name="user-role-selection"
|
|
63
|
+
ariaLabel="Select User Role"
|
|
64
|
+
className="qpp-u-width--100 SelectRole__Dropdown"
|
|
65
|
+
options={ROLE_OPTIONS}
|
|
66
|
+
onChange={handleSelection}
|
|
67
|
+
disabled={isHelpdeskRoleAndImpersonating}
|
|
68
|
+
/>
|
|
77
69
|
</div>
|
|
78
70
|
);
|
|
79
71
|
};
|
|
@@ -28,6 +28,9 @@ const NavLinkDrawer = ({
|
|
|
28
28
|
}) => {
|
|
29
29
|
const [isOpen, setIsOpen] = useState(openByDefault);
|
|
30
30
|
const MANAGE_ACCESS = '/user/manage-access';
|
|
31
|
+
const ELIGIBILITY_REPORTING = '/user/dashboard';
|
|
32
|
+
const REGISTRATION = '/user/registration';
|
|
33
|
+
const SUBMISSION_FEEDBACK = '/user/submissions/feedback';
|
|
31
34
|
|
|
32
35
|
const toggleDrawer = () => {
|
|
33
36
|
if (!isExpanded && typeof sidebarExpand === 'function') {
|
|
@@ -44,11 +47,25 @@ const NavLinkDrawer = ({
|
|
|
44
47
|
};
|
|
45
48
|
|
|
46
49
|
const reRouteHandler = () => {
|
|
47
|
-
if (url
|
|
48
|
-
|
|
50
|
+
if (url) {
|
|
51
|
+
window.location.href = url;
|
|
49
52
|
}
|
|
50
53
|
};
|
|
51
54
|
|
|
55
|
+
const parentRerouteUrls = [
|
|
56
|
+
MANAGE_ACCESS,
|
|
57
|
+
ELIGIBILITY_REPORTING,
|
|
58
|
+
REGISTRATION,
|
|
59
|
+
SUBMISSION_FEEDBACK,
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
const parentReroute = (url) => {
|
|
63
|
+
if (parentRerouteUrls.includes(url)) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
};
|
|
68
|
+
|
|
52
69
|
const isLinkActive = (link, func) => {
|
|
53
70
|
if (typeof func === 'function') {
|
|
54
71
|
return func(link);
|
|
@@ -201,7 +218,7 @@ const NavLinkDrawer = ({
|
|
|
201
218
|
{...(!isAlwaysOpen ? { 'aria-pressed': isOpen } : {})}
|
|
202
219
|
tabIndex="0"
|
|
203
220
|
aria-label={label}
|
|
204
|
-
{...((url
|
|
221
|
+
{...((parentReroute(url) && isAlwaysOpen) || disabled
|
|
205
222
|
? { disabled: isAlwaysOpen || disabled }
|
|
206
223
|
: {})}
|
|
207
224
|
className={`${className} ${expandedClass} ${highlightTitle(
|