@innovaccer/design-system 2.13.2 → 2.13.4-1

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 (243) hide show
  1. package/core/components/atoms/checkbox/__stories__/Alignment.story.jsx +11 -13
  2. package/core/components/atoms/dropdown/Dropdown.tsx +18 -2
  3. package/core/components/atoms/dropdown/DropdownList.tsx +47 -57
  4. package/core/components/atoms/dropdown/__stories__/LabelInline.story.jsx +58 -0
  5. package/core/components/atoms/dropdown/__stories__/{LabelPositionInDropdown.story.jsx → LabelOnTop.story.jsx} +8 -9
  6. package/core/components/atoms/dropdown/option/DefaultOption.tsx +1 -1
  7. package/core/components/atoms/dropdown/utility.tsx +6 -0
  8. package/core/components/atoms/icon/__stories__/variants/Image.story.jsx +3 -3
  9. package/core/components/css-utilities/Miscellaneous/Miscellaneous.story.tsx +4 -0
  10. package/core/components/molecules/dropzone/FileSelectorUtils.tsx +3 -0
  11. package/core/components/molecules/sidesheet/__stories__/variants/twoSteps.story.jsx +6 -4
  12. package/core/components/organisms/calendar/__stories__/index.story.jsx +4 -6
  13. package/core/components/organisms/dateRangePicker/__stories__/variants/withSingleInput.story.jsx +3 -0
  14. package/core/components/organisms/horizontalNav/__stories__/leftAlign.story.jsx +35 -19
  15. package/core/components/organisms/pageHeader/__stories__/Responsiveness.story.jsx +2 -2
  16. package/core/components/organisms/pageHeader/__stories__/variants/withNavigation.story.jsx +2 -2
  17. package/core/components/organisms/pageHeader/__stories__/variants/withNavigationL1.story.jsx +2 -2
  18. package/core/components/organisms/pageHeader/__stories__/variants/withStepper.story.jsx +2 -2
  19. package/core/components/organisms/pageHeader/__stories__/variants/withStepperL1.story.jsx +2 -2
  20. package/core/components/organisms/pageHeader/__stories__/variants/withTabs.story.jsx +2 -2
  21. package/core/components/organisms/pageHeader/__stories__/variants/withTabsL1.story.jsx +2 -2
  22. package/core/components/organisms/pageHeader/__stories__/withFilter.story.jsx +2 -2
  23. package/core/components/organisms/pageHeader/__stories__/withFilterL1.story.jsx +2 -2
  24. package/core/components/organisms/pageHeader/__stories__/withNavigation.story.jsx +2 -2
  25. package/core/components/organisms/pageHeader/__stories__/withNavigationL1.story.jsx +2 -2
  26. package/core/components/organisms/pageHeader/__stories__/withStepperL1.story.jsx +4 -4
  27. package/core/components/organisms/table/__stories__/TableAsDescriptionList.story.jsx +4 -4
  28. package/core/components/organisms/timePicker/TimePicker.tsx +6 -113
  29. package/core/components/organisms/timePicker/TimePickerWithInput.tsx +124 -0
  30. package/core/components/organisms/timePicker/TimePickerWithSearch.tsx +198 -0
  31. package/core/components/organisms/timePicker/__stories__/TimeIntervals.story.jsx +52 -0
  32. package/core/components/organisms/timePicker/__stories__/disabledOption.story.jsx +52 -0
  33. package/core/components/organisms/timePicker/__stories__/fromTo.story.jsx +72 -0
  34. package/core/components/organisms/timePicker/__stories__/showDuration.story.jsx +52 -0
  35. package/core/components/organisms/timePicker/__stories__/withDatePicker.story.jsx +88 -0
  36. package/core/components/organisms/timePicker/__stories__/{index.story.jsx → withInput.story.jsx} +6 -3
  37. package/core/components/organisms/timePicker/__stories__/withSearch.story.jsx +89 -0
  38. package/core/components/organisms/timePicker/__tests__/TimePickerWithSearch.test.tsx +486 -0
  39. package/core/components/organisms/timePicker/__tests__/__snapshots__/TimePickerWithSearch.test.tsx.snap +169 -0
  40. package/core/components/organisms/timePicker/index.tsx +2 -0
  41. package/core/components/organisms/timePicker/utility/searchUtils.tsx +295 -0
  42. package/core/components/organisms/timePicker/utility/timePickerUtility.tsx +219 -0
  43. package/core/components/organisms/timePicker/utils.tsx +1 -1
  44. package/core/index.tsx +1 -0
  45. package/css/dist/index.css +4 -10
  46. package/css/dist/index.css.map +1 -1
  47. package/css/src/components/dropdown.css +2 -6
  48. package/css/src/components/metricInput.css +1 -0
  49. package/css/src/components/modal.css +1 -2
  50. package/dist/core/components/atoms/dropdown/Dropdown.d.ts +2 -0
  51. package/dist/core/components/atoms/dropdown/DropdownList.d.ts +1 -0
  52. package/dist/core/components/atoms/dropdown/utility.d.ts +1 -0
  53. package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +22 -22
  54. package/dist/core/components/organisms/timePicker/TimePicker.d.ts +5 -13
  55. package/dist/core/components/organisms/timePicker/TimePickerWithInput.d.ts +24 -0
  56. package/dist/core/components/organisms/timePicker/TimePickerWithSearch.d.ts +32 -0
  57. package/dist/core/components/organisms/timePicker/index.d.ts +2 -0
  58. package/dist/core/components/organisms/timePicker/utility/searchUtils.d.ts +7 -0
  59. package/dist/core/components/organisms/timePicker/utility/timePickerUtility.d.ts +19 -0
  60. package/dist/core/index.d.ts +1 -0
  61. package/dist/index.esm.js +709 -46
  62. package/dist/index.js +638 -68
  63. package/dist/index.js.map +1 -1
  64. package/dist/index.umd.js +1 -1
  65. package/dist/index.umd.js.br +0 -0
  66. package/dist/index.umd.js.gz +0 -0
  67. package/docs/.eslintrc.json +32 -1
  68. package/docs/.prettierrc +6 -0
  69. package/docs/README.md +14 -0
  70. package/docs/cypress/e2e/main.cy.js +35 -0
  71. package/docs/cypress/fixtures/example.json +5 -0
  72. package/docs/cypress/support/commands.ts +37 -0
  73. package/docs/cypress/support/e2e.ts +20 -0
  74. package/docs/cypress.config.js +9 -0
  75. package/docs/package.json +16 -2
  76. package/docs/src/components/Colors/Colors.js +13 -41
  77. package/docs/src/components/Container/ComponentsContainer.js +10 -30
  78. package/docs/src/components/Container/Container.js +10 -41
  79. package/docs/src/components/ErrorBoundary.js +9 -3
  80. package/docs/src/components/Footer/Footer.js +11 -10
  81. package/docs/src/components/GlobalSearch/index.js +47 -44
  82. package/docs/src/components/Header/Header.css +4 -0
  83. package/docs/src/components/Header/Header.js +25 -19
  84. package/docs/src/components/Layout.js +110 -172
  85. package/docs/src/components/LeftNav/LeftNav.js +12 -28
  86. package/docs/src/components/Logos/Logos.js +12 -26
  87. package/docs/src/components/MDXHeading.js +12 -18
  88. package/docs/src/components/Meta.js +9 -9
  89. package/docs/src/components/PropsTable/ArgJsDoc.tsx +2 -6
  90. package/docs/src/components/PropsTable/ArgRow.tsx +19 -47
  91. package/docs/src/components/PropsTable/ArgValue.tsx +50 -93
  92. package/docs/src/components/PropsTable/EmptyBlock.tsx +2 -5
  93. package/docs/src/components/PropsTable/SectionRow.tsx +7 -18
  94. package/docs/src/components/PropsTable/Table.tsx +43 -130
  95. package/docs/src/components/PropsTable/generateImports.tsx +1 -3
  96. package/docs/src/components/PropsTable/index.js +94 -140
  97. package/docs/src/components/PropsTable/prism.css +19 -20
  98. package/docs/src/components/Rules/DONTs.js +1 -6
  99. package/docs/src/components/Rules/DOs.js +1 -6
  100. package/docs/src/components/Rules/IconWrapper.js +6 -7
  101. package/docs/src/components/Rules/InlineMessage.js +1 -5
  102. package/docs/src/components/Rules/Rules.js +18 -28
  103. package/docs/src/components/TableOfContent/TableOfContent.js +49 -54
  104. package/docs/src/components/css/global.css +1 -1
  105. package/docs/src/components/css/prism.css +1 -1
  106. package/docs/src/components/css/style.css +7 -3
  107. package/docs/src/components/templates/Default.js +1 -1
  108. package/docs/src/components/templates/Homepage.js +4 -6
  109. package/docs/src/data/components/Overview.js +49 -56
  110. package/docs/src/data/components/images/Calendar.png +0 -0
  111. package/docs/src/data/components/images/MetaList.png +0 -0
  112. package/docs/src/data/components/images/PageHeader.png +0 -0
  113. package/docs/src/data/components/images/TimePicker.png +0 -0
  114. package/docs/src/data/components/images/mobile/Badge.png +0 -0
  115. package/docs/src/data/components/images/mobile/Dropdown.png +0 -0
  116. package/docs/src/data/components/images/mobile/Message.png +0 -0
  117. package/docs/src/data/components/images/mobile/MetaList.png +0 -0
  118. package/docs/src/data/components/images/mobile/Slider.png +0 -0
  119. package/docs/src/data/components/images/mobile/StatusHint.png +0 -0
  120. package/docs/src/data/components/images/mobile/Stepper.png +0 -0
  121. package/docs/src/data/components/index.js +168 -321
  122. package/docs/src/data/components/mobile.js +85 -125
  123. package/docs/src/data/components/overview.css +4 -2
  124. package/docs/src/data/components/patterns.js +25 -59
  125. package/docs/src/data/header-items.yaml +1 -0
  126. package/docs/src/data/nav/components.yaml +1 -7
  127. package/docs/src/pages/404.js +7 -17
  128. package/docs/src/pages/components/avatar/usage.mdx +1 -0
  129. package/docs/src/pages/components/button/usage.mdx +2 -2
  130. package/docs/src/pages/components/calendar/usage.mdx +3 -3
  131. package/docs/src/pages/components/chips/images/actionchip-state.png +0 -0
  132. package/docs/src/pages/components/chips/images/inputchips-state.png +0 -0
  133. package/docs/src/pages/components/chips/images/selectionchip-state.png +0 -0
  134. package/docs/src/pages/components/chips/usage.mdx +24 -2
  135. package/docs/src/pages/components/datePicker/images/datePicker-3.png +0 -0
  136. package/docs/src/pages/components/datePicker/images/datePicker-6.png +0 -0
  137. package/docs/src/pages/components/datePicker/usage.mdx +9 -2
  138. package/docs/src/pages/components/inlineEditableFields/images/inlineEditableField-2.png +0 -0
  139. package/docs/src/pages/components/inlineEditableFields/images/inlineEditableField-3.png +0 -0
  140. package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-1.png +0 -0
  141. package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-4.png +0 -0
  142. package/docs/src/pages/components/inlineEditableFields/usage.mdx +4 -4
  143. package/docs/src/pages/components/inputs/usage.mdx +7 -7
  144. package/docs/src/pages/components/tabs/images/tabs-1.png +0 -0
  145. package/docs/src/pages/content/button-guidelines/tabs/button-glossary.mdx +1776 -1
  146. package/docs/src/pages/content/button-guidelines/tabs/confusing-buttons.mdx +479 -8
  147. package/docs/src/pages/content/email-guidelines.mdx +3 -3
  148. package/docs/src/pages/content/house-rules/tabs/date,-time-&-numbers.mdx +24 -0
  149. package/docs/src/pages/content/house-rules/tabs/grammer.mdx +42 -2
  150. package/docs/src/pages/content/house-rules/tabs/punctuations.mdx +32 -0
  151. package/docs/src/pages/foundations/colors.mdx +338 -24
  152. package/docs/src/pages/foundations/layout/index.mdx +57 -82
  153. package/docs/src/pages/foundations/response-time.mdx +32 -77
  154. package/docs/src/pages/index.js +92 -121
  155. package/docs/src/pages/mobile/components/badges/images/badge-1.png +0 -0
  156. package/docs/src/pages/mobile/components/badges/images/badge-2.png +0 -0
  157. package/docs/src/pages/mobile/components/badges/images/badge-3.png +0 -0
  158. package/docs/src/pages/mobile/components/badges/images/badge-4.png +0 -0
  159. package/docs/src/pages/mobile/components/badges/images/badge-5.png +0 -0
  160. package/docs/src/pages/mobile/components/badges/usage.mdx +100 -0
  161. package/docs/src/pages/mobile/components/card/images/mcard-1.png +0 -0
  162. package/docs/src/pages/mobile/components/card/images/mcard-2.png +0 -0
  163. package/docs/src/pages/mobile/components/card/images/mcard-3.png +0 -0
  164. package/docs/src/pages/mobile/components/card/images/mcard-4.png +0 -0
  165. package/docs/src/pages/mobile/components/card/images/mcard-5.png +0 -0
  166. package/docs/src/pages/mobile/components/card/images/mcard-6.png +0 -0
  167. package/docs/src/pages/mobile/components/card/usage.mdx +54 -67
  168. package/docs/src/pages/mobile/components/checkbox/images/checkbox-1.png +0 -0
  169. package/docs/src/pages/mobile/components/checkbox/usage.mdx +26 -2
  170. package/docs/src/pages/mobile/components/dropdowns/images/dropdown-1.png +0 -0
  171. package/docs/src/pages/mobile/components/dropdowns/images/dropdown-10.png +0 -0
  172. package/docs/src/pages/mobile/components/dropdowns/images/dropdown-11.png +0 -0
  173. package/docs/src/pages/mobile/components/dropdowns/images/dropdown-2.png +0 -0
  174. package/docs/src/pages/mobile/components/dropdowns/images/dropdown-3.png +0 -0
  175. package/docs/src/pages/mobile/components/dropdowns/images/dropdown-4.png +0 -0
  176. package/docs/src/pages/mobile/components/dropdowns/images/dropdown-5.png +0 -0
  177. package/docs/src/pages/mobile/components/dropdowns/images/dropdown-6.png +0 -0
  178. package/docs/src/pages/mobile/components/dropdowns/images/dropdown-7.png +0 -0
  179. package/docs/src/pages/mobile/components/dropdowns/images/dropdown-8.png +0 -0
  180. package/docs/src/pages/mobile/components/dropdowns/images/dropdown-9.png +0 -0
  181. package/docs/src/pages/mobile/components/dropdowns/usage.mdx +88 -0
  182. package/docs/src/pages/mobile/components/message/images/messages-1.png +0 -0
  183. package/docs/src/pages/mobile/components/message/images/messages-10.png +0 -0
  184. package/docs/src/pages/mobile/components/message/images/messages-11.png +0 -0
  185. package/docs/src/pages/mobile/components/message/images/messages-12.png +0 -0
  186. package/docs/src/pages/mobile/components/message/images/messages-2.png +0 -0
  187. package/docs/src/pages/mobile/components/message/images/messages-3.png +0 -0
  188. package/docs/src/pages/mobile/components/message/images/messages-4.png +0 -0
  189. package/docs/src/pages/mobile/components/message/images/messages-5.png +0 -0
  190. package/docs/src/pages/mobile/components/message/images/messages-6.png +0 -0
  191. package/docs/src/pages/mobile/components/message/images/messages-7.png +0 -0
  192. package/docs/src/pages/mobile/components/message/images/messages-8.png +0 -0
  193. package/docs/src/pages/mobile/components/message/images/messages-9.png +0 -0
  194. package/docs/src/pages/mobile/components/message/usage.mdx +170 -0
  195. package/docs/src/pages/mobile/components/metaList/images/metaList-1.png +0 -0
  196. package/docs/src/pages/mobile/components/metaList/images/metaList-2.png +0 -0
  197. package/docs/src/pages/mobile/components/metaList/images/metaList-3.png +0 -0
  198. package/docs/src/pages/mobile/components/metaList/images/metaList-4.png +0 -0
  199. package/docs/src/pages/mobile/components/metaList/usage.mdx +71 -0
  200. package/docs/src/pages/mobile/components/slider/images/slider-1.png +0 -0
  201. package/docs/src/pages/mobile/components/slider/images/slider-2.png +0 -0
  202. package/docs/src/pages/mobile/components/slider/images/slider-3.png +0 -0
  203. package/docs/src/pages/mobile/components/slider/images/slider-4.png +0 -0
  204. package/docs/src/pages/mobile/components/slider/images/slider-5.png +0 -0
  205. package/docs/src/pages/mobile/components/slider/usage.mdx +83 -0
  206. package/docs/src/pages/mobile/components/statusHint/images/statushint-1.png +0 -0
  207. package/docs/src/pages/mobile/components/statusHint/images/statushint-2.png +0 -0
  208. package/docs/src/pages/mobile/components/statusHint/images/statushint-3.png +0 -0
  209. package/docs/src/pages/mobile/components/statusHint/images/statushint-4.png +0 -0
  210. package/docs/src/pages/mobile/components/statusHint/images/statushint-5.png +0 -0
  211. package/docs/src/pages/mobile/components/statusHint/images/statushint-6.png +0 -0
  212. package/docs/src/pages/mobile/components/statusHint/images/statushint-7.png +0 -0
  213. package/docs/src/pages/mobile/components/statusHint/usage.mdx +108 -0
  214. package/docs/src/pages/mobile/components/steppers/images/stepper-1.png +0 -0
  215. package/docs/src/pages/mobile/components/steppers/images/stepper-2.png +0 -0
  216. package/docs/src/pages/mobile/components/steppers/images/stepper-3.png +0 -0
  217. package/docs/src/pages/mobile/components/steppers/images/stepper-4.png +0 -0
  218. package/docs/src/pages/mobile/components/steppers/images/stepper-5.png +0 -0
  219. package/docs/src/pages/mobile/components/steppers/images/stepper-6.png +0 -0
  220. package/docs/src/pages/mobile/components/steppers/usage.mdx +111 -0
  221. package/docs/src/pages/mobile/foundations/layout/images/layout-2.png +0 -0
  222. package/docs/src/pages/mobile/foundations/layout/index.mdx +3 -1
  223. package/docs/src/pages/mobile/foundations/page-types/index.mdx +0 -214
  224. package/docs/src/pages/mobile/foundations/spacing/index.mdx +5 -0
  225. package/docs/src/pages/mobile/foundations/typography.mdx +1 -1
  226. package/docs/src/pages/patterns/uiStates/usage.mdx +92 -0
  227. package/docs/src/util/Frontmatter.js +4 -4
  228. package/docs/src/util/HeaderItems.js +2 -1
  229. package/docs/src/util/Helpers.js +3 -3
  230. package/docs/src/util/HomeIcons.js +91 -53
  231. package/docs/src/util/InPageNavItems.js +2 -6
  232. package/docs/src/util/Logos.js +2 -2
  233. package/docs/src/util/MdsChangelog.js +5 -10
  234. package/docs/src/util/MediumBlogs.js +13 -13
  235. package/docs/src/util/NavItems.js +14 -17
  236. package/docs/src/util/Search.js +2 -2
  237. package/docs/src/util/StorybookData.js +2 -4
  238. package/docs/src/util/constants.js +1 -5
  239. package/docs/src/util/context/NavContext.js +1 -4
  240. package/docs/src/util/hooks/useMetadata.js +1 -1
  241. package/package.json +1 -1
  242. package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-2.png +0 -0
  243. package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-3.png +0 -0
