qpp-style 1.0.0-ds.3 → 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 (436) hide show
  1. package/.editorconfig +1 -1
  2. package/.eslintrc.js +29 -28
  3. package/.prettierrc +1 -0
  4. package/README.md +22 -4
  5. package/components/Accordion/index.jsx +17 -13
  6. package/components/Alert/index.js +7 -7
  7. package/components/Breadcrumb/index.js +5 -5
  8. package/components/Button/index.js +15 -15
  9. package/components/Details/DetailsIcons.js +50 -0
  10. package/components/Details/index.js +53 -0
  11. package/components/Dropdown/index.js +9 -9
  12. package/components/DropdownButton/Menu.js +25 -0
  13. package/components/DropdownButton/MenuButton.js +41 -0
  14. package/components/DropdownButton/MenuItem.js +25 -0
  15. package/components/DropdownButton/MenuItemLink.js +27 -0
  16. package/components/Error/Collapsible.jsx +3 -3
  17. package/components/Error/ErrorUI.jsx +4 -4
  18. package/components/Error/error.js +4 -4
  19. package/components/FlashNotification/FlashNotificationUI.jsx +11 -11
  20. package/components/FlashNotification/index.js +5 -5
  21. package/components/Footer/FooterUI.jsx +31 -27
  22. package/components/Footer/SocialLinks.jsx +1 -1
  23. package/components/Footer/Subscribe.jsx +1 -1
  24. package/components/Footer/footer.js +4 -4
  25. package/components/GovBanner/index.js +2 -2
  26. package/components/Header/HeaderAccountMenu.jsx +18 -93
  27. package/components/Header/HeaderCancel.jsx +2 -2
  28. package/components/Header/HeaderContainer.jsx +50 -28
  29. package/components/Header/HeaderLogo.jsx +25 -5
  30. package/components/Header/HeaderMenuButton.js +7 -7
  31. package/components/Header/HeaderMenuItem.jsx +39 -39
  32. package/components/Header/HeaderMenuLink.js +9 -9
  33. package/components/Header/HeaderMenuSignOutButton.js +9 -9
  34. package/components/Header/HeaderMobileButton.js +4 -4
  35. package/components/Header/HeaderUI.jsx +80 -76
  36. package/components/Header/HelpIcon.jsx +1 -1
  37. package/components/Header/ImpersonatorBanner.jsx +35 -30
  38. package/components/Header/NavigationButtonIcon.jsx +1 -1
  39. package/components/Header/header.js +4 -4
  40. package/components/Header/hooks.js +24 -10
  41. package/components/Header/utag-helpers.js +1 -1
  42. package/components/HeaderSearchBar/index.jsx +80 -0
  43. package/components/Infotip/Infotip.jsx +15 -19
  44. package/components/Infotip/InfotipContent.jsx +48 -0
  45. package/components/Infotip/InfotipIcon.jsx +5 -5
  46. package/components/Infotip/index.js +1 -1
  47. package/components/Link/index.js +11 -11
  48. package/components/Modal/LegacyModal.jsx +8 -8
  49. package/components/Modal/Modal.jsx +10 -10
  50. package/components/Modal/index.jsx +5 -5
  51. package/components/NotificationBanner/CollapsedView.js +32 -25
  52. package/components/NotificationBanner/ExpandedView.js +6 -6
  53. package/components/NotificationBanner/index.js +30 -30
  54. package/components/SanitizedContent/index.jsx +189 -166
  55. package/components/Search/index.js +15 -15
  56. package/components/Session/Session.jsx +89 -0
  57. package/components/Session/SessionDialogWrapped.jsx +12 -0
  58. package/components/Session/index.jsx +3 -0
  59. package/components/SideNav/AnimationGroup/AnimationGroup.jsx +5 -5
  60. package/components/SideNav/Content/LevelOneContent.jsx +31 -171
  61. package/components/SideNav/Content/SelectRole/index.js +14 -22
  62. package/components/SideNav/Content/SelectRole/utils.js +38 -27
  63. package/components/SideNav/Content/index.js +2 -3
  64. package/components/SideNav/Details/IndividualDetails.jsx +2 -2
  65. package/components/SideNav/Details/PracticeDetails.jsx +9 -3
  66. package/components/SideNav/Details/index.js +2 -2
  67. package/components/SideNav/Links/CmsSwitchLink.jsx +4 -4
  68. package/components/SideNav/Links/NavItemInline.jsx +7 -7
  69. package/components/SideNav/Links/NavLinkContainer.jsx +2 -2
  70. package/components/SideNav/Links/NavLinkDrawer.jsx +85 -65
  71. package/components/SideNav/Links/NavLinkInline.jsx +17 -18
  72. package/components/SideNav/Links/NavLinkToggle.jsx +7 -7
  73. package/components/SideNav/Links/index.js +5 -5
  74. package/components/SideNav/UI/SideNavUI.jsx +108 -125
  75. package/components/SideNav/UI/default-markup.js +4 -0
  76. package/components/SideNav/UI/index.js +1 -1
  77. package/components/SideNav/UI/utils.js +0 -0
  78. package/components/SideNav/helpers.js +23 -308
  79. package/components/SideNav/index.js +11 -35
  80. package/components/Tabs/TabPanel.js +2 -38
  81. package/components/Tabs/Tabs.js +73 -0
  82. package/components/TextInput/index.js +21 -21
  83. package/components/hooks/useGetConfig.js +8 -9
  84. package/components/index.js +22 -26
  85. package/coverage/clover.xml +636 -765
  86. package/coverage/coverage-final.json +70 -73
  87. package/coverage/lcov-report/Tooltip.jsx.html +232 -0
  88. package/coverage/lcov-report/components/Accordion/index.html +116 -0
  89. package/coverage/lcov-report/components/Accordion/index.jsx.html +364 -0
  90. package/coverage/lcov-report/components/Button/index.html +116 -0
  91. package/coverage/lcov-report/components/Button/index.js.html +355 -0
  92. package/coverage/lcov-report/components/Error/Collapsible.jsx.html +349 -0
  93. package/coverage/lcov-report/components/Error/ErrorUI.jsx.html +178 -0
  94. package/coverage/lcov-report/components/Error/index.html +131 -0
  95. package/coverage/lcov-report/components/Footer/FooterUI.jsx.html +706 -0
  96. package/coverage/lcov-report/components/Footer/SocialLinks.jsx.html +265 -0
  97. package/coverage/lcov-report/components/Footer/Subscribe.jsx.html +187 -0
  98. package/coverage/lcov-report/components/Footer/index.html +146 -0
  99. package/coverage/lcov-report/components/GovBanner/index.html +116 -0
  100. package/coverage/lcov-report/components/GovBanner/index.js.html +436 -0
  101. package/coverage/lcov-report/components/Header/HeaderAccountMenu.jsx.html +367 -0
  102. package/coverage/lcov-report/components/Header/HeaderCancel.jsx.html +133 -0
  103. package/coverage/lcov-report/components/Header/HeaderContainer.jsx.html +307 -0
  104. package/coverage/lcov-report/components/Header/HeaderLogo.jsx.html +211 -0
  105. package/coverage/lcov-report/components/Header/HeaderMenuButton.js.html +235 -0
  106. package/coverage/lcov-report/components/Header/HeaderMenuItem.jsx.html +802 -0
  107. package/coverage/lcov-report/components/Header/HeaderMenuLink.js.html +253 -0
  108. package/coverage/lcov-report/components/Header/HeaderMenuSignOutButton.js.html +271 -0
  109. package/coverage/lcov-report/components/Header/HeaderMobileButton.js.html +196 -0
  110. package/coverage/lcov-report/components/Header/HeaderUI.jsx.html +586 -0
  111. package/coverage/lcov-report/components/Header/HelpIcon.jsx.html +181 -0
  112. package/coverage/lcov-report/components/Header/ImpersonatorBanner.jsx.html +328 -0
  113. package/coverage/lcov-report/components/Header/NavigationButtonIcon.jsx.html +166 -0
  114. package/coverage/lcov-report/components/Header/hooks.js.html +283 -0
  115. package/coverage/lcov-report/components/Header/index.html +326 -0
  116. package/coverage/lcov-report/components/Header/utag-helpers.js.html +112 -0
  117. package/coverage/lcov-report/components/Infotip/Infotip.jsx.html +310 -0
  118. package/coverage/lcov-report/components/Infotip/InfotipIcon.jsx.html +208 -0
  119. package/coverage/lcov-report/components/Infotip/index.html +146 -0
  120. package/coverage/lcov-report/components/Infotip/index.js.html +94 -0
  121. package/coverage/lcov-report/components/Modal/LegacyModal.jsx.html +301 -0
  122. package/coverage/lcov-report/components/Modal/Modal.jsx.html +505 -0
  123. package/coverage/lcov-report/components/Modal/index.html +146 -0
  124. package/coverage/lcov-report/components/Modal/index.jsx.html +151 -0
  125. package/coverage/lcov-report/components/NotificationBanner/CollapsedView.js.html +202 -0
  126. package/coverage/lcov-report/components/NotificationBanner/ExpandedView.js.html +220 -0
  127. package/coverage/lcov-report/components/NotificationBanner/index.html +146 -0
  128. package/coverage/lcov-report/components/NotificationBanner/index.js.html +748 -0
  129. package/coverage/lcov-report/components/SanitizedContent/index.html +116 -0
  130. package/coverage/lcov-report/components/SanitizedContent/index.jsx.html +685 -0
  131. package/coverage/lcov-report/components/SessionDialogUI.jsx.html +868 -0
  132. package/coverage/lcov-report/components/SideNav/Content/SelectRole/index.html +116 -0
  133. package/coverage/lcov-report/components/SideNav/Content/SelectRole/utils.js.html +505 -0
  134. package/coverage/lcov-report/components/SideNav/helpers.js.html +1138 -0
  135. package/coverage/lcov-report/components/SideNav/index.html +116 -0
  136. package/coverage/lcov-report/components/Tooltip/Tooltip.jsx.html +349 -0
  137. package/coverage/lcov-report/components/Tooltip/index.html +146 -0
  138. package/coverage/lcov-report/components/Tooltip/index.js.html +94 -0
  139. package/coverage/lcov-report/components/Tooltip/position.js.html +289 -0
  140. package/coverage/lcov-report/components/hooks/index.html +116 -0
  141. package/coverage/lcov-report/components/hooks/useGetConfig.js.html +310 -0
  142. package/coverage/lcov-report/components/index.html +116 -0
  143. package/coverage/lcov-report/favicon.png +0 -0
  144. package/coverage/lcov-report/index.html +147 -162
  145. package/coverage/lcov-report/index.js.html +94 -0
  146. package/coverage/lcov-report/lib/Chevron.jsx.html +181 -0
  147. package/coverage/lcov-report/lib/SvgComponents.jsx.html +2200 -0
  148. package/coverage/lcov-report/lib/index.html +131 -0
  149. package/coverage/lcov-report/position.js.html +289 -0
  150. package/coverage/lcov-report/react/components/Accordion/index.html +5 -5
  151. package/coverage/lcov-report/react/components/Accordion/index.jsx.html +17 -5
  152. package/coverage/lcov-report/react/components/Button/index.html +1 -1
  153. package/coverage/lcov-report/react/components/Button/index.js.html +1 -1
  154. package/coverage/lcov-report/react/components/Dropdown/index.html +1 -1
  155. package/coverage/lcov-report/react/components/Dropdown/index.js.html +1 -1
  156. package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +1 -1
  157. package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +1 -1
  158. package/coverage/lcov-report/react/components/Error/error.js.html +1 -1
  159. package/coverage/lcov-report/react/components/Error/index.html +1 -1
  160. package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +32 -20
  161. package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +1 -1
  162. package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +1 -1
  163. package/coverage/lcov-report/react/components/Footer/footer.js.html +1 -1
  164. package/coverage/lcov-report/react/components/Footer/index.html +1 -1
  165. package/coverage/lcov-report/react/components/GovBanner/index.html +21 -21
  166. package/coverage/lcov-report/react/components/GovBanner/index.js.html +16 -16
  167. package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +28 -253
  168. package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +1 -1
  169. package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +64 -37
  170. package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +17 -17
  171. package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +1 -1
  172. package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +55 -55
  173. package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +1 -1
  174. package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +1 -1
  175. package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +15 -15
  176. package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +109 -109
  177. package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +11 -11
  178. package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +39 -36
  179. package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +1 -1
  180. package/coverage/lcov-report/react/components/Header/header.js.html +1 -1
  181. package/coverage/lcov-report/react/components/Header/hooks.js.html +86 -44
  182. package/coverage/lcov-report/react/components/Header/index.html +104 -104
  183. package/coverage/lcov-report/react/components/Header/utag-helpers.js.html +1 -1
  184. package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +8 -20
  185. package/coverage/lcov-report/react/components/Infotip/InfotipContent.jsx.html +223 -0
  186. package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +1 -1
  187. package/coverage/lcov-report/react/components/Infotip/index.html +19 -4
  188. package/coverage/lcov-report/react/components/Infotip/index.js.html +1 -1
  189. package/coverage/lcov-report/react/components/Modal/LegacyModal.jsx.html +1 -1
  190. package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +1 -1
  191. package/coverage/lcov-report/react/components/Modal/index.html +1 -1
  192. package/coverage/lcov-report/react/components/Modal/index.jsx.html +1 -1
  193. package/coverage/lcov-report/react/components/NotificationBanner/CollapsedView.js.html +53 -32
  194. package/coverage/lcov-report/react/components/NotificationBanner/ExpandedView.js.html +2 -2
  195. package/coverage/lcov-report/react/components/NotificationBanner/index.html +27 -27
  196. package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +82 -82
  197. package/coverage/lcov-report/react/components/SanitizedContent/index.html +15 -15
  198. package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +79 -10
  199. package/coverage/lcov-report/react/components/SessionDialog/index.html +1 -1
  200. package/coverage/lcov-report/react/components/SessionDialog/sessionDialog.js.html +1 -1
  201. package/coverage/lcov-report/react/components/SessionDialogUI.jsx.html +1 -1
  202. package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +17 -17
  203. package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +21 -21
  204. package/coverage/lcov-report/react/components/SideNav/Chart/ScoreChart.jsx.html +1 -1
  205. package/coverage/lcov-report/react/components/SideNav/Chart/index.html +1 -1
  206. package/coverage/lcov-report/react/components/SideNav/Chart/index.js.html +2 -2
  207. package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +24 -507
  208. package/coverage/lcov-report/react/components/SideNav/Content/LevelTwoContent.jsx.html +1 -1
  209. package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.html +25 -25
  210. package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.js.html +20 -122
  211. package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/utils.js.html +13 -343
  212. package/coverage/lcov-report/react/components/SideNav/Content/index.html +15 -30
  213. package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +3 -6
  214. package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +1 -1
  215. package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +1 -1
  216. package/coverage/lcov-report/react/components/SideNav/Details/index.html +1 -1
  217. package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +1 -1
  218. package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +1 -1
  219. package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +1 -1
  220. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +18 -18
  221. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +102 -45
  222. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +5 -11
  223. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +1 -1
  224. package/coverage/lcov-report/react/components/SideNav/Links/index.html +29 -29
  225. package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +1 -1
  226. package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +105 -150
  227. package/coverage/lcov-report/react/components/SideNav/UI/default-markup.js.html +97 -0
  228. package/coverage/lcov-report/react/components/SideNav/UI/index.html +32 -17
  229. package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +1 -1
  230. package/coverage/lcov-report/react/components/SideNav/helpers.js.html +47 -743
  231. package/coverage/lcov-report/react/components/SideNav/index.html +19 -19
  232. package/coverage/lcov-report/react/components/SideNav/index.js.html +2 -8
  233. package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +42 -159
  234. package/coverage/lcov-report/react/components/Tooltip/index.html +9 -9
  235. package/coverage/lcov-report/react/components/Tooltip/index.js.html +1 -1
  236. package/coverage/lcov-report/react/components/Tooltip/position.js.html +20 -20
  237. package/coverage/lcov-report/react/components/hooks/index.html +21 -21
  238. package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +52 -52
  239. package/coverage/lcov-report/react/components/index.html +1 -1
  240. package/coverage/lcov-report/react/index.html +1 -1
  241. package/coverage/lcov-report/react/index.js.html +1 -1
  242. package/coverage/lcov-report/react/lib/Chevron.jsx.html +2 -2
  243. package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +473 -65
  244. package/coverage/lcov-report/react/lib/index.html +19 -34
  245. package/coverage/lcov-report/react/lib/svg-definitions.svg.html +1 -1
  246. package/coverage/lcov-report/react/session/index.html +20 -20
  247. package/coverage/lcov-report/react/session/index.js.html +1 -1
  248. package/coverage/lcov-report/react/session/logout.js.html +22 -46
  249. package/coverage/lcov-report/react/session/refresh.js.html +1 -1
  250. package/coverage/lcov-report/react/session/ttl.js.html +1 -1
  251. package/coverage/lcov-report/session/index.html +161 -0
  252. package/coverage/lcov-report/session/index.js.html +100 -0
  253. package/coverage/lcov-report/session/logout.js.html +307 -0
  254. package/coverage/lcov-report/session/refresh.js.html +232 -0
  255. package/coverage/lcov-report/session/ttl.js.html +196 -0
  256. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  257. package/coverage/lcov.info +1118 -1440
  258. package/dist/browser.js +1 -1
  259. package/dist/browser.js.LICENSE.txt +0 -23
  260. package/dist/browser.js.map +1 -1
  261. package/dist/index.js +1 -1
  262. package/dist/index.js.LICENSE.txt +0 -23
  263. package/dist/index.js.map +1 -1
  264. package/dist/react/index.js +1 -1
  265. package/dist/react/index.js.LICENSE.txt +8 -34
  266. package/dist/react/index.js.map +1 -1
  267. package/dist/web-components/index.js +2 -0
  268. package/dist/web-components/index.js.map +1 -0
  269. package/images/icons/svg/block.svg +5 -0
  270. package/images/icons/svg/check-circle.svg +5 -0
  271. package/images/icons/svg/checkmark.svg +7 -0
  272. package/images/icons/svg/chevron-down.svg +11 -0
  273. package/images/icons/svg/chevron-left.svg +12 -0
  274. package/images/icons/svg/chevron-right.svg +12 -0
  275. package/images/icons/svg/chevron-up.svg +12 -0
  276. package/images/icons/svg/clipboard.svg +1 -0
  277. package/images/icons/svg/divide.svg +13 -0
  278. package/images/icons/svg/doctors-and-clinicians-preview.svg +10 -0
  279. package/images/icons/svg/equals.svg +13 -0
  280. package/images/icons/svg/exclamation.svg +10 -0
  281. package/images/icons/svg/file-upload.svg +1 -1
  282. package/images/icons/svg/info.svg +17 -0
  283. package/images/icons/svg/manage-user-access.svg +8 -0
  284. package/images/icons/svg/multiply.svg +12 -0
  285. package/images/icons/svg/performance-feedback.svg +1 -0
  286. package/images/icons/svg/plus.svg +12 -0
  287. package/images/icons/svg/preview.svg +15 -0
  288. package/images/icons/svg/registration.svg +8 -0
  289. package/images/icons/svg/reporting.svg +15 -0
  290. package/images/icons/svg/save-disk.svg +5 -0
  291. package/images/icons/svg/search.svg +1 -1
  292. package/images/icons/svg/subtract.svg +15 -0
  293. package/images/icons/svg/targeted-review.svg +15 -0
  294. package/index.js +2 -2
  295. package/jest.config.js +132 -132
  296. package/lib/SvgComponents.jsx +146 -11
  297. package/package.json +41 -70
  298. package/session/isAuthV2.js +22 -0
  299. package/session/logout.js +29 -24
  300. package/session/refresh.js +36 -33
  301. package/session/ttl.js +21 -33
  302. package/storybook-static/229.630347465201d1822126.manager.bundle.js +1 -0
  303. package/storybook-static/295.aa3c5122636a27ad7c7b.manager.bundle.js +1 -0
  304. package/storybook-static/468.d976c69e47003b4dcfa3.manager.bundle.js +2 -0
  305. package/storybook-static/468.d976c69e47003b4dcfa3.manager.bundle.js.LICENSE.txt +94 -0
  306. package/storybook-static/51.fc4b02f2a75c894ae64e.manager.bundle.js +2 -0
  307. package/storybook-static/51.fc4b02f2a75c894ae64e.manager.bundle.js.LICENSE.txt +8 -0
  308. package/storybook-static/551.45aead073703cc6fb12b.manager.bundle.js +1 -0
  309. package/storybook-static/807.1a7f4dcf15e4696572ca.manager.bundle.js +2 -0
  310. package/storybook-static/807.1a7f4dcf15e4696572ca.manager.bundle.js.LICENSE.txt +31 -0
  311. package/storybook-static/897.9b5fee8cc7074607c812.manager.bundle.js +2 -0
  312. package/storybook-static/897.9b5fee8cc7074607c812.manager.bundle.js.LICENSE.txt +12 -0
  313. package/storybook-static/935.532759f0652585685af7.manager.bundle.js +1 -0
  314. package/storybook-static/favicon.ico +0 -0
  315. package/storybook-static/index.html +59 -0
  316. package/storybook-static/main.ad4edcd27d527a119d7a.manager.bundle.js +1 -0
  317. package/storybook-static/project.json +1 -0
  318. package/storybook-static/runtime~main.b165398bf7ef3e30d431.manager.bundle.js +1 -0
  319. package/styles/_main.scss +2 -2
  320. package/styles/components/_accordion.scss +7 -0
  321. package/styles/components/_notification-banner.scss +151 -150
  322. package/styles/qppds/base/_backgrounds.scss +3 -3
  323. package/styles/qppds/base/_fonts.scss +9 -9
  324. package/styles/qppds/base/_icon.scss +14 -6
  325. package/styles/qppds/base/_layout.scss +2 -2
  326. package/styles/qppds/base/_typography.scss +23 -23
  327. package/styles/qppds/base/index.scss +5 -5
  328. package/styles/qppds/components/_alert.scss +40 -34
  329. package/styles/qppds/components/_breadcrumbs.scss +43 -20
  330. package/styles/qppds/components/_button.scss +94 -90
  331. package/styles/qppds/components/_card.scss +22 -21
  332. package/styles/qppds/components/_checkbox.scss +35 -33
  333. package/styles/qppds/components/_circular-loader.scss +15 -15
  334. package/styles/qppds/components/_details.scss +91 -0
  335. package/styles/qppds/components/_dropdown-menu.scss +42 -35
  336. package/styles/qppds/components/_dropdown.scss +18 -18
  337. package/styles/qppds/components/_footer.scss +13 -11
  338. package/styles/qppds/components/_gov-banner.scss +71 -73
  339. package/styles/qppds/components/_header.scss +127 -84
  340. package/styles/qppds/components/_link.scss +29 -27
  341. package/styles/qppds/components/_modal.scss +58 -23
  342. package/styles/qppds/components/_page-header.scss +61 -23
  343. package/styles/qppds/components/_pagination.scss +56 -53
  344. package/styles/qppds/components/_process-list.scss +106 -0
  345. package/styles/qppds/components/_radio-button.scss +43 -42
  346. package/styles/qppds/components/_search.scss +133 -23
  347. package/styles/qppds/components/_step-indicator.scss +61 -58
  348. package/styles/qppds/components/_table.scss +46 -44
  349. package/styles/qppds/components/_tabs.scss +48 -46
  350. package/styles/qppds/components/_text-input.scss +22 -22
  351. package/styles/qppds/components/index.scss +22 -19
  352. package/styles/qppds/components/sidebar/_details.scss +3 -0
  353. package/styles/qppds/components/sidebar/_sidebar-animation.scss +72 -106
  354. package/styles/qppds/components/sidebar/_sidebar.scss +0 -1
  355. package/styles/qppds/settings/_functions.scss +3 -1
  356. package/styles/qppds/settings/_index.scss +3 -3
  357. package/styles/qppds/settings/mixins/_borders.scss +2 -2
  358. package/styles/qppds/settings/mixins/_focus.scss +9 -7
  359. package/styles/qppds/settings/mixins/_icons.scss +10 -0
  360. package/styles/qppds/settings/mixins/_index.scss +8 -8
  361. package/styles/qppds/settings/mixins/_layout.scss +16 -16
  362. package/styles/qppds/settings/mixins/_table.scss +18 -17
  363. package/styles/qppds/settings/mixins/_type.scss +52 -27
  364. package/styles/qppds/settings/variables/_index.scss +4 -3
  365. package/styles/qppds/settings/variables/_layout.scss +12 -12
  366. package/styles/qppds/settings/variables/_type.scss +10 -10
  367. package/styles/qppds/settings/variables/_z-index.scss +8 -0
  368. package/styles/qppds/utilities/_background-color.scss +34 -34
  369. package/styles/qppds/utilities/_color.scss +13 -9
  370. package/styles/qppds/utilities/_display-visibility.scss +5 -4
  371. package/styles/qppds/utilities/_flexbox.scss +22 -22
  372. package/styles/qppds/utilities/_font-family.scss +3 -2
  373. package/styles/qppds/utilities/_font-size.scss +2 -2
  374. package/styles/qppds/utilities/_font-weight.scss +4 -2
  375. package/styles/qppds/utilities/_gap.scss +38 -0
  376. package/styles/qppds/utilities/_height.scss +53 -10
  377. package/styles/qppds/utilities/_list-style.scss +0 -1
  378. package/styles/qppds/utilities/_margin.scss +6 -6
  379. package/styles/qppds/utilities/_padding.scss +6 -6
  380. package/styles/qppds/utilities/_position.scss +3 -3
  381. package/styles/qppds/utilities/_text-align.scss +3 -3
  382. package/styles/qppds/utilities/_truncate.scss +4 -4
  383. package/styles/qppds/utilities/_vertical-align.scss +3 -3
  384. package/styles/qppds/utilities/_width.scss +19 -16
  385. package/styles/qppds/utilities/index.scss +17 -17
  386. package/svgo.config.js +14 -0
  387. package/test/components/FooterUI.test.js +18 -19
  388. package/test/components/HeaderUI.test.js +5 -15
  389. package/test/components/Infotip.test.js +41 -37
  390. package/test/session/session.test.js +67 -68
  391. package/test-setup.js +0 -4
  392. package/webpack.config.js +21 -13
  393. package/webpack.config.react.js +5 -14
  394. package/.storybook/.babelrc +0 -4
  395. package/.storybook/main.js +0 -103
  396. package/.storybook/preview-head.html +0 -9
  397. package/.storybook/preview.js +0 -5
  398. package/components/Accordion/Accordion.stories.js +0 -20
  399. package/components/Alert/Alert.stories.js +0 -61
  400. package/components/Breadcrumb/Breadcrumb.stories.js +0 -76
  401. package/components/Button/Button.stories.js +0 -121
  402. package/components/CalloutBox/CalloutBox.stories.js +0 -94
  403. package/components/CalloutBox/index.js +0 -109
  404. package/components/Card/Card.stories.js +0 -163
  405. package/components/Card/index.js +0 -137
  406. package/components/Dropdown/Dropdown.stories.js +0 -94
  407. package/components/DropdownButton/DropdownButton.stories.js +0 -137
  408. package/components/DropdownButton/index.js +0 -148
  409. package/components/Footer/Footer.stories.js +0 -13
  410. package/components/Header/Header.stories.js +0 -32
  411. package/components/Infotip/Infotip.stories.js +0 -50
  412. package/components/Link/Link.stories.js +0 -81
  413. package/components/Modal/Modal.stories.js +0 -159
  414. package/components/NotificationBanner/NotificationBanner.stories.js +0 -23
  415. package/components/Search/Search.stories.js +0 -21
  416. package/components/SessionDialog/sessionDialog.js +0 -26
  417. package/components/SessionDialogUI.jsx +0 -261
  418. package/components/SideNav/Chart/ScoreChart.jsx +0 -268
  419. package/components/SideNav/Chart/__tests__/ScoreChart.test.js +0 -22
  420. package/components/SideNav/Chart/__tests__/__snapshots__/ScoreChart.test.js.snap +0 -173
  421. package/components/SideNav/Chart/index.js +0 -3
  422. package/components/SideNav/Content/LevelTwoContent.jsx +0 -216
  423. package/components/SideNav/SideNav.stories.js +0 -379
  424. package/components/SideNav/UI/default-content.json +0 -117
  425. package/components/Spinner/index.js +0 -9
  426. package/components/Tabs/Tab.js +0 -26
  427. package/components/Tabs/Tabs.stories.js +0 -120
  428. package/components/Tabs/index.js +0 -100
  429. package/components/TextInput/TextInput.stories.js +0 -118
  430. package/components/Tooltip/Tooltip.jsx +0 -88
  431. package/components/Tooltip/Tooltip.stories.js +0 -80
  432. package/components/Tooltip/index.js +0 -3
  433. package/components/Tooltip/position.js +0 -68
  434. package/components/UnwrappedSpinner/index.js +0 -8
  435. package/test/components/SessionDialogUI.test.js +0 -339
  436. package/test/components/Tooltip.test.js +0 -147
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
  };
