qpp-style 1.0.0-rm.0 → 1.0.0-sm-webcomponents.0

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 (511) hide show
  1. package/.editorconfig +1 -1
  2. package/.eslintrc.js +29 -28
  3. package/.husky/pre-commit +5 -0
  4. package/.prettierrc +1 -0
  5. package/README.md +60 -0
  6. package/components/Accordion/index.jsx +43 -47
  7. package/components/Alert/index.js +53 -0
  8. package/components/Breadcrumb/index.js +8 -8
  9. package/components/Button/index.js +28 -17
  10. package/components/Details/DetailsIcons.js +50 -0
  11. package/components/Details/index.js +53 -0
  12. package/components/Dropdown/index.js +85 -0
  13. package/components/DropdownButton/Menu.js +25 -0
  14. package/components/DropdownButton/MenuButton.js +41 -0
  15. package/components/DropdownButton/MenuItem.js +25 -0
  16. package/components/DropdownButton/MenuItemLink.js +27 -0
  17. package/components/Error/Collapsible.jsx +5 -5
  18. package/components/Error/ErrorUI.jsx +4 -4
  19. package/components/Error/error.js +4 -4
  20. package/components/FlashNotification/FlashNotificationUI.jsx +11 -11
  21. package/components/FlashNotification/index.js +5 -5
  22. package/components/Footer/FooterUI.jsx +181 -183
  23. package/components/Footer/SocialLinks.jsx +1 -1
  24. package/components/Footer/Subscribe.jsx +1 -1
  25. package/components/Footer/footer.js +6 -16
  26. package/components/GovBanner/index.js +117 -0
  27. package/components/Header/HeaderAccountMenu.jsx +35 -77
  28. package/components/Header/HeaderCancel.jsx +2 -2
  29. package/components/Header/HeaderContainer.jsx +58 -33
  30. package/components/Header/HeaderLogo.jsx +29 -9
  31. package/components/Header/HeaderMenuButton.js +14 -7
  32. package/components/Header/HeaderMenuItem.jsx +165 -52
  33. package/components/Header/HeaderMenuLink.js +20 -5
  34. package/components/Header/HeaderMenuSignOutButton.js +48 -12
  35. package/components/Header/HeaderMobileButton.js +18 -9
  36. package/components/Header/HeaderUI.jsx +107 -122
  37. package/components/Header/HelpIcon.jsx +7 -5
  38. package/components/Header/ImpersonatorBanner.jsx +87 -0
  39. package/components/Header/NavigationButtonIcon.jsx +1 -1
  40. package/components/Header/header.js +6 -4
  41. package/components/Header/hooks.js +24 -10
  42. package/components/Header/utag-helpers.js +9 -0
  43. package/components/HeaderSearchBar/index.jsx +80 -0
  44. package/components/Infotip/Infotip.jsx +15 -19
  45. package/components/Infotip/InfotipContent.jsx +48 -0
  46. package/components/Infotip/InfotipIcon.jsx +5 -5
  47. package/components/Infotip/index.js +1 -1
  48. package/components/Link/index.js +61 -0
  49. package/components/Modal/LegacyModal.jsx +8 -8
  50. package/components/Modal/Modal.jsx +56 -43
  51. package/components/Modal/index.jsx +11 -11
  52. package/components/NotificationBanner/CollapsedView.js +39 -0
  53. package/components/NotificationBanner/ExpandedView.js +45 -0
  54. package/components/NotificationBanner/index.js +219 -30
  55. package/components/SanitizedContent/index.jsx +189 -166
  56. package/components/Search/index.js +98 -0
  57. package/components/Session/Session.jsx +89 -0
  58. package/components/Session/SessionDialogWrapped.jsx +12 -0
  59. package/components/Session/index.jsx +3 -0
  60. package/components/SideNav/AnimationGroup/AnimationGroup.jsx +11 -4
  61. package/components/SideNav/Content/LevelOneContent.jsx +40 -290
  62. package/components/SideNav/Content/SelectRole/index.js +70 -0
  63. package/components/SideNav/Content/SelectRole/utils.js +142 -0
  64. package/components/SideNav/Content/index.js +2 -3
  65. package/components/SideNav/Details/IndividualDetails.jsx +2 -2
  66. package/components/SideNav/Details/PracticeDetails.jsx +13 -3
  67. package/components/SideNav/Details/index.js +2 -2
  68. package/components/SideNav/Links/CmsSwitchLink.jsx +5 -5
  69. package/components/SideNav/Links/NavItemInline.jsx +7 -7
  70. package/components/SideNav/Links/NavLinkContainer.jsx +30 -35
  71. package/components/SideNav/Links/NavLinkDrawer.jsx +158 -55
  72. package/components/SideNav/Links/NavLinkInline.jsx +24 -20
  73. package/components/SideNav/Links/NavLinkToggle.jsx +7 -7
  74. package/components/SideNav/Links/index.js +5 -5
  75. package/components/SideNav/SideNav.md +28 -27
  76. package/components/SideNav/UI/SideNavUI.jsx +178 -196
  77. package/components/SideNav/UI/default-markup.js +4 -0
  78. package/components/SideNav/UI/index.js +1 -1
  79. package/components/SideNav/UI/utils.js +0 -0
  80. package/components/SideNav/helpers.js +38 -29
  81. package/components/SideNav/index.js +11 -35
  82. package/components/Tabs/TabPanel.js +5 -0
  83. package/components/Tabs/Tabs.js +73 -0
  84. package/components/TextInput/index.js +137 -0
  85. package/components/hooks/useGetConfig.js +74 -0
  86. package/components/index.js +108 -18
  87. package/coverage/clover.xml +1321 -41
  88. package/coverage/coverage-final.json +70 -1
  89. package/coverage/lcov-report/Tooltip.jsx.html +232 -0
  90. package/coverage/lcov-report/block-navigation.js +8 -0
  91. package/coverage/lcov-report/components/Accordion/index.html +28 -23
  92. package/coverage/lcov-report/components/Accordion/index.jsx.html +109 -134
  93. package/coverage/lcov-report/{SideNav/Chart → components/Button}/index.html +29 -24
  94. package/coverage/lcov-report/{Error/Collapsible.jsx.html → components/Button/index.js.html} +125 -114
  95. package/coverage/lcov-report/components/Error/Collapsible.jsx.html +92 -87
  96. package/coverage/lcov-report/components/Error/ErrorUI.jsx.html +32 -33
  97. package/coverage/lcov-report/components/Error/index.html +11 -6
  98. package/coverage/lcov-report/components/Footer/FooterUI.jsx.html +189 -193
  99. package/coverage/lcov-report/components/Footer/SocialLinks.jsx.html +24 -61
  100. package/coverage/lcov-report/components/Footer/Subscribe.jsx.html +18 -13
  101. package/coverage/lcov-report/components/Footer/index.html +35 -45
  102. package/coverage/lcov-report/components/{InfoModal → GovBanner}/index.html +27 -22
  103. package/coverage/lcov-report/components/{InfoModal/index.jsx.html → GovBanner/index.js.html} +157 -122
  104. package/coverage/lcov-report/components/Header/HeaderAccountMenu.jsx.html +93 -520
  105. package/coverage/lcov-report/components/Header/HeaderCancel.jsx.html +19 -23
  106. package/coverage/lcov-report/components/Header/HeaderContainer.jsx.html +307 -0
  107. package/coverage/lcov-report/components/{SideNav/Links/NavLinkContainer.jsx.html → Header/HeaderLogo.jsx.html} +78 -67
  108. package/coverage/lcov-report/components/{SideNav/Links/NavItemInline.jsx.html → Header/HeaderMenuButton.js.html} +71 -78
  109. package/coverage/lcov-report/components/{SideNav/Links/NavLinkDrawer.jsx.html → Header/HeaderMenuItem.jsx.html} +291 -268
  110. package/coverage/lcov-report/components/Header/HeaderMenuLink.js.html +253 -0
  111. package/coverage/lcov-report/components/Header/HeaderMenuSignOutButton.js.html +271 -0
  112. package/coverage/lcov-report/components/Header/HeaderMobileButton.js.html +196 -0
  113. package/coverage/lcov-report/components/Header/HeaderUI.jsx.html +189 -745
  114. package/coverage/lcov-report/components/Header/HelpIcon.jsx.html +181 -0
  115. package/coverage/lcov-report/{Accordion/index.jsx.html → components/Header/ImpersonatorBanner.jsx.html} +108 -169
  116. package/coverage/lcov-report/components/Header/NavigationButtonIcon.jsx.html +24 -19
  117. package/coverage/lcov-report/components/Header/hooks.js.html +283 -0
  118. package/coverage/lcov-report/components/Header/index.html +204 -34
  119. package/coverage/lcov-report/components/{SideNav/Links/index.js.html → Header/utag-helpers.js.html} +35 -42
  120. package/coverage/lcov-report/components/Infotip/Infotip.jsx.html +52 -47
  121. package/coverage/lcov-report/components/Infotip/InfotipIcon.jsx.html +37 -32
  122. package/coverage/lcov-report/components/Infotip/index.html +8 -3
  123. package/coverage/lcov-report/components/Infotip/index.js.html +8 -3
  124. package/coverage/lcov-report/components/Modal/LegacyModal.jsx.html +301 -0
  125. package/coverage/lcov-report/{HeaderUI.jsx.html → components/Modal/Modal.jsx.html} +156 -244
  126. package/coverage/lcov-report/components/{SideNav/Details → Modal}/index.html +53 -48
  127. package/coverage/lcov-report/components/{SideNav/Details/IndividualDetails.jsx.html → Modal/index.jsx.html} +45 -37
  128. package/coverage/lcov-report/components/NotificationBanner/CollapsedView.js.html +202 -0
  129. package/coverage/lcov-report/components/NotificationBanner/ExpandedView.js.html +220 -0
  130. package/coverage/lcov-report/components/NotificationBanner/index.html +58 -23
  131. package/coverage/lcov-report/components/{SideNav/Content/LevelTwoContent.jsx.html → NotificationBanner/index.js.html} +292 -272
  132. package/coverage/lcov-report/components/SanitizedContent/index.html +8 -3
  133. package/coverage/lcov-report/components/SanitizedContent/index.jsx.html +478 -53
  134. package/coverage/lcov-report/components/SessionDialogUI.jsx.html +281 -288
  135. package/coverage/lcov-report/components/SideNav/Content/SelectRole/index.html +116 -0
  136. package/coverage/lcov-report/components/SideNav/Content/SelectRole/utils.js.html +505 -0
  137. package/coverage/lcov-report/components/SideNav/helpers.js.html +987 -46
  138. package/coverage/lcov-report/components/SideNav/index.html +24 -19
  139. package/coverage/lcov-report/components/Tooltip/Tooltip.jsx.html +69 -64
  140. package/coverage/lcov-report/components/Tooltip/index.html +8 -3
  141. package/coverage/lcov-report/components/Tooltip/index.js.html +8 -3
  142. package/coverage/lcov-report/components/Tooltip/position.js.html +57 -64
  143. package/coverage/lcov-report/components/hooks/index.html +116 -0
  144. package/coverage/lcov-report/components/hooks/useGetConfig.js.html +310 -0
  145. package/coverage/lcov-report/components/index.html +28 -23
  146. package/coverage/lcov-report/favicon.png +0 -0
  147. package/coverage/lcov-report/index.html +384 -19
  148. package/coverage/lcov-report/{components/SideNav/UI/index.js.html → index.js.html} +19 -14
  149. package/coverage/lcov-report/{Error/ErrorUI.jsx.html → lib/Chevron.jsx.html} +44 -42
  150. package/coverage/lcov-report/lib/SvgComponents.jsx.html +2200 -0
  151. package/coverage/lcov-report/lib/index.html +36 -16
  152. package/coverage/lcov-report/position.js.html +289 -0
  153. package/coverage/lcov-report/react/components/Accordion/index.html +26 -21
  154. package/coverage/lcov-report/react/components/Accordion/index.jsx.html +73 -80
  155. package/coverage/lcov-report/react/components/{FlashNotification → Button}/index.html +23 -33
  156. package/coverage/lcov-report/{components/SideNav/Links/NavLinkInline.jsx.html → react/components/Button/index.js.html} +119 -120
  157. package/coverage/lcov-report/react/components/{Tabs → Dropdown}/index.html +23 -33
  158. package/coverage/lcov-report/react/components/{InfoModal/index.jsx.html → Dropdown/index.js.html} +102 -154
  159. package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +26 -21
  160. package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +11 -6
  161. package/coverage/lcov-report/react/components/Error/error.js.html +8 -3
  162. package/coverage/lcov-report/react/components/Error/index.html +11 -6
  163. package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +194 -195
  164. package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +18 -13
  165. package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +18 -13
  166. package/coverage/lcov-report/react/components/Footer/footer.js.html +12 -37
  167. package/coverage/lcov-report/react/components/Footer/index.html +35 -45
  168. package/coverage/lcov-report/react/components/{InfoModal → GovBanner}/index.html +30 -25
  169. package/coverage/lcov-report/react/components/{Tabs/TabsUI.jsx.html → GovBanner/index.js.html} +143 -150
  170. package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +74 -147
  171. package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +15 -10
  172. package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +87 -46
  173. package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +103 -29
  174. package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +109 -26
  175. package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +503 -78
  176. package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +137 -24
  177. package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +134 -21
  178. package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +47 -15
  179. package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +157 -164
  180. package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +21 -10
  181. package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +334 -0
  182. package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +9 -4
  183. package/coverage/lcov-report/react/components/Header/header.js.html +15 -4
  184. package/coverage/lcov-report/react/components/Header/hooks.js.html +173 -12
  185. package/coverage/lcov-report/react/components/Header/index.html +123 -88
  186. package/coverage/lcov-report/react/components/{Spinner/index.js.html → Header/utag-helpers.js.html} +26 -21
  187. package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +16 -23
  188. package/coverage/lcov-report/react/components/{Tabs/tabs.js.html → Infotip/InfotipContent.jsx.html} +83 -48
  189. package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +12 -7
  190. package/coverage/lcov-report/react/components/Infotip/index.html +26 -6
  191. package/coverage/lcov-report/react/components/Infotip/index.js.html +8 -3
  192. package/coverage/lcov-report/react/components/{FlashNotification/FlashNotificationUI.jsx.html → Modal/LegacyModal.jsx.html} +89 -84
  193. package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +505 -0
  194. package/coverage/lcov-report/react/components/Modal/index.html +52 -17
  195. package/coverage/lcov-report/react/components/Modal/index.jsx.html +38 -201
  196. package/coverage/lcov-report/{components/SideNav/Links/CmsSwitchLink.jsx.html → react/components/NotificationBanner/CollapsedView.js.html} +52 -50
  197. package/coverage/lcov-report/{components/SideNav/Details/PracticeDetails.jsx.html → react/components/NotificationBanner/ExpandedView.js.html} +74 -57
  198. package/coverage/lcov-report/react/components/NotificationBanner/index.html +53 -18
  199. package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +613 -41
  200. package/coverage/lcov-report/react/components/SanitizedContent/index.html +22 -17
  201. package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +90 -16
  202. package/coverage/lcov-report/react/components/{Spinner → SessionDialog}/index.html +11 -6
  203. package/coverage/lcov-report/react/components/{FlashNotification/index.js.html → SessionDialog/sessionDialog.js.html} +35 -42
  204. package/coverage/lcov-report/react/components/SessionDialogUI.jsx.html +80 -51
  205. package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +43 -17
  206. package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +28 -23
  207. package/coverage/lcov-report/react/components/SideNav/Chart/ScoreChart.jsx.html +51 -46
  208. package/coverage/lcov-report/react/components/SideNav/Chart/index.html +26 -21
  209. package/coverage/lcov-report/react/components/SideNav/Chart/index.js.html +9 -4
  210. package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +34 -842
  211. package/coverage/lcov-report/react/components/SideNav/Content/LevelTwoContent.jsx.html +28 -17
  212. package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.html +131 -0
  213. package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.js.html +214 -0
  214. package/coverage/lcov-report/{components/SideNav/AnimationGroup/AnimationGroup.jsx.html → react/components/SideNav/Content/SelectRole/utils.js.html} +48 -40
  215. package/coverage/lcov-report/react/components/SideNav/Content/index.html +26 -36
  216. package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +10 -8
  217. package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +10 -5
  218. package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +26 -9
  219. package/coverage/lcov-report/react/components/SideNav/Details/index.html +23 -18
  220. package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +8 -3
  221. package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +9 -4
  222. package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +8 -3
  223. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +56 -66
  224. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +360 -49
  225. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +63 -49
  226. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +8 -3
  227. package/coverage/lcov-report/react/components/SideNav/Links/index.html +45 -40
  228. package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +8 -3
  229. package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +198 -241
  230. package/coverage/lcov-report/react/components/SideNav/UI/default-markup.js.html +97 -0
  231. package/coverage/lcov-report/react/components/SideNav/UI/index.html +41 -21
  232. package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +8 -3
  233. package/coverage/lcov-report/react/components/SideNav/helpers.js.html +188 -24
  234. package/coverage/lcov-report/react/components/SideNav/index.html +27 -22
  235. package/coverage/lcov-report/react/components/SideNav/index.js.html +9 -10
  236. package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +49 -161
  237. package/coverage/lcov-report/react/components/Tooltip/index.html +16 -11
  238. package/coverage/lcov-report/react/components/Tooltip/index.js.html +8 -3
  239. package/coverage/lcov-report/react/components/Tooltip/position.js.html +27 -22
  240. package/coverage/lcov-report/{components/SideNav/AnimationGroup → react/components/hooks}/index.html +30 -25
  241. package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +310 -0
  242. package/coverage/lcov-report/react/components/index.html +10 -5
  243. package/coverage/lcov-report/react/index.html +20 -15
  244. package/coverage/lcov-report/react/index.js.html +29 -9
  245. package/coverage/lcov-report/{components/SideNav/Links/NavLinkToggle.jsx.html → react/lib/Chevron.jsx.html} +49 -47
  246. package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +574 -125
  247. package/coverage/lcov-report/react/lib/index.html +35 -30
  248. package/coverage/lcov-report/react/lib/svg-definitions.svg.html +8 -3
  249. package/coverage/lcov-report/react/session/index.html +30 -25
  250. package/coverage/lcov-report/react/session/index.js.html +8 -3
  251. package/coverage/lcov-report/react/session/logout.js.html +97 -17
  252. package/coverage/lcov-report/react/session/refresh.js.html +12 -7
  253. package/coverage/lcov-report/react/session/ttl.js.html +9 -4
  254. package/coverage/lcov-report/session/index.html +31 -26
  255. package/coverage/lcov-report/session/index.js.html +8 -3
  256. package/coverage/lcov-report/session/logout.js.html +136 -41
  257. package/coverage/lcov-report/session/refresh.js.html +9 -4
  258. package/coverage/lcov-report/session/ttl.js.html +20 -15
  259. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  260. package/coverage/lcov-report/sorter.js +26 -0
  261. package/coverage/lcov.info +2846 -46
  262. package/dist/browser.js +1 -1
  263. package/dist/browser.js.LICENSE.txt +1 -7
  264. package/dist/browser.js.map +1 -1
  265. package/dist/index.js +1 -1
  266. package/dist/index.js.LICENSE.txt +1 -7
  267. package/dist/index.js.map +1 -1
  268. package/dist/react/index.js +1 -1
  269. package/dist/react/index.js.LICENSE.txt +16 -16
  270. package/dist/react/index.js.map +1 -1
  271. package/dist/web-components/index.js +2 -0
  272. package/dist/web-components/index.js.map +1 -0
  273. package/fonts/PublicSans-Black.ttf +0 -0
  274. package/fonts/PublicSans-BlackItalic.ttf +0 -0
  275. package/fonts/PublicSans-Bold.ttf +0 -0
  276. package/fonts/PublicSans-BoldItalic.ttf +0 -0
  277. package/fonts/PublicSans-ExtraBold.ttf +0 -0
  278. package/fonts/PublicSans-ExtraBoldItalic.ttf +0 -0
  279. package/fonts/PublicSans-ExtraLight.ttf +0 -0
  280. package/fonts/PublicSans-ExtraLightItalic.ttf +0 -0
  281. package/fonts/PublicSans-Italic.ttf +0 -0
  282. package/fonts/PublicSans-Light.ttf +0 -0
  283. package/fonts/PublicSans-LightItalic.ttf +0 -0
  284. package/fonts/PublicSans-Medium.ttf +0 -0
  285. package/fonts/PublicSans-MediumItalic.ttf +0 -0
  286. package/fonts/PublicSans-Regular.ttf +0 -0
  287. package/fonts/PublicSans-SemiBold.ttf +0 -0
  288. package/fonts/PublicSans-SemiBoldItalic.ttf +0 -0
  289. package/fonts/PublicSans-Thin.ttf +0 -0
  290. package/fonts/PublicSans-ThinItalic.ttf +0 -0
  291. package/images/icon-dot-gov.svg +1 -0
  292. package/images/icon-https.svg +1 -0
  293. package/images/icons/close-x.svg +6 -0
  294. package/images/icons/svg/arrow-down.svg +3 -0
  295. package/images/icons/svg/arrow-download.svg +1 -0
  296. package/images/icons/svg/arrow-right.svg +1 -0
  297. package/images/icons/svg/arrow-up.svg +3 -0
  298. package/images/icons/svg/block.svg +5 -0
  299. package/images/icons/svg/calendar.svg +1 -0
  300. package/images/icons/svg/check-circle.svg +5 -0
  301. package/images/icons/svg/checkmark.svg +7 -0
  302. package/images/icons/svg/chevron-down.svg +11 -0
  303. package/images/icons/svg/chevron-left.svg +12 -0
  304. package/images/icons/svg/chevron-right.svg +12 -0
  305. package/images/icons/svg/chevron-up.svg +12 -0
  306. package/images/icons/svg/clipboard.svg +1 -0
  307. package/images/icons/svg/close.svg +1 -0
  308. package/images/icons/svg/divide.svg +13 -0
  309. package/images/icons/svg/doctors-and-clinicians-preview.svg +10 -0
  310. package/images/icons/svg/download.svg +1 -0
  311. package/images/icons/svg/dropdown-arrow.svg +1 -0
  312. package/images/icons/svg/equals.svg +13 -0
  313. package/images/icons/svg/exclamation.svg +10 -0
  314. package/images/icons/svg/external.svg +1 -0
  315. package/images/icons/svg/file-download.svg +1 -0
  316. package/images/icons/svg/file-upload.svg +1 -0
  317. package/images/icons/svg/info.svg +17 -0
  318. package/images/icons/svg/manage-user-access.svg +8 -0
  319. package/images/icons/svg/multiply.svg +12 -0
  320. package/images/icons/svg/performance-feedback.svg +1 -0
  321. package/images/icons/svg/plus.svg +12 -0
  322. package/images/icons/svg/preview.svg +15 -0
  323. package/images/icons/svg/print.svg +1 -0
  324. package/images/icons/svg/registration.svg +8 -0
  325. package/images/icons/svg/reporting.svg +15 -0
  326. package/images/icons/svg/save-disk.svg +5 -0
  327. package/images/icons/svg/search.svg +1 -0
  328. package/images/icons/svg/subtract.svg +15 -0
  329. package/images/icons/svg/targeted-review.svg +15 -0
  330. package/images/icons/svg/tooltip-question.svg +1 -0
  331. package/images/icons/svg/trash.svg +1 -0
  332. package/images/icons/svg/upload.svg +1 -0
  333. package/images/us_flag_small.png +0 -0
  334. package/index.js +5 -0
  335. package/jest.config.js +132 -132
  336. package/lib/Chevron.jsx +32 -0
  337. package/lib/SvgComponents.jsx +197 -49
  338. package/package.json +51 -78
  339. package/session/isAuthV2.js +22 -0
  340. package/session/logout.js +57 -19
  341. package/session/refresh.js +36 -33
  342. package/session/ttl.js +21 -33
  343. package/storybook-static/229.630347465201d1822126.manager.bundle.js +1 -0
  344. package/storybook-static/295.aa3c5122636a27ad7c7b.manager.bundle.js +1 -0
  345. package/storybook-static/468.d976c69e47003b4dcfa3.manager.bundle.js +2 -0
  346. package/storybook-static/468.d976c69e47003b4dcfa3.manager.bundle.js.LICENSE.txt +94 -0
  347. package/storybook-static/51.fc4b02f2a75c894ae64e.manager.bundle.js +2 -0
  348. package/storybook-static/51.fc4b02f2a75c894ae64e.manager.bundle.js.LICENSE.txt +8 -0
  349. package/storybook-static/551.45aead073703cc6fb12b.manager.bundle.js +1 -0
  350. package/storybook-static/807.1a7f4dcf15e4696572ca.manager.bundle.js +2 -0
  351. package/storybook-static/807.1a7f4dcf15e4696572ca.manager.bundle.js.LICENSE.txt +31 -0
  352. package/storybook-static/897.9b5fee8cc7074607c812.manager.bundle.js +2 -0
  353. package/storybook-static/897.9b5fee8cc7074607c812.manager.bundle.js.LICENSE.txt +12 -0
  354. package/storybook-static/935.532759f0652585685af7.manager.bundle.js +1 -0
  355. package/storybook-static/favicon.ico +0 -0
  356. package/storybook-static/index.html +59 -0
  357. package/storybook-static/main.ad4edcd27d527a119d7a.manager.bundle.js +1 -0
  358. package/storybook-static/project.json +1 -0
  359. package/storybook-static/runtime~main.b165398bf7ef3e30d431.manager.bundle.js +1 -0
  360. package/styles/_main.scss +6 -0
  361. package/styles/_qpp-style.scss +0 -3
  362. package/styles/components/_accordion.scss +256 -246
  363. package/styles/components/_autocomplete.scss +0 -3
  364. package/styles/components/_notification-banner.scss +151 -150
  365. package/styles/components/_spinner.scss +0 -2
  366. package/styles/components/_tables.scss +77 -67
  367. package/styles/components/_text.scss +102 -102
  368. package/styles/qppds/base/_backgrounds.scss +4 -9
  369. package/styles/qppds/base/_fonts.scss +29 -5
  370. package/styles/qppds/base/_icon.scss +31 -0
  371. package/styles/qppds/base/_layout.scss +5 -0
  372. package/styles/qppds/base/_typography.scss +81 -47
  373. package/styles/qppds/base/index.scss +5 -8
  374. package/styles/qppds/components/_alert.scss +101 -0
  375. package/styles/qppds/components/_breadcrumbs.scss +55 -21
  376. package/styles/qppds/components/_button.scss +118 -92
  377. package/styles/qppds/components/_card.scss +176 -0
  378. package/styles/qppds/components/_checkbox.scss +201 -0
  379. package/styles/qppds/components/_circular-loader.scss +47 -0
  380. package/styles/qppds/components/_details.scss +91 -0
  381. package/styles/qppds/components/_dropdown-menu.scss +126 -0
  382. package/styles/qppds/components/_dropdown.scss +22 -17
  383. package/styles/qppds/components/_footer.scss +606 -0
  384. package/styles/qppds/components/_gov-banner.scss +342 -0
  385. package/styles/qppds/components/_header.scss +935 -0
  386. package/styles/qppds/components/_link.scss +37 -12
  387. package/styles/qppds/components/_modal.scss +106 -31
  388. package/styles/qppds/components/_page-header.scss +78 -14
  389. package/styles/qppds/components/_pagination.scss +230 -0
  390. package/styles/qppds/components/_process-list.scss +106 -0
  391. package/styles/qppds/components/_radio-button.scss +185 -0
  392. package/styles/qppds/components/_search.scss +222 -0
  393. package/styles/{components → qppds/components}/_sidebar.scss +2 -0
  394. package/styles/qppds/components/_step-indicator.scss +193 -0
  395. package/styles/qppds/components/_table.scss +159 -0
  396. package/styles/qppds/components/_tabs.scss +199 -0
  397. package/styles/qppds/components/_text-input.scss +60 -0
  398. package/styles/qppds/components/index.scss +25 -6
  399. package/styles/{components → qppds/components}/sidebar/_details.scss +3 -0
  400. package/styles/{components → qppds/components}/sidebar/_links.scss +48 -1
  401. package/styles/qppds/components/sidebar/_select-role-dropdown.scss +21 -0
  402. package/styles/qppds/components/sidebar/_sidebar-animation.scss +91 -0
  403. package/styles/qppds/components/sidebar/_sidebar.scss +145 -0
  404. package/styles/qppds/settings/_functions.scss +3 -1
  405. package/styles/qppds/settings/_index.scss +3 -3
  406. package/styles/qppds/settings/mixins/_borders.scss +6 -0
  407. package/styles/qppds/settings/mixins/_focus.scss +14 -6
  408. package/styles/qppds/settings/mixins/_icons.scss +39 -4
  409. package/styles/qppds/settings/mixins/_index.scss +8 -5
  410. package/styles/qppds/settings/mixins/_layout.scss +47 -8
  411. package/styles/qppds/settings/mixins/_table.scss +92 -0
  412. package/styles/qppds/settings/mixins/_type.scss +90 -0
  413. package/styles/qppds/settings/variables/_color.scss +47 -1
  414. package/styles/qppds/settings/variables/_index.scss +4 -3
  415. package/styles/qppds/settings/variables/_layout.scss +45 -20
  416. package/styles/qppds/settings/variables/_type.scss +51 -10
  417. package/styles/qppds/settings/variables/_z-index.scss +8 -0
  418. package/styles/qppds/utilities/_background-color.scss +37 -33
  419. package/styles/qppds/utilities/_color.scss +28 -4
  420. package/styles/qppds/utilities/{_display-visability.scss → _display-visibility.scss} +13 -4
  421. package/styles/qppds/utilities/_flexbox.scss +126 -13
  422. package/styles/qppds/utilities/_font-family.scss +6 -1
  423. package/styles/qppds/utilities/_font-size.scss +2 -2
  424. package/styles/qppds/utilities/_font-weight.scss +4 -2
  425. package/styles/qppds/utilities/_gap.scss +38 -0
  426. package/styles/qppds/utilities/_height.scss +81 -0
  427. package/styles/qppds/utilities/_list-style.scss +17 -0
  428. package/styles/qppds/utilities/_margin.scss +6 -6
  429. package/styles/qppds/utilities/_padding.scss +6 -6
  430. package/styles/qppds/utilities/_position.scss +24 -0
  431. package/styles/qppds/utilities/_text-align.scss +40 -0
  432. package/styles/qppds/utilities/_text-transform.scss +7 -0
  433. package/styles/qppds/utilities/_truncate.scss +5 -5
  434. package/styles/qppds/utilities/_vertical-align.scss +72 -0
  435. package/styles/qppds/utilities/_width.scss +46 -8
  436. package/styles/qppds/utilities/index.scss +17 -11
  437. package/svgo.config.js +14 -0
  438. package/test/components/Accordion.test.js +4 -13
  439. package/test/components/ErrorUI.test.js +10 -46
  440. package/test/components/FooterUI.test.js +18 -49
  441. package/test/components/HeaderUI.test.js +5 -12
  442. package/test/components/Infotip.test.js +41 -37
  443. package/test/session/session.test.js +67 -68
  444. package/test-setup.js +0 -8
  445. package/webpack.config.js +47 -40
  446. package/webpack.config.react.js +9 -20
  447. package/.storybook/.babelrc +0 -4
  448. package/.storybook/main.js +0 -88
  449. package/.storybook/preview-head.html +0 -9
  450. package/.storybook/preview.js +0 -5
  451. package/Session.vim +0 -83
  452. package/components/Accordion/Accordion.stories.js +0 -20
  453. package/components/Breadcrumb/Breadcrumb.stories.js +0 -58
  454. package/components/Button/Button.stories.js +0 -125
  455. package/components/Footer/Footer.stories.js +0 -20
  456. package/components/Footer/LegacyFooterUI.jsx +0 -194
  457. package/components/Header/Header.stories.js +0 -32
  458. package/components/InfoModal/InfoModal.stories.js +0 -98
  459. package/components/InfoModal/index.jsx +0 -104
  460. package/components/Infotip/Infotip.stories.js +0 -50
  461. package/components/Modal/Modal.stories.js +0 -159
  462. package/components/NotificationBanner/NotificationBanner.stories.js +0 -22
  463. package/components/NotificationBanner/NotificationBannerUI.jsx +0 -282
  464. package/components/SessionDialogUI.jsx +0 -253
  465. package/components/SideNav/Chart/ScoreChart.jsx +0 -268
  466. package/components/SideNav/Chart/__tests__/ScoreChart.test.js +0 -31
  467. package/components/SideNav/Chart/__tests__/__snapshots__/ScoreChart.test.js.snap +0 -64
  468. package/components/SideNav/Chart/index.js +0 -3
  469. package/components/SideNav/Content/LevelTwoContent.jsx +0 -214
  470. package/components/SideNav/SideNav.stories.js +0 -397
  471. package/components/Spinner/index.js +0 -9
  472. package/components/Tabs/TabsUI.jsx +0 -118
  473. package/components/Tabs/tabs.js +0 -36
  474. package/components/Tooltip/Tooltip.jsx +0 -88
  475. package/components/Tooltip/Tooltip.stories.js +0 -80
  476. package/components/Tooltip/index.js +0 -3
  477. package/components/Tooltip/position.js +0 -68
  478. package/components/UnwrappedSpinner/index.js +0 -8
  479. package/components/UnwrappedTabs/TabPanelUI.jsx +0 -16
  480. package/components/UnwrappedTabs/TabsUI.jsx +0 -82
  481. package/coverage/lcov-report/Accordion/index.html +0 -111
  482. package/coverage/lcov-report/Error/index.html +0 -126
  483. package/coverage/lcov-report/ScoreChart.jsx.html +0 -1025
  484. package/coverage/lcov-report/SideNav/Chart/ScoreChart.jsx.html +0 -1025
  485. package/coverage/lcov-report/components/Footer/LegacyFooterUI.jsx.html +0 -668
  486. package/coverage/lcov-report/components/NotificationBanner/NotificationBannerUI.jsx.html +0 -1010
  487. package/coverage/lcov-report/components/SideNav/Chart/ScoreChart.jsx.html +0 -1025
  488. package/coverage/lcov-report/components/SideNav/Chart/index.html +0 -126
  489. package/coverage/lcov-report/components/SideNav/Chart/index.js.html +0 -89
  490. package/coverage/lcov-report/components/SideNav/Content/LevelOneContent.jsx.html +0 -1007
  491. package/coverage/lcov-report/components/SideNav/Content/index.html +0 -141
  492. package/coverage/lcov-report/components/SideNav/Content/index.js.html +0 -92
  493. package/coverage/lcov-report/components/SideNav/Details/index.js.html +0 -92
  494. package/coverage/lcov-report/components/SideNav/Links/index.html +0 -201
  495. package/coverage/lcov-report/components/SideNav/UI/SideNavUI.jsx.html +0 -1298
  496. package/coverage/lcov-report/components/SideNav/UI/index.html +0 -126
  497. package/coverage/lcov-report/lib/svg-definitions.svg.html +0 -1319
  498. package/coverage/lcov-report/react/components/Footer/LegacyFooterUI.jsx.html +0 -662
  499. package/coverage/lcov-report/react/components/NotificationBanner/NotificationBannerUI.jsx.html +0 -926
  500. package/styles/components/_footer.scss +0 -593
  501. package/styles/components/_header.scss +0 -566
  502. package/styles/components/_header_backup.scss +0 -574
  503. package/styles/components/sidebar/_sidebar-animation.scss +0 -121
  504. package/styles/components/sidebar/_sidebar.scss +0 -141
  505. package/test/components/SessionDialogUI.test.js +0 -354
  506. package/test/components/Tooltip.test.js +0 -147
  507. package/test/components/__snapshots__/Accordion.test.js.snap +0 -11439
  508. /package/styles/{components → qppds/components}/sidebar/_animations.scss +0 -0
  509. /package/styles/{components → qppds/components}/sidebar/_cms.scss +0 -0
  510. /package/styles/{components → qppds/components}/sidebar/_sidebar-tooltip.scss +0 -0
  511. /package/styles/{components → qppds/components}/sidebar/project-specific/_wi.scss +0 -0