Binary file
Binary file
@@ -1 +1,32 @@
1
- {}
1
+ {
2
+ "root": true,
3
+ "parser": "@typescript-eslint/parser",
4
+ "plugins": [ "jsx-a11y", "prettier"],
5
+ "extends": [
6
+ "eslint:recommended",
7
+ "plugin:@typescript-eslint/recommended",
8
+ "plugin:react/recommended",
9
+ "plugin:jsx-a11y/recommended"
10
+ ],
11
+ "settings": { "react": { "version": "detect" } },
12
+ "globals": { "_": "readonly", "__": "readonly" },
13
+ "rules": {
14
+ "react/prop-types": "off",
15
+ "react/no-unescaped-entities": "off",
16
+ "no-undef": "off",
17
+ "jsx-a11y/alt-text": "off",
18
+ "no-inner-declarations": "off",
19
+ "react/no-children-prop": "off",
20
+ "jsx-a11y/iframe-has-title": "off",
21
+ "react/jsx-key": "off",
22
+ "react/display-name": "off",
23
+ "jsx-a11y/click-events-have-key-events": "off",
24
+ "jsx-a11y/no-noninteractive-element-interactions": "off",
25
+ "@typescript-eslint/explicit-module-boundary-types": "off",
26
+ "@typescript-eslint/ban-ts-comment": "off",
27
+ "@typescript-eslint/no-explicit-any": "off",
28
+ "@typescript-eslint/ban-types": "off",
29
+ "@typescript-eslint/no-unused-vars": "off"
30
+ }
31
+ }
32
+
@@ -0,0 +1,6 @@
1
+ {
2
+ "singleQuote": true,
3
+ "trailingComma": "es5",
4
+ "printWidth": 120,
5
+ "tabWidth": 2
6
+ }
package/docs/README.md CHANGED
@@ -29,3 +29,17 @@ Start development server
29
29
  ```bash
30
30
  npm run dev
31
31
  ```
