qpp-style 9.45.8 → 9.45.10

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.
Files changed (178) hide show
  1. package/.babelrc +8 -1
  2. package/.husky/pre-push +2 -0
  3. package/components/Accordion/index.jsx +1 -1
  4. package/components/Button/index.js +0 -1
  5. package/components/Dropdown/index.js +0 -1
  6. package/components/Error/Collapsible.jsx +1 -1
  7. package/components/Error/ErrorUI.jsx +0 -1
  8. package/components/Error/error.js +3 -4
  9. package/components/Footer/DevPreFooter.jsx +0 -1
  10. package/components/Footer/FooterTooltip.jsx +1 -1
  11. package/components/Footer/FooterUI.jsx +0 -1
  12. package/components/Footer/SocialLinks.jsx +0 -2
  13. package/components/Footer/Subscribe.jsx +0 -2
  14. package/components/Footer/footer.js +5 -4
  15. package/components/GovBanner/index.js +1 -1
  16. package/components/Header/HeaderAccountMenu.jsx +0 -1
  17. package/components/Header/HeaderCancel.jsx +0 -1
  18. package/components/Header/HeaderContainer.jsx +0 -1
  19. package/components/Header/HeaderLogo.jsx +0 -1
  20. package/components/Header/HeaderMenuButton.js +0 -1
  21. package/components/Header/HeaderMenuItem.jsx +1 -1
  22. package/components/Header/HeaderMenuLink.js +0 -1
  23. package/components/Header/HeaderMenuSignOutButton.js +1 -1
  24. package/components/Header/HeaderMobileButton.js +0 -1
  25. package/components/Header/HeaderUI.jsx +1 -1
  26. package/components/Header/HelpIcon.jsx +0 -2
  27. package/components/Header/ImpersonatorBanner.jsx +0 -1
  28. package/components/Header/NavigationButtonIcon.jsx +0 -2
  29. package/components/Header/PreviewBanner.jsx +0 -1
  30. package/components/Header/header.js +3 -4
  31. package/components/Header/hooks.js +1 -1
  32. package/components/HeaderSearchBar/index.jsx +1 -1
  33. package/components/Infotip/Infotip.jsx +0 -1
  34. package/components/Infotip/InfotipContent.jsx +10 -18
  35. package/components/Infotip/InfotipIcon.jsx +0 -1
  36. package/components/Modal/LegacyModal.jsx +4 -3
  37. package/components/Modal/Modal.jsx +1 -1
  38. package/components/Modal/index.jsx +0 -1
  39. package/components/NotificationBanner/CollapsedView.js +1 -1
  40. package/components/NotificationBanner/ExpandedView.js +0 -1
  41. package/components/NotificationBanner/index.js +1 -1
  42. package/components/SanitizedContent/index.jsx +0 -1
  43. package/components/Session/Session.jsx +1 -1
  44. package/components/Session/SessionDialogWrapped.jsx +3 -3
  45. package/components/SideNav/AnimationGroup/AnimationGroup.jsx +0 -1
  46. package/components/SideNav/Content/LevelOneContent.jsx +1 -1
  47. package/components/SideNav/Content/SelectRole/index.js +1 -1
  48. package/components/SideNav/Content/SelectRole/utils.js +1 -0
  49. package/components/SideNav/Details/IndividualDetails.jsx +0 -1
  50. package/components/SideNav/Details/PracticeDetails.jsx +0 -1
  51. package/components/SideNav/Links/CmsSwitchLink.jsx +0 -1
  52. package/components/SideNav/Links/NavItemInline.jsx +0 -1
  53. package/components/SideNav/Links/NavLinkContainer.jsx +2 -2
  54. package/components/SideNav/Links/NavLinkDrawer.jsx +1 -1
  55. package/components/SideNav/Links/NavLinkInline.jsx +6 -6
  56. package/components/SideNav/Links/NavLinkToggle.jsx +0 -1
  57. package/components/SideNav/UI/DynamicContent.jsx +0 -1
  58. package/components/SideNav/UI/SideNavUI.jsx +1 -1
  59. package/components/SideNav/index.js +3 -4
  60. package/components/Tabs/Tabs.js +10 -16
  61. package/components/hooks/useGetConfig.js +0 -1
  62. package/coverage/clover.xml +591 -549
  63. package/coverage/coverage-final.json +59 -54
  64. package/coverage/lcov-report/index.html +128 -113
  65. package/coverage/lcov-report/react/components/Accordion/index.html +13 -13
  66. package/coverage/lcov-report/react/components/Accordion/index.jsx.html +36 -36
  67. package/coverage/lcov-report/react/components/Button/index.html +13 -13
  68. package/coverage/lcov-report/react/components/Button/index.js.html +13 -61
  69. package/coverage/lcov-report/react/components/Dropdown/index.html +13 -13
  70. package/coverage/lcov-report/react/components/Dropdown/index.js.html +20 -71
  71. package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +43 -43
  72. package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +21 -24
  73. package/coverage/lcov-report/react/components/Error/error.js.html +8 -11
  74. package/coverage/lcov-report/react/components/Error/index.html +34 -34
  75. package/coverage/lcov-report/react/components/Footer/FooterTooltip.jsx.html +262 -0
  76. package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +20 -26
  77. package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +3 -9
  78. package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +3 -9
  79. package/coverage/lcov-report/react/components/Footer/footer.js.html +13 -10
  80. package/coverage/lcov-report/react/components/Footer/index.html +28 -13
  81. package/coverage/lcov-report/react/components/GovBanner/index.html +1 -1
  82. package/coverage/lcov-report/react/components/GovBanner/index.js.html +2 -2
  83. package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +17 -20
  84. package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +3 -6
  85. package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +13 -37
  86. package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +5 -8
  87. package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +3 -6
  88. package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +11 -29
  89. package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +3 -6
  90. package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +2 -2
  91. package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +3 -6
  92. package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +34 -49
  93. package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +3 -9
  94. package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +4 -7
  95. package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +3 -9
  96. package/coverage/lcov-report/react/components/Header/PreviewBanner.jsx.html +148 -0
  97. package/coverage/lcov-report/react/components/Header/header.js.html +8 -11
  98. package/coverage/lcov-report/react/components/Header/hooks.js.html +9 -21
  99. package/coverage/lcov-report/react/components/Header/index.html +61 -46
  100. package/coverage/lcov-report/react/components/Header/utag-helpers.js.html +1 -1
  101. package/coverage/lcov-report/react/components/HeaderSearchBar/index.html +19 -19
  102. package/coverage/lcov-report/react/components/HeaderSearchBar/index.jsx.html +65 -11
  103. package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +19 -25
  104. package/coverage/lcov-report/react/components/Infotip/InfotipContent.jsx.html +25 -43
  105. package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +11 -26
  106. package/coverage/lcov-report/react/components/Infotip/index.html +14 -14
  107. package/coverage/lcov-report/react/components/Infotip/index.js.html +1 -1
  108. package/coverage/lcov-report/react/components/Modal/LegacyModal.jsx.html +12 -9
  109. package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +11 -38
  110. package/coverage/lcov-report/react/components/Modal/index.html +26 -26
  111. package/coverage/lcov-report/react/components/Modal/index.jsx.html +9 -21
  112. package/coverage/lcov-report/react/components/NotificationBanner/CollapsedView.js.html +2 -2
  113. package/coverage/lcov-report/react/components/NotificationBanner/ExpandedView.js.html +3 -6
  114. package/coverage/lcov-report/react/components/NotificationBanner/index.html +13 -13
  115. package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +29 -35
  116. package/coverage/lcov-report/react/components/SanitizedContent/index.html +1 -1
  117. package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +3 -6
  118. package/coverage/lcov-report/react/components/Session/Session.jsx.html +5 -5
  119. package/coverage/lcov-report/react/components/Session/SessionDialogWrapped.jsx.html +7 -7
  120. package/coverage/lcov-report/react/components/Session/index.html +7 -7
  121. package/coverage/lcov-report/react/components/Session/index.jsx.html +1 -1
  122. package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +3 -6
  123. package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +1 -1
  124. package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +4 -4
  125. package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.html +1 -1
  126. package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.js.html +10 -7
  127. package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/utils.js.html +5 -2
  128. package/coverage/lcov-report/react/components/SideNav/Content/index.html +1 -1
  129. package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +1 -1
  130. package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +3 -6
  131. package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +3 -6
  132. package/coverage/lcov-report/react/components/SideNav/Details/index.html +1 -1
  133. package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +1 -1
  134. package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +3 -6
  135. package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +3 -6
  136. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +8 -23
  137. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +2 -2
  138. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +7 -7
  139. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +3 -6
  140. package/coverage/lcov-report/react/components/SideNav/Links/index.html +11 -11
  141. package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +1 -1
  142. package/coverage/lcov-report/react/components/SideNav/UI/DynamicContent.jsx.html +3 -6
  143. package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +19 -40
  144. package/coverage/lcov-report/react/components/SideNav/UI/default-markup.js.html +1 -1
  145. package/coverage/lcov-report/react/components/SideNav/UI/index.html +15 -15
  146. package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +1 -1
  147. package/coverage/lcov-report/react/components/SideNav/helpers.js.html +4 -4
  148. package/coverage/lcov-report/react/components/SideNav/index.html +11 -11
  149. package/coverage/lcov-report/react/components/SideNav/index.js.html +10 -13
  150. package/coverage/lcov-report/react/components/hooks/index.html +1 -1
  151. package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +3 -6
  152. package/coverage/lcov-report/react/index.html +13 -13
  153. package/coverage/lcov-report/react/index.js.html +23 -8
  154. package/coverage/lcov-report/react/lib/Chevron.jsx.html +12 -24
  155. package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +25 -76
  156. package/coverage/lcov-report/react/lib/index.html +21 -21
  157. package/coverage/lcov-report/react/session/index.html +1 -1
  158. package/coverage/lcov-report/react/session/index.js.html +1 -1
  159. package/coverage/lcov-report/react/session/logout.js.html +6 -6
  160. package/coverage/lcov-report/react/session/refresh.js.html +12 -12
  161. package/coverage/lcov-report/react/session/ttl.js.html +2 -2
  162. package/coverage/lcov.info +1256 -1067
  163. package/dist/browser.js +1 -1
  164. package/dist/browser.js.map +1 -1
  165. package/dist/index.js +1 -1
  166. package/dist/index.js.map +1 -1
  167. package/dist/react/index.js +1 -1
  168. package/dist/react/index.js.LICENSE.txt +10 -0
  169. package/dist/react/index.js.map +1 -1
  170. package/eslint.config.js +1 -0
  171. package/lib/Chevron.jsx +0 -1
  172. package/lib/SvgComponents.jsx +0 -1
  173. package/package.json +17 -12
  174. package/test/components/FooterUI.test.js +1 -1
  175. package/test/components/HeaderUI.test.js +0 -1
  176. package/test/components/Infotip.test.js +0 -1
  177. package/test/components/SideNavUI.test.js +0 -1
  178. package/webpack.config.js +42 -42
