qpp-style 1.3.0-rm.1 → 1.3.1-bv.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 (252) 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 +22 -4
  6. package/components/Accordion/index.jsx +17 -13
  7. package/components/Button/index.js +15 -15
  8. package/components/Dropdown/index.js +9 -9
  9. package/components/Footer/FooterUI.jsx +184 -238
  10. package/components/Footer/SocialLinks.jsx +1 -1
  11. package/components/Footer/Subscribe.jsx +1 -1
  12. package/components/Footer/footer.js +6 -16
  13. package/components/GovBanner/index.js +65 -57
  14. package/components/Header/HeaderAccountMenu.jsx +18 -93
  15. package/components/Header/HeaderCancel.jsx +2 -2
  16. package/components/Header/HeaderContainer.jsx +55 -28
  17. package/components/Header/HeaderLogo.jsx +25 -5
  18. package/components/Header/HeaderMenuButton.js +7 -7
  19. package/components/Header/HeaderMenuItem.jsx +48 -41
  20. package/components/Header/HeaderMenuLink.js +13 -7
  21. package/components/Header/HeaderMenuSignOutButton.js +9 -9
  22. package/components/Header/HeaderMobileButton.js +4 -4
  23. package/components/Header/HeaderUI.jsx +80 -76
  24. package/components/Header/HelpIcon.jsx +1 -1
  25. package/components/Header/ImpersonatorBanner.jsx +35 -30
  26. package/components/Header/NavigationButtonIcon.jsx +1 -1
  27. package/components/Header/header.js +4 -4
  28. package/components/Header/hooks.js +24 -10
  29. package/components/Header/utag-helpers.js +1 -1
  30. package/components/HeaderSearchBar/index.jsx +80 -0
  31. package/components/Infotip/Infotip.jsx +15 -19
  32. package/components/Infotip/InfotipContent.jsx +48 -0
  33. package/components/Infotip/InfotipIcon.jsx +5 -5
  34. package/components/Infotip/index.js +1 -1
  35. package/components/Modal/LegacyModal.jsx +8 -8
  36. package/components/Modal/Modal.jsx +9 -9
  37. package/components/Modal/index.jsx +5 -5
  38. package/components/NotificationBanner/CollapsedView.js +39 -0
  39. package/components/NotificationBanner/ExpandedView.js +45 -0
  40. package/components/NotificationBanner/index.js +133 -177
  41. package/components/SanitizedContent/index.jsx +189 -166
  42. package/components/Session/Session.jsx +89 -0
  43. package/components/Session/SessionDialogWrapped.jsx +12 -0
  44. package/components/Session/index.jsx +3 -0
  45. package/components/SideNav/AnimationGroup/AnimationGroup.jsx +7 -7
  46. package/components/SideNav/Content/LevelOneContent.jsx +34 -183
  47. package/components/SideNav/Content/SelectRole/index.js +70 -0
  48. package/components/SideNav/Content/SelectRole/utils.js +142 -0
  49. package/components/SideNav/Content/index.js +2 -3
  50. package/components/SideNav/Details/IndividualDetails.jsx +2 -2
  51. package/components/SideNav/Details/PracticeDetails.jsx +10 -4
  52. package/components/SideNav/Details/index.js +2 -2
  53. package/components/SideNav/Links/CmsSwitchLink.jsx +4 -4
  54. package/components/SideNav/Links/NavItemInline.jsx +7 -7
  55. package/components/SideNav/Links/NavLinkContainer.jsx +2 -2
  56. package/components/SideNav/Links/NavLinkDrawer.jsx +117 -77
  57. package/components/SideNav/Links/NavLinkInline.jsx +23 -19
  58. package/components/SideNav/Links/NavLinkToggle.jsx +7 -7
  59. package/components/SideNav/Links/index.js +5 -5
  60. package/components/SideNav/UI/SideNavUI.jsx +115 -126
  61. package/components/SideNav/UI/default-markup.js +4 -0
  62. package/components/SideNav/UI/index.js +1 -1
  63. package/components/SideNav/UI/utils.js +0 -0
  64. package/components/SideNav/helpers.js +32 -35
  65. package/components/SideNav/index.js +11 -35
  66. package/components/hooks/useGetConfig.js +9 -9
  67. package/components/index.js +9 -45
  68. package/dist/browser.js +1 -1
  69. package/dist/browser.js.LICENSE.txt +1 -24
  70. package/dist/browser.js.map +1 -1
  71. package/dist/index.js +1 -1
  72. package/dist/index.js.LICENSE.txt +1 -24
  73. package/dist/index.js.map +1 -1
  74. package/dist/react/index.js +1 -1
  75. package/dist/react/index.js.LICENSE.txt +8 -34
  76. package/dist/react/index.js.map +1 -1
  77. package/images/icons/svg/arrow-down.svg +3 -1
  78. package/images/icons/svg/arrow-up.svg +3 -0
  79. package/images/icons/svg/block.svg +5 -0
  80. package/images/icons/svg/check-circle.svg +5 -0
  81. package/images/icons/svg/checkmark.svg +7 -0
  82. package/images/icons/svg/chevron-down.svg +11 -0
  83. package/images/icons/svg/chevron-left.svg +12 -0
  84. package/images/icons/svg/chevron-right.svg +12 -0
  85. package/images/icons/svg/chevron-up.svg +12 -0
  86. package/images/icons/svg/clipboard.svg +1 -0
  87. package/images/icons/svg/divide.svg +13 -0
  88. package/images/icons/svg/doctors-and-clinicians-preview.svg +10 -0
  89. package/images/icons/svg/equals.svg +13 -0
  90. package/images/icons/svg/exclamation.svg +10 -0
  91. package/images/icons/svg/file-upload.svg +1 -1
  92. package/images/icons/svg/info.svg +17 -0
  93. package/images/icons/svg/manage-user-access.svg +8 -0
  94. package/images/icons/svg/multiply.svg +12 -0
  95. package/images/icons/svg/performance-feedback.svg +1 -0
  96. package/images/icons/svg/plus.svg +12 -0
  97. package/images/icons/svg/preview.svg +15 -0
  98. package/images/icons/svg/registration.svg +8 -0
  99. package/images/icons/svg/reporting.svg +15 -0
  100. package/images/icons/svg/save-disk.svg +5 -0
  101. package/images/icons/svg/search.svg +1 -1
  102. package/images/icons/svg/subtract.svg +15 -0
  103. package/images/icons/svg/targeted-review.svg +15 -0
  104. package/index.js +5 -10
  105. package/jest.config.js +132 -132
  106. package/lib/SvgComponents.jsx +167 -1
  107. package/package.json +47 -74
  108. package/session/isAuthV2.js +22 -0
  109. package/session/logout.js +29 -24
  110. package/session/refresh.js +36 -33
  111. package/session/ttl.js +21 -33
  112. package/styles/_main.scss +2 -2
  113. package/styles/components/_accordion.scss +7 -0
  114. package/styles/components/_notification-banner.scss +151 -150
  115. package/styles/qppds/base/_backgrounds.scss +3 -3
  116. package/styles/qppds/base/_fonts.scss +9 -9
  117. package/styles/qppds/base/_icon.scss +14 -6
  118. package/styles/qppds/base/_layout.scss +2 -2
  119. package/styles/qppds/base/_typography.scss +33 -21
  120. package/styles/qppds/base/index.scss +5 -5
  121. package/styles/qppds/components/_alert.scss +40 -34
  122. package/styles/qppds/components/_breadcrumbs.scss +43 -20
  123. package/styles/qppds/components/_button.scss +94 -90
  124. package/styles/qppds/components/_card.scss +22 -21
  125. package/styles/qppds/components/_checkbox.scss +201 -0
  126. package/styles/qppds/components/_circular-loader.scss +15 -15
  127. package/styles/qppds/components/_details.scss +91 -0
  128. package/styles/qppds/components/_dropdown-menu.scss +42 -35
  129. package/styles/qppds/components/_dropdown.scss +19 -18
  130. package/styles/qppds/components/_footer.scss +13 -11
  131. package/styles/qppds/components/_gov-banner.scss +71 -73
  132. package/styles/qppds/components/_header.scss +127 -84
  133. package/styles/qppds/components/_link.scss +29 -27
  134. package/styles/qppds/components/_modal.scss +58 -23
  135. package/styles/qppds/components/_page-header.scss +61 -23
  136. package/styles/qppds/components/_pagination.scss +56 -53
  137. package/styles/qppds/components/_process-list.scss +106 -0
  138. package/styles/qppds/components/_radio-button.scss +185 -0
  139. package/styles/qppds/components/_search.scss +133 -23
  140. package/styles/qppds/components/_sidebar.scss +1 -0
  141. package/styles/qppds/components/_step-indicator.scss +61 -58
  142. package/styles/qppds/components/_table.scss +46 -44
  143. package/styles/qppds/components/_tabs.scss +48 -46
  144. package/styles/qppds/components/_text-input.scss +22 -22
  145. package/styles/qppds/components/index.scss +22 -17
  146. package/styles/qppds/components/sidebar/_details.scss +3 -0
  147. package/styles/qppds/components/sidebar/_links.scss +14 -1
  148. package/styles/qppds/components/sidebar/_select-role-dropdown.scss +21 -0
  149. package/styles/qppds/components/sidebar/_sidebar-animation.scss +72 -106
  150. package/styles/qppds/components/sidebar/_sidebar.scss +0 -1
  151. package/styles/qppds/settings/_functions.scss +3 -1
  152. package/styles/qppds/settings/_index.scss +3 -3
  153. package/styles/qppds/settings/mixins/_borders.scss +2 -2
  154. package/styles/qppds/settings/mixins/_focus.scss +9 -7
  155. package/styles/qppds/settings/mixins/_icons.scss +10 -0
  156. package/styles/qppds/settings/mixins/_index.scss +8 -8
  157. package/styles/qppds/settings/mixins/_layout.scss +16 -16
  158. package/styles/qppds/settings/mixins/_table.scss +18 -17
  159. package/styles/qppds/settings/mixins/_type.scss +52 -27
  160. package/styles/qppds/settings/variables/_color.module.scss +46 -0
  161. package/styles/qppds/settings/variables/_color.scss +0 -45
  162. package/styles/qppds/settings/variables/_index.scss +4 -3
  163. package/styles/qppds/settings/variables/_layout.module.scss +23 -0
  164. package/styles/qppds/settings/variables/_layout.scss +15 -36
  165. package/styles/qppds/settings/variables/_type.module.scss +38 -0
  166. package/styles/qppds/settings/variables/_type.scss +10 -47
  167. package/styles/qppds/settings/variables/_z-index.module.scss +8 -0
  168. package/styles/qppds/settings/variables/_z-index.scss +3 -0
  169. package/styles/qppds/utilities/_background-color.scss +34 -34
  170. package/styles/qppds/utilities/_color.scss +13 -9
  171. package/styles/qppds/utilities/_display-visibility.scss +5 -4
  172. package/styles/qppds/utilities/_flexbox.scss +22 -22
  173. package/styles/qppds/utilities/_font-family.scss +3 -2
  174. package/styles/qppds/utilities/_font-size.scss +2 -2
  175. package/styles/qppds/utilities/_font-weight.scss +4 -2
  176. package/styles/qppds/utilities/_gap.scss +38 -0
  177. package/styles/qppds/utilities/_height.scss +53 -10
  178. package/styles/qppds/utilities/_list-style.scss +17 -0
  179. package/styles/qppds/utilities/_margin.scss +6 -6
  180. package/styles/qppds/utilities/_padding.scss +6 -6
  181. package/styles/qppds/utilities/_position.scss +3 -3
  182. package/styles/qppds/utilities/_text-align.scss +3 -3
  183. package/styles/qppds/utilities/_vertical-align.scss +3 -3
  184. package/styles/qppds/utilities/_width.scss +19 -16
  185. package/styles/qppds/utilities/index.scss +17 -16
  186. package/svgo.config.js +14 -0
  187. package/test/components/FooterUI.test.js +18 -49
  188. package/test/components/HeaderUI.test.js +5 -15
  189. package/test/components/Infotip.test.js +41 -37
  190. package/test/session/session.test.js +67 -68
  191. package/test-setup.js +0 -4
  192. package/webpack.config.js +29 -39
  193. package/webpack.config.react.js +7 -18
  194. package/.storybook/.babelrc +0 -4
  195. package/.storybook/main.js +0 -89
  196. package/.storybook/preview-head.html +0 -9
  197. package/.storybook/preview.js +0 -5
  198. package/components/Accordion/Accordion.stories.js +0 -20
  199. package/components/Alert/Alert.stories.js +0 -61
  200. package/components/Alert/index.js +0 -46
  201. package/components/Breadcrumb/Breadcrumb.md +0 -28
  202. package/components/Breadcrumb/Breadcrumb.stories.js +0 -76
  203. package/components/Breadcrumb/index.js +0 -83
  204. package/components/Button/Button.stories.js +0 -121
  205. package/components/CalloutBox/CalloutBox.stories.js +0 -94
  206. package/components/CalloutBox/index.js +0 -109
  207. package/components/Card/Card.stories.js +0 -163
  208. package/components/Card/index.js +0 -137
  209. package/components/Dropdown/Dropdown.stories.js +0 -94
  210. package/components/DropdownButton/DropdownButton.stories.js +0 -137
  211. package/components/DropdownButton/index.js +0 -148
  212. package/components/Error/Collapsible.jsx +0 -88
  213. package/components/Error/ErrorUI.jsx +0 -31
  214. package/components/Error/error.js +0 -26
  215. package/components/FlashNotification/FlashNotificationUI.jsx +0 -91
  216. package/components/FlashNotification/index.js +0 -30
  217. package/components/Footer/Footer.stories.js +0 -20
  218. package/components/Footer/LegacyFooterUI.jsx +0 -194
  219. package/components/Header/Header.stories.js +0 -32
  220. package/components/Infotip/Infotip.stories.js +0 -50
  221. package/components/Link/Link.stories.js +0 -81
  222. package/components/Link/index.js +0 -61
  223. package/components/Modal/Modal.stories.js +0 -159
  224. package/components/NotificationBanner/NotificationBanner.stories.js +0 -23
  225. package/components/Search/Search.stories.js +0 -21
  226. package/components/Search/index.js +0 -98
  227. package/components/SessionDialog/sessionDialog.js +0 -26
  228. package/components/SessionDialogUI.jsx +0 -261
  229. package/components/SideNav/Chart/ScoreChart.jsx +0 -268
  230. package/components/SideNav/Chart/__tests__/ScoreChart.test.js +0 -22
  231. package/components/SideNav/Chart/__tests__/__snapshots__/ScoreChart.test.js.snap +0 -173
  232. package/components/SideNav/Chart/index.js +0 -3
  233. package/components/SideNav/Content/LevelTwoContent.jsx +0 -216
  234. package/components/SideNav/SideNav.stories.js +0 -379
  235. package/components/SideNav/UI/default-content.json +0 -99
  236. package/components/Spinner/index.js +0 -9
  237. package/components/Tabs/Tab.js +0 -26
  238. package/components/Tabs/TabPanel.js +0 -34
  239. package/components/Tabs/Tabs.stories.js +0 -120
  240. package/components/Tabs/index.js +0 -95
  241. package/components/TextInput/TextInput.stories.js +0 -118
  242. package/components/TextInput/index.js +0 -137
  243. package/components/Tooltip/Tooltip.jsx +0 -88
  244. package/components/Tooltip/Tooltip.stories.js +0 -80
  245. package/components/Tooltip/index.js +0 -3
  246. package/components/Tooltip/position.js +0 -68
  247. package/components/UnwrappedSpinner/index.js +0 -8
  248. package/styles/qppds/utilities/_truncate.scss +0 -8
  249. package/test/components/Accordion.test.js +0 -12
  250. package/test/components/ErrorUI.test.js +0 -33
  251. package/test/components/SessionDialogUI.test.js +0 -339
  252. 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
  };
@@ -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 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,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;
@@ -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;