32
+
33
+ ### Run Cypress Test
34
+
35
+ Run cypress in CLI
36
+
37
+ ```bash
38
+ npm run cypress
39
+ ```
40
+
41
+ Launch cypress app
42
+
43
+ ```bash
44
+ npm run cypress:open
45
+ ```
@@ -0,0 +1,35 @@
1
+ const hostURL = process.env.HOST_URL || "http://localhost:8000"
2
+
3
+ describe('Tests for search bar functionality', () => {
4
+ it('visit docs main page', () => {
5
+ cy.visit(hostURL)
6
+ })
7
+
8
+ it('focus on search bar',() => {
9
+ cy.get('input[name="input"]').type(`{enter}`)
10
+ cy.get('.Popover.Search-result').contains('Tip: Press ’cmd + k’ to quickly start searching.')
11
+ })
12
+
13
+ it('invalid search',() => {
14
+ let falseQuery = 'abc'
15
+ cy.get('input[name="input"]').type(`${falseQuery}{enter}`)
16
+ cy.get('.Popover.Search-result').contains(`No results found for '${falseQuery}'`)
17
+ })
18
+
19
+ it('valid search',() => {
20
+ let searchQuery = 'button'
21
+ cy.get('input[name="input"]').clear().type(`${searchQuery}{enter}`)
22
+ })
23
+ })
24
+
25
+ describe('Tests for nav bar and footer', () => {
26
+ it('visit docs main page', () => {
27
+ cy.visit(hostURL)
28
+ })
29
+
30
+ it('check if page exist for all links',() => {
31
+ cy.get('a').each(page => {
32
+ cy.request(page.prop('href'))
33
+ })
34
+ })
35
+ })
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "Using fixtures to represent data",
3
+ "email": "hello@cypress.io",
4
+ "body": "Fixtures are a great way to mock data for responses to routes"
5
+ }
@@ -0,0 +1,37 @@
1
+ /// <reference types="cypress" />
2
+ // ***********************************************
3
+ // This example commands.ts shows you how to
4
+ // create various custom commands and overwrite
5
+ // existing commands.
6
+ //
7
+ // For more comprehensive examples of custom
8
+ // commands please read more here:
9
+ // https://on.cypress.io/custom-commands
10
+ // ***********************************************
11
+ //
12
+ //
13
+ // -- This is a parent command --
14
+ // Cypress.Commands.add('login', (email, password) => { ... })
15
+ //
16
+ //
17
+ // -- This is a child command --
18
+ // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
19
+ //
20
+ //
21
+ // -- This is a dual command --
22
+ // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
23
+ //
24
+ //
25
+ // -- This will overwrite an existing command --
26
+ // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
27
+ //
28
+ // declare global {
29
+ // namespace Cypress {
30
+ // interface Chainable {
31
+ // login(email: string, password: string): Chainable<void>
32
+ // drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
33
+ // dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
34
+ // visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
35
+ // }
36
+ // }
37
+ // }
@@ -0,0 +1,20 @@
1
+ // ***********************************************************
2
+ // This example support/e2e.ts is processed and
3
+ // loaded automatically before your test files.
4
+ //
5
+ // This is a great place to put global configuration and
6
+ // behavior that modifies Cypress.
7
+ //
8
+ // You can change the location of this file or turn off
9
+ // automatically serving support files with the
10
+ // 'supportFile' configuration option.
11
+ //
12
+ // You can read more here:
13
+ // https://on.cypress.io/configuration
14
+ // ***********************************************************
15
+
16
+ // Import commands.js using ES2015 syntax:
17
+ import './commands'
18
+
19
+ // Alternatively you can use CommonJS syntax:
20
+ // require('./commands')
@@ -0,0 +1,9 @@
1
+ const { defineConfig } = require("cypress");
2
+
3
+ module.exports = defineConfig({
4
+ e2e: {
5
+ setupNodeEvents(on, config) {
6
+ // implement node event listeners here
7
+ },
8
+ },
9
+ });
package/docs/package.json CHANGED
@@ -11,7 +11,13 @@
11
11
  "deploy": "gatsby-plugin-s3 deploy --yes && aws cloudfront create-invalidation --distribution-id E2FYU8KR1XGDBZ --paths \"/*\"",