package/.babelrc CHANGED
@@ -1,4 +1,11 @@
1
1
  {
2
- "presets": ["@babel/preset-react", "@babel/preset-env"],
2
+ "presets": [
3
+ [
4
+ "@babel/preset-react",
5
+ {
6
+ "runtime": "automatic"
7
+ }
8
+ ]
9
+ ],
3
10
  "plugins": ["transform-es2015-modules-umd"]
4
11
  }
@@ -0,0 +1,2 @@
1
+ cd react
2
+ npm run prepush
@@ -1,4 +1,4 @@
1
- import React, { useState, useRef, useEffect } from "react";
1
+ import { useState, useRef, useEffect } from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import { Chevron } from "../../lib/Chevron.jsx";
4
4
 
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  const VARIANTS = ["secondary", "outline", "danger", "white"];
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  const Dropdown = ({
@@ -1,4 +1,4 @@
1
- import React, { Component } from "react";
1
+ import { Component } from "react";
2
2
  import PropTypes from "prop-types";
3
3
 
4
4
  class Collapsible extends Component {
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import Collapsible from "./Collapsible";
3
2
  import PropTypes from "prop-types";
4
3
 
@@ -1,5 +1,4 @@
1
- import React from "react";
2
- import { render } from "react-dom";
1
+ import { createRoot } from "react-dom/client";
3
2
  import ErrorUI from "./ErrorUI";
4
3
 
5
4
  /**
@@ -14,13 +13,13 @@ export default class ErrorPage {
14
13
  * @param {HTMLElement} options.rootElement - Elem inside which to render
15
14
  */
16
15
  constructor(options) {
17
- render(
16
+ const root = createRoot(options.rootElement);
17
+ root.render(
18
18
  <ErrorUI
19
19
  type={options.type}
20
20
  code={options.code}
21
21
  message={options.message}
22
22
  />,
23
- options.rootElement,
24
23
  );
25
24
  }
26
25
  }
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import InfoTip from "../Infotip/Infotip";
3
2
  import Subscribe from "./Subscribe";
4
3
  import SocialLinks from "./SocialLinks";
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable react/prop-types */
2
- import React, { useState } from "react";
2
+ import { useState } from "react";
3
3
 
4
4
  export default function FooterTooltip({ triggerContent, tooltipContent }) {
5
5
  const [isHidden, setIsHidden] = useState(true);
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import Subscribe from "./Subscribe";
3
2
  import SocialLinks from "./SocialLinks";
4
3
  import pjson from "../../package.json";
@@ -1,5 +1,3 @@
1
- import React from "react";
2
-
3
1
  const SocialLinks = () => (
4
2
  <div className="social-container">
5
3
  <a
@@ -1,5 +1,3 @@
1
- import React from "react";
2
-
3
1
  const Subscribe = () => (
4
2
  <div className="subscriber-form">
5
3
  <form
@@ -1,5 +1,4 @@
1
- import React from "react";
2
- import { render } from "react-dom";
1
+ import { createRoot } from "react-dom/client";
3
2
  import FooterUI from "./FooterUI";
4
3
 
5
4
  /**
@@ -12,9 +11,11 @@ export default class Footer {
12
11
  */
13
12
  constructor(options) {
14
13
  if ("rootElement" in options) {
15
- render(<FooterUI />, options.rootElement);
14
+ const root = createRoot(options.rootElement);
15
+ root.render(<FooterUI />);
16
16
  } else {
17
- render(<FooterUI />, options);
17
+ const root = createRoot(options);
18
+ root.render(<FooterUI />);
18
19
  }
19
20
  }
20
21
  }
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react";
1
+ import { useState } from "react";
2
2
 
3
3
  const GovBanner = () => {
4
4
  const [hideContent, setHideContent] = useState(true);
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
  import { useHeaderState } from "./hooks";
4
3
  import { setUtagLink } from "./utag-helpers";
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  const HeaderCancel = ({ handleCancel }) => {
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  import HeaderLogo from "./HeaderLogo";
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  import { useHeaderState } from "./hooks";
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  import { useHeaderState } from "./hooks";
@@ -1,4 +1,4 @@
1
- import React, { Fragment, useRef, useEffect, useState } from "react";
1
+ import { Fragment, useRef, useEffect, useState } from "react";
2
2
  import PropTypes from "prop-types";
3
3
 
4
4
  import { useWindowWidth, useHeaderState } from "./hooks";
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
  import { useHeaderState } from "./hooks";
4
3
  import { setUtagLink } from "./utag-helpers";
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react";
1
+ import { useState } from "react";
2
2
  import PropTypes from "prop-types";
3
3
 
4
4
  import { LogoutSession } from "../../session";
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
  import { CloseXIcon } from "../../lib/SvgComponents.jsx";
4
3
 
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect } from "react";
1
+ import { useState, useEffect } from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import HeaderAccountMenu from "./HeaderAccountMenu.jsx";
4
4
  import HeaderCancel from "./HeaderCancel.jsx";
@@ -1,5 +1,3 @@
1
- import React from "react";
2
-
3
1
  const HelpIcon = () => (
4
2
  <a
5
3
  className="header-help"
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { parse } from "cookie";
3
2
  import { CloseIcon } from "../../lib/SvgComponents";
4
3
  import { TextButton } from "../Button";
@@ -1,5 +1,3 @@
1
- import React from "react";
2
-
3
1
  const NavigationButtonIcon = () => (
4
2
  <svg
5
3
  className="btn-navigation-icon"
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { parse } from "cookie";
3
2
  import { TextButton } from "../Button";
4
3
  import { CloseIcon } from "../../lib/SvgComponents";
@@ -1,5 +1,4 @@
1
- import React from "react";
2
- import { render } from "react-dom";
1
+ import { createRoot } from "react-dom/client";
3
2
  import HeaderUI from "./HeaderUI.jsx";
4
3
 
5
4
  /**
@@ -17,7 +16,8 @@ export default class Header {
17
16
  * @param {HTMLElement} options.rootElement - Elem inside which to render
18
17
  */
19
18
  constructor(options) {
20
- render(
19
+ const root = createRoot(options.rootElement);
20
+ root.render(
21
21
  <HeaderUI
22
22
  isLoginEnabled={options.isLoginEnabled}
23
23
  skipToContentId={options.skipToContentId}
@@ -34,7 +34,6 @@ export default class Header {
34
34
  content={options.content}
35
35
  isIESupportPage={options.isIESupportPage}
36
36
  />,
37
- options.rootElement,
38
37
  );
39
38
  }
40
39
  }
@@ -1,4 +1,4 @@
1
- import React, { createContext, useState, useEffect, useContext } from "react";
1
+ import { createContext, useState, useEffect, useContext } from "react";
2
2
  import PropTypes from "prop-types";
3
3
 
4
4
  export function useWindowWidth() {
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react";
1
+ import { useState } from "react";
2
2
 
3
3
  const HeaderSearchBar = () => {
4
4
  const [inputValue, setInputValue] = useState("");
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
  import InfotipContent from "./InfotipContent";
4
3
  import InfotipIcon from "./InfotipIcon";
@@ -1,18 +1,10 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
- import {
4
- Tooltip as TooltipAriaKit,
5
- TooltipAnchor,
6
- TooltipArrow,
7
- useTooltipState,
8
- } from "ariakit/tooltip";
2
+ import * as AriaKit from "@ariakit/react";
9
3
 
10
4
  const TEXT_COLOR = "#FFF";
11
5
  const BACKGROUND_COLOR = "#333";
12
6
 
13
7
  const InfotipContent = ({ children, label, ...rest }) => {
14
- const tooltip = useTooltipState();
15
-
16
8
  const cssStyles = {
17
9
  maxWidth: "300px",
18
10
  padding: "8px",
@@ -22,12 +14,13 @@ const InfotipContent = ({ children, label, ...rest }) => {
22
14
  color: TEXT_COLOR,
23
15
  };
24
16
  return (
25
- <>
26
- <TooltipAnchor as={"span"} state={tooltip} className="tooltip-anchor">
27
- {children}
28
- </TooltipAnchor>
29
- <TooltipAriaKit
30
- state={tooltip}
17
+ <AriaKit.TooltipProvider>
18
+ <AriaKit.TooltipAnchor
19
+ as={"span"}
20
+ className="tooltip-anchor"
21
+ render={children}
22
+ />
23
+ <AriaKit.Tooltip
31
24
  id={undefined}
32
25
  ariaLabelledBy={undefined}
33
26
  className="tooltip-content"
@@ -35,9 +28,8 @@ const InfotipContent = ({ children, label, ...rest }) => {
35
28
  {...rest}
36
29
  >
37
30
  {label}
38
- <TooltipArrow />
39
- </TooltipAriaKit>
40
- </>
31
+ </AriaKit.Tooltip>
32
+ </AriaKit.TooltipProvider>
41
33
  );
42
34
  };
43
35
 
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  const InfotipIcon = ({ lightIcon = false, ...props }) => (
@@ -1,5 +1,5 @@
1
- import React, { Component } from "react";
2
- import { render } from "react-dom";
1
+ import { Component } from "react";
2
+ import { createRoot } from "react-dom/client";
3
3
  import ReactModal from "react-modal";
4
4
  import { CloseXIcon } from "../../lib/SvgComponents.jsx";
5
5
  import SanitizedContent from "../SanitizedContent";
@@ -61,7 +61,8 @@ class Modal extends Component {
61
61
  }
62
62
 
63
63
  const displayModal = ({ content, main }) => {
64
- render(<Modal content={content} showModal={true} />, main);
64
+ const root = createRoot(document.getElementById("root"));
65
+ root.render(<Modal content={content} showModal={true} />, main);
65
66
  };
66
67
 
67
68
  Modal.propTypes = {
@@ -1,4 +1,4 @@
1
- import React, { useRef, useState, useEffect } from "react";
1
+ import { useRef, useState, useEffect } from "react";
2
2
  import ReactModal from "react-modal";
3
3
  import PropTypes from "prop-types";
4
4
 
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  import LegacyModal from "./LegacyModal";
@@ -1,4 +1,4 @@
1
- import React, { forwardRef } from "react";
1
+ import { forwardRef } from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import { BellOutline } from "../../lib/SvgComponents.jsx";
4
4
 
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
  import SanitizedContent from "../SanitizedContent";
4
3
  import { CloseXIcon } from "../../lib/SvgComponents.jsx";
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect, useRef } from "react";
1
+ import { useState, useEffect, useRef } from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import ExpandedView from "./ExpandedView";
4
4
  import CollapsedView from "./CollapsedView";
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import xss from "xss";
3
2
  import PropTypes from "prop-types";
4
3
 
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useState } from "react";
1
+ import { useEffect, useState } from "react";
2
2
  import { parse } from "cookie";
3
3
  import Modal from "../Modal";
4
4
  import { fetchTtl } from "../../session";
@@ -1,5 +1,4 @@
1
- import React from "react";
2
- import { render } from "react-dom";
1
+ import { createRoot } from "react-dom/client";
3
2
  import SessionDialogUI from "../Session";
4
3
 
5
4
  /**
@@ -7,6 +6,7 @@ import SessionDialogUI from "../Session";
7
6
  */
8
7
  export default class SessionDialog {
9
8
  constructor(options) {
10
- render(<SessionDialogUI />, options.rootElement);
9
+ const root = createRoot(options.rootElement);
10
+ root.render(<SessionDialogUI />);
11
11
  }
12
12
  }
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  const hasDarkerBackground = (darkerBackground) => {
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react";
1
+ import { useState } from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import { parse } from "cookie";
4
4
  import { jwtDecode } from "jwt-decode";
@@ -1,4 +1,4 @@
1
- import React, { useEffect } from "react";
1
+ import { useEffect } from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import { parse } from "cookie";
4
4
  import Dropdown from "../../../Dropdown";
@@ -23,6 +23,7 @@ const cmsRoles = [
23
23
  "QPP Content Management - Author",
24
24
  "QPP Content Management - Approver",
25
25
  "QPP Content Management - Admin",
26
+ "QPP Content Management - Previewer",
26
27
  "QPP Front-end - Author",
27
28
  ];
28
29
 
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  const IndividualDetails = ({ individualName, individualNpi }) => {
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  const PracticeDetails = ({
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
  import { handleNavigation } from "../helpers";
4
3
  import { SwitchPractice, ChevronRight } from "../../../lib/SvgComponents.jsx";
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import AnimationGroup from "../AnimationGroup/AnimationGroup";
3
2
  import PropTypes from "prop-types";
4
3
 
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react";
1
+ import { cloneElement, useState } from "react";
2
2
  import PropTypes from "prop-types";
3
3
 
4
4
  const NavLinkContainer = ({ listOfLinks, linkActiveFunc }) => {
@@ -17,7 +17,7 @@ const NavLinkContainer = ({ listOfLinks, linkActiveFunc }) => {
17
17
  key={idx.toString()}
18
18
  onClick={() => toggleActive(idx, link.props.disabled)}
19
19
  >
20
- {React.cloneElement(link, { isActive: activeLink === idx })}
20
+ {cloneElement(link, { isActive: activeLink === idx })}
21
21
  </li>
22
22
  ))}
23
23
  </ul>
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect } from "react";
1
+ import { useState, useEffect } from "react";
2
2
  import PropTypes from "prop-types";
3
3
 
4
4
  import { handleNavigation } from "../helpers";
@@ -1,4 +1,4 @@
1
- import React, { useState } from "react";
1
+ import { useRef, useEffect, Fragment, useState } from "react";
2
2
  import { handleNavigation } from "../helpers";
3
3
  import AnimationGroup from "../AnimationGroup/AnimationGroup";
4
4
  import PropTypes from "prop-types";
@@ -20,11 +20,11 @@ const NavLinkInline = ({
20
20
  const urlRegExp = new RegExp(`${localUrl}/?$`);
21
21
  const path = window.location.href && window.location.href.split("?")[0];
22
22
  const currentPage = path && path.match(urlRegExp);
23
- const svgRef = React.useRef();
23
+ const svgRef = useRef();
24
24
  const [showTooltip, setShowTooltip] = useState(false);
25
- const tooltipRef = React.useRef();
25
+ const tooltipRef = useRef();
26
26
 
27
- React.useEffect(() => {
27
+ useEffect(() => {
28
28
  if (!showLabel && svgRef.current) {
29
29
  const existingMouseenter = svgRef.current.onmouseover;
30
30
  const existingMouseout = svgRef.current.onmouseout;
@@ -56,7 +56,7 @@ const NavLinkInline = ({
56
56
  }, [svgRef.current, showLabel]);
57
57
 
58
58
  return (
59
- <React.Fragment>
59
+ <Fragment>
60
60
  <a
61
61
  href={disabled ? undefined : url}
62
62
  onClick={(e) => handleNavigation(e, linkCallback, label)}
@@ -90,7 +90,7 @@ const NavLinkInline = ({
90
90
  <span className="sidebar-tooltip-text">{label}</span>
91
91
  </div>
92
92
  )}
93
- </React.Fragment>
93
+ </Fragment>
94
94
  );
95
95
  };
96
96
 
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
  import { NavCollapse, NavExpand } from "../../../lib/SvgComponents";
4
3
 
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
2
 
4
3
  import { NavLinkContainer, NavLinkInline, NavLinkDrawer } from "../Links";
@@ -1,4 +1,4 @@
1
- import React, { useState, useRef, useEffect } from "react";
1
+ import { useState, useRef, useEffect } from "react";
2
2
  import PropTypes from "prop-types";
3
3
 
4
4
  import { setSideNavExpanded, isSideNavExpanded } from "../helpers";
@@ -1,5 +1,4 @@
1
- import React from "react";
2
- import { render } from "react-dom";
1
+ import { createRoot } from "react-dom/client";
3
2
  import { SideNavUI } from "./UI";
4
3
 
5
4
  const SideNav = (options = {}) => {
@@ -13,7 +12,8 @@ const SideNav = (options = {}) => {
13
12
  rootElement,
14
13
  } = options;
15
14
 
16
- return render(
15
+ const root = createRoot(rootElement);
16
+ return root.render(
17
17
  <SideNavUI
18
18
  onExpanded={onExpanded}
19
19
  onCollapsed={onCollapsed}
@@ -22,7 +22,6 @@ const SideNav = (options = {}) => {
22
22
  items={items}
23
23
  isAltStyle={isAltStyle}
24
24
  />,
25
- rootElement,
26
25
  );
27
26
  };
28
27
 
@@ -1,13 +1,8 @@
1
- import React, { Children } from "react";
1
+ import { Children } from "react";
2
2
  import PropTypes from "prop-types";
3
- import { TabList, Tab, TabPanel, useTabState } from "ariakit/tab";
3
+ import * as AriaKit from "@ariakit/react";
4
4
 
5
5
  function Tabs({ defaultSelectedId, children, onChange, selected }) {
6
- const tab = useTabState({
7
- defaultSelectedId: selected ?? defaultSelectedId,
8
- selectOnMove: false,
9
- });
10
-
11
6
  const onTabClick = (tabHref, id) => {
12
7
  if (tabHref) {
13
8
  const currentUrl = new URL(window.location.href);
@@ -24,11 +19,11 @@ function Tabs({ defaultSelectedId, children, onChange, selected }) {
24
19
  };
25
20
 
26
21
  return (
27
- <>
22
+ <AriaKit.TabProvider defaultSelectedId={selected ?? defaultSelectedId}>
28
23
  <div className="qpp-c-tabs qpp-c-tabs--mui">
29
- <TabList state={tab} aria-label="qpp tabs">
24
+ <AriaKit.TabList aria-label="qpp tabs">
30
25
  {Children.map(children, (child) => (
31
- <Tab
26
+ <AriaKit.Tab
32
27
  key={child.props.id}
33
28
  id={child.props.id}
34
29
  className="qpp-c-tabs__item"
@@ -36,24 +31,23 @@ function Tabs({ defaultSelectedId, children, onChange, selected }) {
36
31
  onClick={() => onTabClick(child.props.tabHref, child.props.id)}
37
32
  >
38
33
  {child.props.tab}
39
- </Tab>
34
+ </AriaKit.Tab>
40
35
  ))}
41
- </TabList>
36
+ </AriaKit.TabList>
42
37
  </div>
43
38
  <div className="qpp-c-tabs__panel">
44
39
  {Children.map(children, (child) => (
45
- <TabPanel
40
+ <AriaKit.TabPanel
46
41
  key={child.props.id}
47
- state={tab}
48
42
  tabId={child.props.id}
49
43
  className={child.props.className}
50
44
  disabled={child.props.disabled}
51
45
  >
52
46
  {child.props.children}
53
- </TabPanel>
47
+ </AriaKit.TabPanel>
54
48
  ))}
55
49
  </div>
56
- </>
50
+ </AriaKit.TabProvider>
57
51
  );
58
52
  }
59
53