package/.editorconfig CHANGED
@@ -6,7 +6,7 @@ root = true
6
6
 
7
7
  [*]
8
8
  indent_style = space
9
- indent_size = 4
9
+ indent_size = 2
10
10
  end_of_line = lf
11
11
  charset = utf-8
12
12
  trim_trailing_whitespace = true
package/.eslintrc.js CHANGED
@@ -1,31 +1,32 @@
1
1
  module.exports = {
2
- extends: ['eslint:recommended', 'plugin:react/recommended'],
3
- parser: 'babel-eslint',
4
- parserOptions: {
5
- sourceType: 'module',
6
- ecmaFeatures: {
7
- jsx: true
8
- }
2
+ extends: ["eslint:recommended", "plugin:react/recommended"],
3
+ parser: "@babel/eslint-parser",
4
+ parserOptions: {
5
+ sourceType: "module",
6
+ ecmaFeatures: {
7
+ jsx: true,
9
8
  },
10
- env: {
11
- es6: true,
12
- node: true,
13
- browser: true,
14
- jquery: true,
15
- mocha: true
16
- },
17
- rules: {
18
- 'no-unused-vars': [
19
- 'error',
20
- {
21
- args: 'none'
22
- }
23
- ],
24
- 'linebreak-style': ['error', 'unix'],
25
- 'no-console': 0,
26
- 'no-prototype-builtins': [0]
27
- },
28
- settings: {
29
- react: { version: 'detect' }
30
- }
9
+ },
10
+ env: {
11
+ es6: true,
12
+ node: true,
13
+ browser: true,
14
+ jquery: true,
15
+ mocha: true,
16
+ },
17
+ rules: {
18
+ "no-unused-vars": [
19
+ "error",
20
+ {
21
+ args: "none",
22
+ },
23
+ ],
24
+ "linebreak-style": ["error", "unix"],
25
+ "no-console": 0,
26
+ "no-prototype-builtins": [0],
27
+ "react/no-deprecated": [0],
28
+ },
29
+ settings: {
30
+ react: { version: "detect" },
31
+ },
31
32
  };
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env sh
2
+ . "$(dirname -- "$0")/_/husky.sh"
3
+
4
+ cd react
5
+ npm run precommit
package/.prettierrc ADDED
@@ -0,0 +1 @@
1
+ {}
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # QPP-Style React
2
+
3
+ This directory contains react implementations of the components for QPP.
4
+
5
+ ## Github Branch and Pull Request process
6
+
7
+ 1. Create branch off main and create a Pull Request into main for the feature.
8
+ > Example Branch Name: feature/QPPXX-XXXX_make_icon_better
9
+ 2. Once merged into main, create release branch from main.
10
+ 3. Name the new branch release/x.xx.x
11
+ 4. Run the version bump:
12
+
13
+ ```bash
14
+ cd qpp-style/react
15
+ npm version --no-git-tag-version patch
16
+ ```
17
+
18
+ Example Commit Message:
19
+
20
+ > x.xx.x release
21
+
22
+ 5. Create a pull request against main with the PR Title: x.xx.x release [Example PR](https://github.com/CMSgov/qpp-style/pull/1065)
23
+ 6. Enter the change in the description of the pull request i.e.:
24
+ > Added new svg for Icon Name
25
+
26
+ ## Generate an NPM token with Publish permissions
27
+
28
+ 1. If you do not already have an access token, sign in to npmjs.com and navigate to access tokens.
29
+ 2. Click generate new token.
30
+ 3. Select publish under type.
31
+ 4. Copy the npm token and set its value as the environment variable: NPM_TOKEN
32
+
33
+ ```bash
34
+ export NPM_TOKEN={npm_token}
35
+ ```
36
+
37
+ ## Publish the react qpp-style npm package (used by both react and angular)
38
+
39
+ ```bash
40
+ cd qpp-style/react
41
+ npm i
42
+ npm publish
43
+ ```
44
+
45
+ 7. Once published successfully, merge into main.
46
+
47
+ The Side Nav contains multiple item array types: divider, container, linkBack, linkHome, practiceDetails, individualDetails, linkDrawer, custom, chart, and switchLink.
48
+
49
+ | Item Array Type | Description |
50
+ |-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
51
+ | divider | <hr> element that is located above and below the practice container. |
52
+ | container | gets Dynamic Content of multiple items and contains the linkDrawer item. Level One and Level Two content are located in this container. |
53
+ | linkBack | <button> that links the user back to a URL. This uses a chevron Left icon. |
54
+ | linkHome | <a> tag element which sends the user back to the “Account Home” page /user/submissions. This uses the home icon SVG and is located at the top of the side nav. |
55
+ | practiceDetails | <div> element with the class name practice-container. Inside this container is the <h2> element which includes the Practice Name and the <p> element which is the Practice Tin. The Practice Tin shows either the CPC+ ID, PCF ID, APM Entity ID, VG ID, or Practice Tin. |
56
+ | individualDetails | <div> element with the class name “individual-container”. This parent element contains two other elements which are the <h3> Individual Name and the <p> Individual NPI. |
57
+ | linkDrawer | This is the most complex item type. This item displays the Level One and Level Two <button> elements which contain navigation links depending on each page as well as specific SVG icons. Depending on the page there can be multiple links to the user can access quickly using the side nav. |
58
+ | custom | This option is for sanitized HTML content. This custom HTML will be cleaned of any potentially harmful elements that could compromise the security of the web app. |
59
+ | chart | This option uses the ScoreChart component to display Chart Data on the Side Nav. This data includes categories from Quality Measures, Advancing Care Info, Promoting Interoperability, Improvement Activities, and Cost. |
60
+ | switchLink | This is an implementation of the “Switch Practice” button for the Side Nav. Clicking 'Switch Practice' will take the user back to the TIN list for the part of the application they are viewing. |
@@ -1,57 +1,49 @@
1
- import React, { useState, useRef } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- const Chevron = (props) => {
5
- return (
6
- <svg
7
- className={props.className}
8
- height="14"
9
- width="14"
10
- viewBox="0 0 200 450"
11
- xmlns="http://www.w3.org/2000/svg"
12
- >
13
- <path
14
- d="m258.476 235.971-194.344 194.343c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901l154.021-154.746-154.021-154.745c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0l194.343 194.343c9.373 9.372 9.373 24.568.001 33.941z"
15
- fill="#242424"
16
- />
17
- </svg>
18
- );
19
- };
20
-
21
- Chevron.propTypes = {
22
- className: PropTypes.string,
23
- };
24
-
25
- Chevron.defaultProps = {
26
- className: 'accordion-icon',
27
- };
1
+ import React, { useState, useRef, useEffect } from "react";
2
+ import PropTypes from "prop-types";
3
+ import { Chevron } from "../../lib/Chevron.jsx";
28
4
 
29
5
  const Accordion = (props) => {
30
- const [setActive, setActiveState] = useState('');
31
- const [setAriaPressed, setAriaPressedState] = useState(false);
32
- const [setHeight, setHeightState] = useState('0px');
33
- const [setRotate, setRotateState] = useState('accordion-icon');
34
-
35
6
  const content = useRef(null);
7
+ const [setActive, setActiveState] = useState(props.isOpen ? "active" : "");
8
+ const ariaPressed = setActive ? "true" : "false";
9
+ const getHeight = (node) => {
10
+ if (node) {
11
+ return `${node.scrollHeight}px`;
12
+ }
13
+ return "auto";
14
+ };
15
+ const height = setActive ? getHeight(content.current) : "0px";
16
+ const rotate = setActive ? "accordion-icon rotate" : "accordion-icon";
36
17
 
37
18
  function toggleAccordion() {
38
- setActiveState(setActive === '' ? 'active' : '');
39
- setAriaPressedState(setActive === '' ? 'true' : 'false');
40
- setHeightState(
41
- setActive === 'active' ? '0px' : `${content.current.scrollHeight}px`
42
- );
43
- setRotateState(
44
- setActive === 'active' ? 'accordion-icon' : 'accordion-icon rotate'
45
- );
19
+ setActiveState(setActive === "" ? "active" : "");
20
+ }
21
+
22
+ function openAccordion() {
23
+ setActiveState("active");
46
24
  }
47
25
 
26
+ function closeAccordion() {
27
+ setActiveState("");
28
+ }
29
+
30
+ useEffect(() => {
31
+ if (props.isOpen) {
32
+ openAccordion();
33
+ } else {
34
+ closeAccordion();
35
+ }
36
+ }, [props.isOpen]);
37
+
48
38
  return (
49
- <div className="accordion-section">
39
+ <div className="accordion-section" data-testid="accordion">
50
40
  <button
51
- className={`accordion ${setActive}`}
41
+ className={`accordion ${setActive} ${
42
+ setActive && props.isSticky ? "sticky" : ""
43
+ }`}
52
44
  aria-label={props.title}
53
- aria-pressed={setAriaPressed}
54
- aria-expanded={setAriaPressed}
45
+ aria-pressed={ariaPressed}
46
+ aria-expanded={ariaPressed}
55
47
  tabIndex="0"
56
48
  onClick={toggleAccordion}
57
49
  >
@@ -72,12 +64,12 @@ const Accordion = (props) => {
72
64
  </div>
73
65
  )}
74
66
  <div className="chevron-container">
75
- <Chevron className={`${setRotate}`} />
67
+ <Chevron className={rotate} />
76
68
  </div>
77
69
  </button>
78
70
  <div
79
71
  ref={content}
80
- style={{ maxHeight: `${setHeight}` }}
72
+ style={{ maxHeight: height }}
81
73
  className="accordion-content"
82
74
  >
83
75
  <div className="accordion-text dashed-border">{props.children}</div>
@@ -92,10 +84,14 @@ Accordion.propTypes = {
92
84
  children: PropTypes.any.isRequired,
93
85
  centerItem: PropTypes.string,
94
86
  rightItem: PropTypes.string,
87
+ isOpen: PropTypes.bool,
88
+ isSticky: PropTypes.bool,
95
89
  };
96
90
 
97
91
  Accordion.defaultProps = {
98
- title: '',
92
+ title: "",
93
+ isOpen: false,
94
+ isSticky: false,
99
95
  };
100
96
 
101
97
  export default Accordion;
@@ -0,0 +1,53 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+
4
+ const Alert = ({
5
+ title,
6
+ children,
7
+ description,
8
+ variant,
9
+ className,
10
+ ...rest
11
+ }) => {
12
+ const HeadingComponent = title?.headingLevel || "h2";
13
+ return (
14
+ <div
15
+ className={`qpp-c-alert qpp-c-alert--${variant} ${className}`}
16
+ role="alert"
17
+ {...rest}
18
+ >
19
+ <div className="qpp-c-alert__body">
20
+ {title && (
21
+ <HeadingComponent className="h4 qpp-c-alert__heading">
22
+ {typeof title === "object" ? title.text : title}
23
+ </HeadingComponent>
24
+ )}
25
+ {description && <p className="qpp-c-alert__text">{description}</p>}
26
+ {children}
27
+ </div>
28
+ </div>
29
+ );
30
+ };
31
+
32
+ Alert.propTypes = {
33
+ children: PropTypes.node,
34
+ className: PropTypes.string,
35
+ description: PropTypes.string,
36
+ title: PropTypes.oneOfType([
37
+ PropTypes.string,
38
+ PropTypes.shape({
39
+ text: PropTypes.string,
40
+ headingLevel: PropTypes.string,
41
+ }),
42
+ ]),
43
+ variant: PropTypes.oneOf(["info", "warning", "success", "error"]),
44
+ };
45
+ Alert.defaultProps = {
46
+ children: null,
47
+ className: "",
48
+ description: null,
49
+ title: null,
50
+ variant: "info",
51
+ };
52
+
53
+ export default Alert;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
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 ? 'qpp-c-breadcrumbs--light' : ''
14
+ !dark ? "qpp-c-breadcrumbs--light" : ""
15
15
  } ${breadcrumbClass}`}
16
16
  aria-label="Breadcrumbs"
17
17
  >
@@ -50,12 +50,12 @@ const Breadcrumb = ({
50
50
  return (
51
51
  <li
52
52
  key={crumb}
53
- className="qpp-c-breadcrumbs__list-item qpp-c-breadcrumbs__list-item--current"
53
+ className={`${
54
+ i === crumbs.length - 1 ? "sr-only" : ""
55
+ } qpp-c-breadcrumbs__list-itemqpp-c-breadcrumbs__list-item--current`}
54
56
  aria-current="page"
55
57
  >
56
- <span className={i === crumbs.length - 1 ? 'sr-only' : ''}>
57
- {crumb}
58
- </span>
58
+ <span>{crumb}</span>
59
59
  </li>
60
60
  );
61
61
  }
@@ -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 'react';
2
- import PropTypes from 'prop-types';
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
3
 
4
- const VARIANTS = ['secondary', 'outline', 'danger', 'white']
5
- const SIZES = ['big']
4
+ const VARIANTS = ["secondary", "outline", "danger", "white"];
5
+ const SIZES = ["big"];
6
6
 
7
7
  const Button = ({
8
8
  children,
@@ -12,22 +12,29 @@ const Button = ({
12
12
  onClick,
13
13
  size,
14
14
  variant,
15
+ type,
16
+ ...rest
15
17
  }) => {
16
- let btnClass = 'qpp-c-button';
18
+ let btnClass = "qpp-c-button";
17
19
 
18
20
  if (VARIANTS.includes(variant)) {
19
- btnClass = btnClass.concat(' ', `qpp-c-button--${variant}`);
21
+ btnClass = btnClass.concat(" ", `qpp-c-button--${variant}`);
20
22
  }
21
23
  if (SIZES.includes(size)) {
22
- btnClass = btnClass.concat(' ', `qpp-c-button--${size}`);
24
+ btnClass = btnClass.concat(" ", `qpp-c-button--${size}`);
23
25
  }
24
26
  if (className) {
25
- btnClass = btnClass.concat(' ', className);
27
+ btnClass = btnClass.concat(" ", className);
26
28
  }
27
29
 
28
30
  if (href) {
29
31
  return (
30
- <a href={href} data-testid="ds-btn" className={btnClass || ''}>
32
+ <a
33
+ href={href}
34
+ data-testid="ds-btn"
35
+ className={btnClass || ""}
36
+ onClick={onClick}
37
+ >
31
38
  {children}
32
39
  </a>
33
40
  );
@@ -35,9 +42,11 @@ const Button = ({
35
42
  return (
36
43
  <button
37
44
  data-testid="ds-btn"
38
- className={btnClass || ''}
45
+ className={btnClass || ""}
39
46
  onClick={onClick}
40
47
  disabled={loading}
48
+ type={type}
49
+ {...rest}
41
50
  >
42
51
  {children}
43
52
  </button>
@@ -51,29 +60,31 @@ Button.propTypes = {
51
60
  loading: PropTypes.bool,
52
61
  onClick: PropTypes.func,
53
62
  size: PropTypes.oneOf(SIZES),
63
+ type: PropTypes.string,
54
64
  variant: PropTypes.oneOf(VARIANTS),
55
65
  };
56
66
 
57
67
  Button.defaultProps = {
58
68
  children: false,
59
- className: '',
60
- href: '',
69
+ className: "",
70
+ href: "",
61
71
  loading: false,
62
72
  onClick: () => null,
63
73
  size: null,
74
+ type: "button",
64
75
  variant: null,
65
76
  };
66
77
 
67
- export const TextButton = ({ className = '', ...props }) => (
78
+ export const TextButton = ({ className = "", ...props }) => (
68
79
  <Button className={`qpp-c-button--text ${className}`} {...props} />
69
- )
80
+ );
70
81
 
71
82
  TextButton.propTypes = {
72
83
  className: PropTypes.string,
73
- }
84
+ };
74
85
 
75
86
  TextButton.defaultProps = {
76
- className: '',
77
- }
87
+ className: "",
88
+ };
78
89
 
79
90
  export default Button;
@@ -0,0 +1,50 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+
4
+ export const Add = ({ iconText }) => (
5
+ <>
6
+ <svg
7
+ className="qpp-c-details--icon-closed qpp-icon-mat qpp-icon-inline--md"
8
+ aria-hidden="true"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ viewBox="0 0 24 24"
11
+ role="img"
12
+ focusable="false"
13
+ >
14
+ <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
15
+ </svg>{" "}
16
+ {iconText}
17
+ </>
18
+ );
19
+
20
+ Add.propTypes = {
21
+ iconText: PropTypes.string,
22
+ };
23
+
24
+ Add.defaultProps = {
25
+ iconText: null,
26
+ };
27
+
28
+ export const Remove = ({ iconText }) => (
29
+ <>
30
+ <svg
31
+ className="qpp-c-details--icon-open qpp-icon-mat qpp-icon-inline--md"
32
+ aria-hidden="true"
33
+ xmlns="http://www.w3.org/2000/svg"
34
+ viewBox="0 0 24 24"
35
+ role="img"
36
+ focusable="false"
37
+ >
38
+ <path d="M19 13H5v-2h14v2z" />
39
+ </svg>
40
+ {iconText}
41
+ </>
42
+ );
43
+
44
+ Remove.propTypes = {
45
+ iconText: PropTypes.string,
46
+ };
47
+
48
+ Remove.defaultProps = {
49
+ iconText: null,
50
+ };
@@ -0,0 +1,53 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import { Add, Remove } from "./DetailsIcons";
4
+
5
+ const Details = ({ children, title, variant, className, ...rest }) => {
6
+ if (variant === "header") {
7
+ return (
8
+ <details className="qpp-c-details qpp-c-details--header">
9
+ <summary>
10
+ {title}
11
+ <span className="qpp-c-details--icon-closed" aria-hidden="true">
12
+ <Add iconText="View" />
13
+ </span>
14
+ <span className="qpp-c-details--icon-open" aria-hidden="true">
15
+ <Remove iconText="Hide" />
16
+ </span>
17
+ </summary>
18
+ {children}
19
+ </details>
20
+ );
21
+ }
22
+
23
+ return (
24
+ <details className={`qpp-c-details ${className}`} {...rest}>
25
+ <summary
26
+ className={
27
+ variant === "text-button" ? "qpp-c-button qpp-c-button--text" : ""
28
+ }
29
+ >
30
+ <Add />
31
+ <Remove />
32
+ {title}
33
+ </summary>
34
+ {children}
35
+ </details>
36
+ );
37
+ };
38
+
39
+ Details.propTypes = {
40
+ children: PropTypes.node,
41
+ title: PropTypes.node,
42
+ variant: PropTypes.oneOf(["header", "text-button"]),
43
+ className: PropTypes.string,
44
+ };
45
+
46
+ Details.defaultProps = {
47
+ children: false,
48
+ title: null,
49
+ variant: null,
50
+ className: "",
51
+ };
52
+
53
+ export default Details;
@@ -0,0 +1,85 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+
4
+ const Dropdown = ({
5
+ className,
6
+ id,
7
+ ariaLabelledBy,
8
+ ariaLabel,
9
+ onChange,
10
+ dataTestId,
11
+ name,
12
+ dataType,
13
+ disabled,
14
+ size,
15
+ options,
16
+ children,
17
+ parentElement,
18
+ ...rest
19
+ }) => {
20
+ const dropdownClass = [
21
+ "qpp-c-dropdown",
22
+ size === "big" && "qpp-c-dropdown--big",
23
+ className,
24
+ ]
25
+ .filter(Boolean)
26
+ .join(" ");
27
+
28
+ return (
29
+ <select
30
+ id={id}
31
+ aria-labelledby={ariaLabelledBy}
32
+ aria-label={ariaLabel}
33
+ className={dropdownClass || ""}
34
+ onChange={onChange}
35
+ data-testid={dataTestId}
36
+ name={name}
37
+ disabled={disabled}
38
+ data-type={dataType}
39
+ {...rest}
40
+ >
41
+ {children}
42
+ {options.map(({ disabled, name, value }) => (
43
+ <option disabled={disabled} key={value} value={value}>
44
+ {name}
45
+ </option>
46
+ ))}
47
+ </select>
48
+ );
49
+ };
50
+
51
+ Dropdown.propTypes = {
52
+ children: PropTypes.node,
53
+ className: PropTypes.string,
54
+ id: PropTypes.string,
55
+ ariaLabelledBy: PropTypes.string,
56
+ ariaLabel: PropTypes.string,
57
+ onChange: PropTypes.func,
58
+ value: PropTypes.string,
59
+ defaultValue: PropTypes.string,
60
+ dataTestId: PropTypes.string,
61
+ name: PropTypes.string,
62
+ dataType: PropTypes.string,
63
+ disabled: PropTypes.bool,
64
+ size: PropTypes.oneOf(["big"]),
65
+ options: PropTypes.array,
66
+ parentElement: PropTypes.string,
67
+ };
68
+
69
+ Dropdown.defaultProps = {
70
+ children: false,
71
+ className: "qpp-u-width--100",
72
+ id: null,
73
+ ariaLabelledBy: null,
74
+ ariaLabel: null,
75
+ onChange: () => null,
76
+ dataTestId: null,
77
+ name: null,
78
+ dataType: null,
79
+ disabled: false,
80
+ size: null,
81
+ options: [],
82
+ parentElement: "span",
83
+ };
84
+
85
+ export default Dropdown;
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import { Menu as AriaKitMenu } from "ariakit/menu";
4
+
5
+ function Menu({ state, className, children, ...props }) {
6
+ return (
7
+ <AriaKitMenu as="ul" state={state} className={className} {...props}>
8
+ {children}
9
+ </AriaKitMenu>
10
+ );
11
+ }
12
+
13
+ Menu.propTypes = {
14
+ state: PropTypes.object.isRequired,
15
+ className: PropTypes.string,
16
+ children: PropTypes.node,
17
+ };
18
+
19
+ Menu.defaultProps = {
20
+ className:
21
+ "qpp-c-dropdown-menu qpp-c-dropdown-menu__box qpp-c-dropdown-menu__list",
22
+ children: null,
23
+ };
24
+
25
+ export default Menu;