12
12
  "clean": "gatsby clean",
13
13
  "extract:dev": "export STORYBOOK_HOST='http://localhost:5000/iframe.html?id=components-avatargroup-all--all&args=&viewMode=story' && node ./tools/extract.js",
14
- "extract": "node ./tools/extract.js"
14
+ "extract": "node ./tools/extract.js",
15
+ "cypress:open": "cypress open",
16
+ "cypress": "cypress run",
17
+ "lint:check": "eslint ./src --ext .tsx,.ts,.js",
18
+ "lint": "npm run lint:check -- --fix",
19
+ "prettier:check": "prettier --config ./.prettierrc --check",
20
+ "prettier": "prettier --config ./.prettierrc --write 'src/**/*.css'"
15
21
  },
16
22
  "dependencies": {
17
23
  "@fontsource/nunito": "^4.5.0",
@@ -56,5 +62,13 @@
56
62
  },
57
63
  "keywords": [],
58
64
  "author": "",
59
- "license": "MIT"
65
+ "license": "MIT",
66
+ "devDependencies": {
67
+ "cypress": "^10.3.1",
68
+ "prettier": "^2.3.2",
69
+ "eslint": "^7.31.0",
70
+ "eslint-plugin-jsx-a11y": "^6.4.1",
71
+ "eslint-plugin-prettier": "^4.0.0"
72
+
73
+ }
60
74
  }