package/.prettierrc ADDED
@@ -0,0 +1 @@
1
+ {}
package/README.md CHANGED
@@ -2,11 +2,10 @@
2
2
 
3
3
  This directory contains react implementations of the components for QPP.
4
4
 
5
- A storybook with examples is published at [https://cmsgov.github.io/qpp-style](https://cmsgov.github.io/qpp-style)
6
-
7
5
  ## Github Branch and Pull Request process
6
+
8
7
  1. Create branch off main and create a Pull Request into main for the feature.
9
- >Example Branch Name: feature/QPPXX-XXXX_make_icon_better
8
+ > Example Branch Name: feature/QPPXX-XXXX_make_icon_better
10
9
  2. Once merged into main, create release branch from main.
11
10
  3. Name the new branch release/x.xx.x
12
11
  4. Run the version bump:
@@ -17,13 +16,15 @@ npm version --no-git-tag-version patch
17
16
  ```
18
17
 
19
18
  Example Commit Message:
19
+
20
20
  > x.xx.x release
21
21
 
22
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
23
  6. Enter the change in the description of the pull request i.e.:
24
- > Added new svg for Icon Name
24
+ > Added new svg for Icon Name
25
25
 
26
26
  ## Generate an NPM token with Publish permissions
27
+
27
28
  1. If you do not already have an access token, sign in to npmjs.com and navigate to access tokens.
28
29
  2. Click generate new token.
29
30
  3. Select publish under type.
@@ -34,9 +35,26 @@ export NPM_TOKEN={npm_token}
34
35
  ```
35
36
 
36
37
  ## Publish the react qpp-style npm package (used by both react and angular)
38
+
37
39
  ```bash
38
40
  cd qpp-style/react
39
41
  npm i
40
42
  npm publish
41
43
  ```
44
+
42
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,30 +1,30 @@
1
- import React, { useState, useRef, useEffect } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { Chevron } from '../../lib/Chevron.jsx';
1
+ import React, { useState, useRef, useEffect } from "react";
2
+ import PropTypes from "prop-types";
3
+ import { Chevron } from "../../lib/Chevron.jsx";
4
4
 
5
5
  const Accordion = (props) => {
6
6
  const content = useRef(null);
7
- const [setActive, setActiveState] = useState(props.isOpen ? 'active' : '');
8
- const ariaPressed = setActive ? 'true' : 'false';
7
+ const [setActive, setActiveState] = useState(props.isOpen ? "active" : "");
8
+ const ariaPressed = setActive ? "true" : "false";
9
9
  const getHeight = (node) => {
10
10
  if (node) {
11
11
  return `${node.scrollHeight}px`;
12
12
  }
13
- return 'auto';
13
+ return "auto";
14
14
  };
15
- const height = setActive ? getHeight(content.current) : '0px';
16
- const rotate = setActive ? 'accordion-icon rotate' : 'accordion-icon';
15
+ const height = setActive ? getHeight(content.current) : "0px";
16
+ const rotate = setActive ? "accordion-icon rotate" : "accordion-icon";
17
17
 
18
18
  function toggleAccordion() {
19
- setActiveState(setActive === '' ? 'active' : '');
19
+ setActiveState(setActive === "" ? "active" : "");
20
20
  }
21
21
 
22
22
  function openAccordion() {
23
- setActiveState('active');
23
+ setActiveState("active");
24
24
  }
25
25
 
26
26
  function closeAccordion() {
27
- setActiveState('');
27
+ setActiveState("");
28
28
  }
29
29
 
30
30
  useEffect(() => {
@@ -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
- title: '',
92
+ title: "",
90
93
  isOpen: false,
94
+ isSticky: false,
91
95
  };
92
96
 
93
97
  export default Accordion;
@@ -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 Alert = ({
5
5
  title,
@@ -9,7 +9,7 @@ const Alert = ({
9
9
  className,
10
10
  ...rest
11
11
  }) => {
12
- const HeadingComponent = title?.headingLevel || 'h2';
12
+ const HeadingComponent = title?.headingLevel || "h2";
13
13
  return (
14
14
  <div
15
15
  className={`qpp-c-alert qpp-c-alert--${variant} ${className}`}
@@ -19,7 +19,7 @@ const Alert = ({
19
19
  <div className="qpp-c-alert__body">
20
20
  {title && (
21
21
  <HeadingComponent className="h4 qpp-c-alert__heading">
22
- {typeof title === 'object' ? title.text : title}
22
+ {typeof title === "object" ? title.text : title}
23
23
  </HeadingComponent>
24
24
  )}
25
25
  {description && <p className="qpp-c-alert__text">{description}</p>}
@@ -40,14 +40,14 @@ Alert.propTypes = {
40
40
  headingLevel: PropTypes.string,
41
41
  }),
42
42
  ]),
43
- variant: PropTypes.oneOf(['info', 'warning', 'success', 'error']),
43
+ variant: PropTypes.oneOf(["info", "warning", "success", "error"]),
44
44
  };
45
45
  Alert.defaultProps = {
46
46
  children: null,
47
- className: '',
47
+ className: "",
48
48
  description: null,
49
49
  title: null,
50
- variant: 'info',
50
+ variant: "info",
51
51
  };
52
52
 
53
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
  >
@@ -51,7 +51,7 @@ const Breadcrumb = ({
51
51
  <li
52
52
  key={crumb}
53
53
  className={`${
54
- i === crumbs.length - 1 ? 'sr-only' : ''
54
+ i === crumbs.length - 1 ? "sr-only" : ""
55
55
  } qpp-c-breadcrumbs__list-itemqpp-c-breadcrumbs__list-item--current`}
56
56
  aria-current="page"
57
57
  >
@@ -74,7 +74,7 @@ Breadcrumb.propTypes = {
74
74
  };
75
75
 
76
76
  Breadcrumb.defaultProps = {
77
- breadcrumbClass: '',
77
+ breadcrumbClass: "",
78
78
  dark: false,
79
79
  RouterLink: null,
80
80
  routerExcludedLinks: [],
@@ -1,8 +1,8 @@
1
- import React from '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,
@@ -15,16 +15,16 @@ const Button = ({
15
15
  type,
16
16
  ...rest
17
17
  }) => {
18
- let btnClass = 'qpp-c-button';
18
+ let btnClass = "qpp-c-button";
19
19
 
20
20
  if (VARIANTS.includes(variant)) {
21
- btnClass = btnClass.concat(' ', `qpp-c-button--${variant}`);
21
+ btnClass = btnClass.concat(" ", `qpp-c-button--${variant}`);
22
22
  }
23
23
  if (SIZES.includes(size)) {
24
- btnClass = btnClass.concat(' ', `qpp-c-button--${size}`);
24
+ btnClass = btnClass.concat(" ", `qpp-c-button--${size}`);
25
25
  }
26
26
  if (className) {
27
- btnClass = btnClass.concat(' ', className);
27
+ btnClass = btnClass.concat(" ", className);
28
28
  }
29
29
 
30
30
  if (href) {
@@ -32,7 +32,7 @@ const Button = ({
32
32
  <a
33
33
  href={href}
34
34
  data-testid="ds-btn"
35
- className={btnClass || ''}
35
+ className={btnClass || ""}
36
36
  onClick={onClick}
37
37
  >
38
38
  {children}
@@ -42,7 +42,7 @@ const Button = ({
42
42
  return (
43
43
  <button
44
44
  data-testid="ds-btn"
45
- className={btnClass || ''}
45
+ className={btnClass || ""}
46
46
  onClick={onClick}
47
47
  disabled={loading}
48
48
  type={type}
@@ -66,16 +66,16 @@ Button.propTypes = {
66
66
 
67
67
  Button.defaultProps = {
68
68
  children: false,
69
- className: '',
70
- href: '',
69
+ className: "",
70
+ href: "",
71
71
  loading: false,
72
72
  onClick: () => null,
73
73
  size: null,
74
- type: 'button',
74
+ type: "button",
75
75
  variant: null,
76
76
  };
77
77
 
78
- export const TextButton = ({ className = '', ...props }) => (
78
+ export const TextButton = ({ className = "", ...props }) => (
79
79
  <Button className={`qpp-c-button--text ${className}`} {...props} />
80
80
  );
81
81
 
@@ -84,7 +84,7 @@ TextButton.propTypes = {
84
84
  };
85
85
 
86
86
  TextButton.defaultProps = {
87
- className: '',
87
+ className: "",
88
88
  };
89
89
 
90
90
  export default Button;
@@ -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;
@@ -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 Dropdown = ({
5
5
  className,
@@ -18,19 +18,19 @@ const Dropdown = ({
18
18
  ...rest
19
19
  }) => {
20
20
  const dropdownClass = [
21
- 'qpp-c-dropdown',
22
- size === 'big' && 'qpp-c-dropdown--big',
21
+ "qpp-c-dropdown",
22
+ size === "big" && "qpp-c-dropdown--big",
23
23
  className,
24
24
  ]
25
25
  .filter(Boolean)
26
- .join(' ');
26
+ .join(" ");
27
27
 
28
28
  return (
29
29
  <select
30
30
  id={id}
31
31
  aria-labelledby={ariaLabelledBy}
32
32
  aria-label={ariaLabel}
33
- className={dropdownClass || ''}
33
+ className={dropdownClass || ""}
34
34
  onChange={onChange}
35
35
  data-testid={dataTestId}
36
36
  name={name}
@@ -61,14 +61,14 @@ Dropdown.propTypes = {
61
61
  name: PropTypes.string,
62
62
  dataType: PropTypes.string,
63
63
  disabled: PropTypes.bool,
64
- size: PropTypes.oneOf(['big']),
64
+ size: PropTypes.oneOf(["big"]),
65
65
  options: PropTypes.array,
66
66
  parentElement: PropTypes.string,
67
67
  };
68
68
 
69
69
  Dropdown.defaultProps = {
70
70
  children: false,
71
- className: 'qpp-u-width--100',
71
+ className: "qpp-u-width--100",
72
72
  id: null,
73
73
  ariaLabelledBy: null,
74
74
  ariaLabel: null,
@@ -79,7 +79,7 @@ Dropdown.defaultProps = {
79
79
  disabled: false,
80
80
  size: null,
81
81
  options: [],
82
- parentElement: 'span',
82
+ parentElement: "span",
83
83
  };
84
84
 
85
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;
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import { MenuButton as AriaKitButton } from "ariakit/menu";
4
+
5
+ function MenuButton({ state, className, iconExist, children, ...props }) {
6
+ const dropDownIsOpen = state.open;
7
+
8
+ const CheveronUpIcon = "M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z";
9
+ const CheveronDownIcon = "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z";
10
+
11
+ return (
12
+ <AriaKitButton state={state} className={className} {...props}>
13
+ {children}{" "}
14
+ {iconExist && (
15
+ <svg
16
+ className="qpp-icon-mat qpp-icon-inline--lg"
17
+ focusable="false"
18
+ viewBox="0 0 24 24"
19
+ aria-hidden="true"
20
+ >
21
+ <path d={dropDownIsOpen ? CheveronUpIcon : CheveronDownIcon} />
22
+ </svg>
23
+ )}
24
+ </AriaKitButton>
25
+ );
26
+ }
27
+
28
+ MenuButton.propTypes = {
29
+ state: PropTypes.object.isRequired,
30
+ className: PropTypes.string,
31
+ iconExist: PropTypes.bool,
32
+ children: PropTypes.node,
33
+ };
34
+
35
+ MenuButton.defaultProps = {
36
+ className: "qpp-c-button",
37
+ iconExist: true,
38
+ children: null,
39
+ };
40
+
41
+ export default MenuButton;
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import { MenuItem as AriaKitMenuItem } from "ariakit/menu";
4
+
5
+ function MenuItem({ as, className, children, ...props }) {
6
+ return (
7
+ <AriaKitMenuItem as={as} className={className} {...props}>
8
+ {children}
9
+ </AriaKitMenuItem>
10
+ );
11
+ }
12
+
13
+ MenuItem.propTypes = {
14
+ as: PropTypes.string,
15
+ className: PropTypes.string,
16
+ children: PropTypes.node,
17
+ };
18
+
19
+ MenuItem.defaultProps = {
20
+ as: "li",
21
+ className: "qpp-c-dropdown-menu__item",
22
+ children: null,
23
+ };
24
+
25
+ export default MenuItem;
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import { MenuItem as AriaKitMenuItem } from "ariakit/menu";
4
+
5
+ function MenuItemLink({ as, className, children, ...props }) {
6
+ return (
7
+ <li role="none">
8
+ <AriaKitMenuItem as={as} className={className} {...props}>
9
+ {children}
10
+ </AriaKitMenuItem>
11
+ </li>
12
+ );
13
+ }
14
+
15
+ MenuItemLink.propTypes = {
16
+ as: PropTypes.string,
17
+ className: PropTypes.string,
18
+ children: PropTypes.node,
19
+ };
20
+
21
+ MenuItemLink.defaultProps = {
22
+ as: "a",
23
+ className: "qpp-c-dropdown-menu__item",
24
+ children: null,
25
+ };
26
+
27
+ export default MenuItemLink;
@@ -1,5 +1,5 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
1
+ import React, { Component } from "react";
2
+ import PropTypes from "prop-types";
3
3
 
4
4
  class Collapsible extends Component {
5
5
  constructor(props) {
@@ -32,7 +32,7 @@ class Collapsible extends Component {
32
32
  <span className="collapsible-hide-label">{this.props.hideLabel}</span>
33
33
  );
34
34
  } else {
35
- return '';
35
+ return "";
36
36
  }
37
37
  }
38
38