@@ -1,11 +1,5 @@
1
1
  import React from 'react';
2
- import {
3
- Card,
4
- CardBody,
5
- Tooltip,
6
- Paragraph,
7
- Column,
8
- } from '@innovaccer/design-system';
2
+ import { Card, CardBody, Tooltip, Paragraph, Column } from '@innovaccer/design-system';
9
3
  import './Colors.css';
10
4
 
11
5
  const Colors = (props) => {
@@ -14,59 +8,37 @@ const Colors = (props) => {
14
8
  const ref = React.createRef();
15
9
  return colorData.map((elt) => {
16
10
  return (
17
- <Column size='4'>
18
- <Card
19
- className='mr-7 mt-7 overflow-visible'
20
- shadow='none'
21
- ref={ref}
22
- >
23
- <div className='px-6'>
11
+ <Column size="4">
12
+ <Card className="mr-7 mt-7 overflow-visible" shadow="none" ref={ref}>
13
+ <div className="px-6">
24
14
  <div
25
15
  style={{
26
16
  backgroundColor: elt.backgroundColor,
27
17
  }}
28
- className='my-6 container w-auto'
18
+ className="my-6 container w-auto"
29
19
  ></div>
30
- <Tooltip
31
- tooltip='Copy to clipboard'
32
- appendToBody={false}
33
- boundaryElement={ref}
34
- >
20
+ <Tooltip tooltip="Copy to clipboard" appendToBody={false} boundaryElement={ref}>
35
21
  <Paragraph
36
22
  onClick={() => {
37
- navigator.clipboard.writeText(
38
- elt.hexCode
39
- );
23
+ navigator.clipboard.writeText(elt.hexCode);
40
24
  toggleToast(`Copied "${elt.hexCode}"`);
41
25
  }}
42
- className='cursor-pointer'
26
+ className="cursor-pointer"
43
27
  onMouseEnter={() => setIsHover(elt.name)}
44
28
  onMouseLeave={() => setIsHover()}
45
29
  >
46
30
  {elt.name}
47
31
  </Paragraph>
48
32
  </Tooltip>
49
- <div className='d-flex mb-7 mt-5'>
50
- <div className='mr-auto'>
51
- <Paragraph
52
- appearance='subtle'
53
- className='my-2'
54
- >
33
+ <div className="d-flex mb-7 mt-5">
34
+ <div className="mr-auto">
35
+ <Paragraph appearance="subtle" className="my-2">
55
36
  Hex
56
37
  </Paragraph>
57
- <Paragraph
58
- className={`${
59
- isHover === elt.name ? 'underline' : ''
60
- }`}
61
- >
62
- {elt.hexCode}
63
- </Paragraph>
38
+ <Paragraph className={`${isHover === elt.name ? 'underline' : ''}`}>{elt.hexCode}</Paragraph>
64
39
  </div>
65
40
  <div>
66
- <Paragraph
67
- appearance='subtle'
68
- className='my-2'
69
- >
41
+ <Paragraph appearance="subtle" className="my-2">
70
42
  RGB
71
43
  </Paragraph>
72
44
  <Paragraph>{elt.colorCode}</Paragraph>
@@ -1,20 +1,8 @@
1
1
  import React from 'react';
2
- import {
3
- Heading,
4
- Tabs,
5
- Tab,
6
- Paragraph
7
- } from '@innovaccer/design-system';
2
+ import { Heading, Tabs, Tab, Paragraph } from '@innovaccer/design-system';
8
3
  import { navigate } from 'gatsby';
9
4
 
10
- const ComponentsContainer = ({
11
- children,
12
- pageTitle,
13
- relativePagePath,
14
- tabs,
15
- pageDescription,
16
- frontmatter
17
- }) => {
5
+ const ComponentsContainer = ({ children, pageTitle, relativePagePath, tabs, pageDescription, frontmatter }) => {
18
6
  const page = relativePagePath.split('/');
19
7
  const pageName = page[page.length - 1].split('.')[0];
20
8
  const isSiblingTab = relativePagePath.split('.')[0] === '/' + pageTitle.replace(/\s/g, '');
@@ -30,37 +18,29 @@ const ComponentsContainer = ({
30
18
  };
31
19
 
32
20
  const activeTab =
33
- tabsList && tabsList.length
34
- ? tabsList.findIndex(
35
- (tab, index) =>
36
- getTabSlug(index) === pageName.toLowerCase()
37
- )
38
- : '';
21
+ tabsList && tabsList.length ? tabsList.findIndex((tab, index) => getTabSlug(index) === pageName.toLowerCase()) : '';
39
22
 
40
- const [activeIndex, setActiveIndex] = React.useState(
41
- activeTab || 0
42
- );
23
+ const [activeIndex, setActiveIndex] = React.useState(activeTab || 0);
43
24
 
44
25
  const onTabChangeHandler = (tabIndex) => {
45
26
  const nextTabSlug = getTabSlug(tabIndex);
46
27
  const pagePath = relativePagePath.split('/');
47
28
  const pages = pagePath.slice(0, pagePath.length - 1);
48
29
  const path = `${pages.join('/')}/${nextTabSlug}/`;
49
- navigate(path, { state: { animation: false }, });
30
+ navigate(path, { state: { animation: false } });
50
31
  setActiveIndex(tabIndex);
51
32
  };
52
33
 
53
34
  return (
54
35
  <>
55
- <Heading size='xl' className='my-5'>{isSiblingTab ? frontmatter?.title : pageTitle}</Heading>
36
+ <Heading size="xl" className="my-5">
37
+ {isSiblingTab ? frontmatter?.title : pageTitle}
38
+ </Heading>
56
39
  <Paragraph>{isSiblingTab ? frontmatter?.description : pageDescription}</Paragraph>
57
40
 
58
41
  {tabsList && tabsList.length && (
59
- <div className='mb-7 mt-4'>
60
- <Tabs
61
- activeIndex={activeIndex}
62
- onTabChange={onTabChangeHandler}
63
- >
42
+ <div className="mb-7 mt-4">
43
+ <Tabs activeIndex={activeIndex} onTabChange={onTabChangeHandler}>
64
44
  {tabsList.map((tab, index) => (
65
45
  <Tab label={tab} key={index}></Tab>
66
46
  ))}
@@ -1,23 +1,9 @@
1
1
  import React from 'react';
2
- import {
3
- Paragraph,
4
- Heading,
5
- Tabs,
6
- Tab,
7
- Button,
8
- } from '@innovaccer/design-system';
2
+ import { Paragraph, Heading, Tabs, Tab, Button } from '@innovaccer/design-system';
9
3
  import { navigate } from 'gatsby';
10
4
  import { useLogoItems } from '../../util/Logos';
11
5
 
12
- const Container = ({
13
- children,
14
- pageTitle,
15
- tabs,
16
- relativePagePath,
17
- pageDescription,
18
- logos,
19
- frontmatter
20
- }) => {
6
+ const Container = ({ children, pageTitle, tabs, relativePagePath, pageDescription, logos, frontmatter }) => {
21
7
  const nodes = useLogoItems();
22
8
  const page = relativePagePath.split('/');
23
9
  const pageName = page[page.length - 1].split('.')[0];
@@ -36,31 +22,22 @@ const Container = ({
36
22
  };
37
23
 
38
24
  const activeTab =
39
- tabsList && tabsList.length
40
- ? tabsList.findIndex(
41
- (tab, index) =>
42
- getTabSlug(index) === pageName.toLowerCase()
43
- )
44
- : '';
25
+ tabsList && tabsList.length ? tabsList.findIndex((tab, index) => getTabSlug(index) === pageName.toLowerCase()) : '';
45
26
 
46
- const [activeIndex, setActiveIndex] = React.useState(
47
- activeTab || 0
48
- );
27
+ const [activeIndex, setActiveIndex] = React.useState(activeTab || 0);
49
28
 
50
29
  const onTabChangeHandler = (tabIndex) => {
51
30
  const nextTabSlug = getTabSlug(tabIndex);
52
31
  const pagePath = relativePagePath.split('/');
53
32
  const pages = pagePath.slice(0, pagePath.length - 1);
54
33
  const path = `${pages.join('/')}/${nextTabSlug}/`;
55
- navigate(path, { state: { animation: false }, });
34
+ navigate(path, { state: { animation: false } });
56
35
  setActiveIndex(tabIndex);
57
36
  };
58
37
 
59
38
  const downloadAllLogos = () => {
60
39
  const images = logoList.map((logo) => {
61
- const filteredGatsbyImage = nodes.filter((img) =>
62
- img.fluid.src.includes(logo)
63
- );
40
+ const filteredGatsbyImage = nodes.filter((img) => img.fluid.src.includes(logo));
64
41
  if (filteredGatsbyImage.length) {
65
42
  return {
66
43
  name: logo,
@@ -80,26 +57,18 @@ const Container = ({
80
57
 
81
58
  return (
82
59
  <>
83
- <Heading size='xl' className='my-5'>
60
+ <Heading size="xl" className="my-5">
84
61
  {isSiblingTab ? frontmatter?.title : pageTitle}
85
62
  </Heading>
86
63
  {logoList && logoList.length && (
87
- <Button
88
- className='download-logos'
89
- icon='download'
90
- onClick={downloadAllLogos}
91
- >
64
+ <Button className="download-logos" icon="download" onClick={downloadAllLogos}>
92
65
  Download all
93
66
  </Button>
94
67
  )}
95
- <Paragraph className='mb-6'>{isSiblingTab ? frontmatter?.description : pageDescription}</Paragraph>
68
+ <Paragraph className="mb-6">{isSiblingTab ? frontmatter?.description : pageDescription}</Paragraph>
96
69
  {tabsList && tabsList.length && (
97
70
  <>
98
- <Tabs
99
- activeIndex={activeIndex}
100
- onTabChange={onTabChangeHandler}
101
- className='mb-6 '
102
- >
71
+ <Tabs activeIndex={activeIndex} onTabChange={onTabChangeHandler} className="mb-6 ">
103
72
  {tabsList.map((tab, index) => (
104
73
  <Tab label={tab} key={index}></Tab>
105
74
  ))}
@@ -20,11 +20,17 @@ class ErrorBoundary extends React.Component {
20
20
  render() {
21
21
  if (this.state.hasError) {
22
22
  // You can render any custom fallback UI
23
- return <Message className="my-7" appearance="alert" title="Something is broken." description="Hold tight, we are working to get it up for you to interact with." />
24
-
23
+ return (
24
+ <Message
25
+ className="my-7"
26
+ appearance="alert"
27
+ title="Something is broken."
28
+ description="Hold tight, we are working to get it up for you to interact with."
29
+ />
30
+ );
25
31
  }
26
32
 
27
- return this.props.children;
33
+ return this.props.children;
28
34
  }
29
35
  }
30
36
 
@@ -7,16 +7,21 @@ const Footer = ({ relativePagePath }) => {
7
7
  const items = useFooterItems();
8
8
  return (
9
9
  <div
10
- className={`d-flex w-100 px-12 py-7 bg-secondary-lightest position-sticky align-items-center ${relativePagePath === '/home' ? 'justify-content-center' : ''}`}>
10
+ className={`d-flex w-100 px-11 py-7 bg-secondary-lightest position-sticky align-items-center ${
11
+ relativePagePath === '/home' ? 'justify-content-center' : ''
12
+ }`}
13
+ >
11
14
  <div>
12
15
  {items.map(({ link, label }, index) => {
13
16
  let isExternal;
14
17
  if (link) {
15
- isExternal =
16
- link.startsWith('http://') ||
17
- link.startsWith('https://');
18
+ isExternal = link.startsWith('http://') || link.startsWith('https://');
18
19
  }
19
- return (
20
+ return !link ? (
21
+ <Text appearance={'subtle'} className={'mr-8'}>
22
+ {label}
23
+ </Text>
24
+ ) : (
20
25
  <Link
21
26
  key={index}
22
27
  href={link}
@@ -24,11 +29,7 @@ const Footer = ({ relativePagePath }) => {
24
29
  target={isExternal && '_blank'}
25
30
  disabled={index === 0}
26
31
  >
27
- <Text
28
- appearance={index === 0 ? 'subtle' : 'default'}
29
- >
30
- {label}
31
- </Text>
32
+ <Text appearance={index === 0 ? 'subtle' : 'default'}>{label}</Text>
32
33
  </Link>
33
34
  );
34
35
  })}