@pareto-engineering/design-system 2.0.0-alpha.5 → 2.0.0-alpha.50

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 (309) hide show
  1. package/.env.scripts.example +4 -0
  2. package/.eslintrc.js +25 -1
  3. package/babel.config.js +1 -0
  4. package/dist/cjs/a/BackgroundGradient/BackgroundGradient.js +77 -0
  5. package/dist/cjs/a/BackgroundGradient/index.js +15 -0
  6. package/dist/cjs/a/BackgroundGradient/styles.scss +16 -0
  7. package/dist/cjs/a/ContentTree/ContentTree.js +83 -0
  8. package/dist/cjs/a/ContentTree/common/Tree/Tree.js +116 -0
  9. package/dist/cjs/a/ContentTree/common/Tree/index.js +15 -0
  10. package/dist/cjs/a/ContentTree/common/index.js +31 -0
  11. package/dist/cjs/a/ContentTree/common/useContentTree.js +82 -0
  12. package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +65 -0
  13. package/dist/cjs/a/ContentTree/index.js +15 -0
  14. package/dist/cjs/a/ContentTree/styles.scss +33 -0
  15. package/dist/cjs/a/Conversation/Conversation.js +14 -8
  16. package/dist/cjs/a/Conversation/common/Message/Message.js +32 -6
  17. package/dist/cjs/a/Conversation/styles.scss +132 -33
  18. package/dist/cjs/a/OvalIllustration/OvalIllustration.js +133 -0
  19. package/dist/cjs/a/OvalIllustration/index.js +15 -0
  20. package/dist/cjs/a/OvalIllustration/styles.scss +102 -0
  21. package/dist/cjs/a/Popover/Popover.js +134 -0
  22. package/dist/cjs/a/Popover/common/Divider/Divider.js +67 -0
  23. package/dist/cjs/a/Popover/common/Divider/index.js +15 -0
  24. package/dist/cjs/a/Popover/common/Item/Item.js +67 -0
  25. package/dist/cjs/a/Popover/common/Item/index.js +15 -0
  26. package/dist/cjs/a/Popover/common/index.js +21 -0
  27. package/dist/cjs/a/Popover/index.js +15 -0
  28. package/dist/cjs/a/Popover/styles.scss +33 -0
  29. package/dist/cjs/a/Shapes/Shapes.js +39 -9
  30. package/dist/cjs/a/Shapes/styles.scss +79 -23
  31. package/dist/cjs/a/SnapScroller/SnapScroller.js +77 -0
  32. package/dist/cjs/a/SnapScroller/index.js +15 -0
  33. package/dist/cjs/a/SnapScroller/styles.scss +38 -0
  34. package/dist/cjs/a/index.js +41 -1
  35. package/dist/cjs/b/Button/Button.js +10 -4
  36. package/dist/cjs/b/Button/styles.scss +55 -10
  37. package/dist/cjs/b/Logo/Logo.js +41 -41
  38. package/dist/cjs/b/Logo/styles.scss +0 -138
  39. package/dist/cjs/b/Page/common/Section/Section.js +35 -7
  40. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +16 -9
  41. package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
  42. package/dist/cjs/c/ContentSlides/styles.scss +10 -4
  43. package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +105 -0
  44. package/dist/cjs/c/SocialMediaShareButton/index.js +15 -0
  45. package/dist/cjs/c/SocialMediaShareButton/styles.scss +39 -0
  46. package/dist/cjs/c/index.js +9 -1
  47. package/dist/cjs/f/FormInput/FormInput.js +20 -3
  48. package/dist/cjs/f/FormInput/styles.scss +11 -0
  49. package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
  50. package/dist/cjs/f/common/Label/Label.js +1 -1
  51. package/dist/cjs/f/common/Label/styles.scss +1 -1
  52. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +1 -1
  53. package/dist/cjs/f/fields/ChoicesInput/styles.scss +17 -2
  54. package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +236 -0
  55. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +205 -0
  56. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/index.js +15 -0
  57. package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +103 -0
  58. package/dist/cjs/f/fields/QueryCombobox/common/Menu/index.js +15 -0
  59. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +304 -0
  60. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/index.js +15 -0
  61. package/dist/cjs/f/fields/QueryCombobox/common/index.js +29 -0
  62. package/dist/cjs/f/fields/QueryCombobox/index.js +15 -0
  63. package/dist/cjs/f/fields/QueryCombobox/styles.scss +90 -0
  64. package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +201 -0
  65. package/dist/cjs/f/fields/QuerySelect/index.js +15 -0
  66. package/dist/cjs/f/fields/QuerySelect/styles.scss +21 -0
  67. package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +39 -6
  68. package/dist/cjs/f/fields/RatingsInput/styles.scss +29 -20
  69. package/dist/cjs/f/fields/SelectInput/SelectInput.js +50 -13
  70. package/dist/cjs/f/fields/SelectInput/styles.scss +33 -13
  71. package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
  72. package/dist/cjs/f/fields/TextInput/TextInput.js +35 -7
  73. package/dist/cjs/f/fields/TextInput/styles.scss +16 -7
  74. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +15 -8
  75. package/dist/cjs/f/fields/TextareaInput/styles.scss +19 -6
  76. package/dist/cjs/f/fields/index.js +15 -23
  77. package/dist/cjs/form-reset.scss +1 -1
  78. package/dist/cjs/index.js +26 -0
  79. package/dist/cjs/test/QueryLoader/QueryLoader.js +41 -0
  80. package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +71 -0
  81. package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +49 -0
  82. package/dist/cjs/test/QueryLoader/common/PreloadedTestData/index.js +15 -0
  83. package/dist/cjs/test/QueryLoader/common/index.js +13 -0
  84. package/dist/cjs/test/QueryLoader/index.js +15 -0
  85. package/dist/cjs/test/QueryLoader/styles.scss +9 -0
  86. package/dist/cjs/test/index.js +13 -0
  87. package/dist/cjs/utils/hooks/index.js +23 -0
  88. package/dist/cjs/utils/hooks/useDynamicPosition.js +107 -0
  89. package/dist/cjs/utils/hooks/useWindowSize.js +39 -0
  90. package/dist/cjs/utils/index.js +19 -0
  91. package/dist/es/a/BackgroundGradient/BackgroundGradient.js +55 -0
  92. package/dist/es/a/BackgroundGradient/index.js +2 -0
  93. package/dist/es/a/BackgroundGradient/styles.scss +16 -0
  94. package/dist/es/a/ContentTree/ContentTree.js +67 -0
  95. package/dist/es/a/ContentTree/common/Tree/Tree.js +98 -0
  96. package/dist/es/a/ContentTree/common/Tree/index.js +2 -0
  97. package/dist/es/a/ContentTree/common/index.js +3 -0
  98. package/dist/es/a/ContentTree/common/useContentTree.js +74 -0
  99. package/dist/es/a/ContentTree/common/useFirstVisibleNode.js +54 -0
  100. package/dist/es/a/ContentTree/index.js +2 -0
  101. package/dist/es/a/ContentTree/styles.scss +33 -0
  102. package/dist/es/a/Conversation/Conversation.js +14 -8
  103. package/dist/es/a/Conversation/common/Message/Message.js +32 -6
  104. package/dist/es/a/Conversation/styles.scss +132 -33
  105. package/dist/es/a/OvalIllustration/OvalIllustration.js +111 -0
  106. package/dist/es/a/OvalIllustration/index.js +2 -0
  107. package/dist/es/a/OvalIllustration/styles.scss +102 -0
  108. package/dist/es/a/Popover/Popover.js +118 -0
  109. package/dist/es/a/Popover/common/Divider/Divider.js +47 -0
  110. package/dist/es/a/Popover/common/Divider/index.js +2 -0
  111. package/dist/es/a/Popover/common/Item/Item.js +47 -0
  112. package/dist/es/a/Popover/common/Item/index.js +2 -0
  113. package/dist/es/a/Popover/common/index.js +2 -0
  114. package/dist/es/a/Popover/index.js +2 -0
  115. package/dist/es/a/Popover/styles.scss +33 -0
  116. package/dist/es/a/Shapes/Shapes.js +39 -9
  117. package/dist/es/a/Shapes/styles.scss +79 -23
  118. package/dist/es/a/SnapScroller/SnapScroller.js +61 -0
  119. package/dist/es/a/SnapScroller/index.js +2 -0
  120. package/dist/es/a/SnapScroller/styles.scss +38 -0
  121. package/dist/es/a/index.js +6 -1
  122. package/dist/es/b/Button/Button.js +8 -2
  123. package/dist/es/b/Button/styles.scss +55 -10
  124. package/dist/es/b/Logo/Logo.js +41 -41
  125. package/dist/es/b/Logo/styles.scss +0 -138
  126. package/dist/es/b/Page/common/Section/Section.js +34 -6
  127. package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +16 -9
  128. package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
  129. package/dist/es/c/ContentSlides/styles.scss +10 -4
  130. package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +89 -0
  131. package/dist/es/c/SocialMediaShareButton/index.js +2 -0
  132. package/dist/es/c/SocialMediaShareButton/styles.scss +39 -0
  133. package/dist/es/c/index.js +2 -1
  134. package/dist/es/f/FormInput/FormInput.js +20 -3
  135. package/dist/es/f/FormInput/styles.scss +11 -0
  136. package/dist/es/f/common/Debugger/Debugger.js +1 -1
  137. package/dist/es/f/common/Label/Label.js +1 -1
  138. package/dist/es/f/common/Label/styles.scss +1 -1
  139. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +1 -1
  140. package/dist/es/f/fields/ChoicesInput/styles.scss +17 -2
  141. package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +213 -0
  142. package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +185 -0
  143. package/dist/es/f/fields/QueryCombobox/common/Combobox/index.js +2 -0
  144. package/dist/es/f/fields/QueryCombobox/common/Menu/Menu.js +77 -0
  145. package/dist/es/f/fields/QueryCombobox/common/Menu/index.js +2 -0
  146. package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +276 -0
  147. package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/index.js +2 -0
  148. package/dist/es/f/fields/QueryCombobox/common/index.js +3 -0
  149. package/dist/es/f/fields/QueryCombobox/index.js +2 -0
  150. package/dist/es/f/fields/QueryCombobox/styles.scss +90 -0
  151. package/dist/es/f/fields/QuerySelect/QuerySelect.js +179 -0
  152. package/dist/es/f/fields/QuerySelect/index.js +2 -0
  153. package/dist/es/f/fields/QuerySelect/styles.scss +21 -0
  154. package/dist/es/f/fields/RatingsInput/RatingsInput.js +38 -6
  155. package/dist/es/f/fields/RatingsInput/styles.scss +29 -20
  156. package/dist/es/f/fields/SelectInput/SelectInput.js +49 -13
  157. package/dist/es/f/fields/SelectInput/styles.scss +33 -13
  158. package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
  159. package/dist/es/f/fields/TextInput/TextInput.js +35 -7
  160. package/dist/es/f/fields/TextInput/styles.scss +16 -7
  161. package/dist/es/f/fields/TextareaInput/TextareaInput.js +15 -8
  162. package/dist/es/f/fields/TextareaInput/styles.scss +19 -6
  163. package/dist/es/f/fields/index.js +3 -4
  164. package/dist/es/form-reset.scss +1 -1
  165. package/dist/es/index.js +3 -1
  166. package/dist/es/test/QueryLoader/QueryLoader.js +29 -0
  167. package/dist/es/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +71 -0
  168. package/dist/es/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +31 -0
  169. package/dist/es/test/QueryLoader/common/PreloadedTestData/index.js +2 -0
  170. package/dist/es/test/QueryLoader/common/index.js +1 -0
  171. package/dist/es/test/QueryLoader/index.js +2 -0
  172. package/dist/es/test/QueryLoader/styles.scss +9 -0
  173. package/dist/es/test/index.js +1 -0
  174. package/dist/es/utils/hooks/index.js +2 -0
  175. package/dist/es/utils/hooks/useDynamicPosition.js +93 -0
  176. package/dist/es/utils/hooks/useWindowSize.js +27 -0
  177. package/dist/es/utils/index.js +1 -0
  178. package/package.json +18 -4
  179. package/relay.config.js +12 -0
  180. package/schema.graphql +4075 -0
  181. package/scripts/fetchSchema.js +74 -0
  182. package/src/__snapshots__/Storyshots.test.js.snap +7018 -3507
  183. package/src/local.scss +4 -2
  184. package/src/stories/StyleGuide/Sprites.stories.mdx +25 -0
  185. package/src/stories/StyleGuide/helpers.js +16 -0
  186. package/src/stories/a/BackgroundGradient.stories.jsx +38 -0
  187. package/src/stories/a/ContentTree.stories.jsx +662 -0
  188. package/src/stories/a/Conversation.stories.jsx +78 -1
  189. package/src/stories/a/OvalIllustration.stories.jsx +59 -0
  190. package/src/stories/a/Popover.stories.jsx +106 -0
  191. package/src/stories/a/Shapes.stories.jsx +74 -43
  192. package/src/stories/a/SnapScroller.stories.jsx +98 -0
  193. package/src/stories/b/Button.stories.jsx +27 -4
  194. package/src/stories/b/Logo.stories.jsx +17 -9
  195. package/src/stories/b/Page.stories.jsx +27 -2
  196. package/src/stories/c/ContentSlides.stories.jsx +154 -2
  197. package/src/stories/c/SocialMediaShareButton.stories.jsx +25 -0
  198. package/src/stories/f/FormInput.stories.jsx +233 -0
  199. package/src/stories/f/QueryCombobox.stories.jsx +269 -0
  200. package/src/stories/f/QuerySelect.stories.jsx +134 -0
  201. package/src/stories/f/RatingsInput.stories.jsx +3 -2
  202. package/src/stories/f/SelectInput.stories.jsx +36 -5
  203. package/src/stories/f/TextInput.stories.jsx +15 -4
  204. package/src/stories/f/TextareaInput.stories.jsx +42 -6
  205. package/src/stories/f/__generated__/FormInputAllTaskStatusesQuery.graphql.js +122 -0
  206. package/src/stories/f/__generated__/FormInputAllTeamsQuery.graphql.js +139 -0
  207. package/src/stories/f/__generated__/QueryComboboxAllTeamsQuery.graphql.js +139 -0
  208. package/src/stories/f/__generated__/QuerySelectAllTaskStatusesQuery.graphql.js +122 -0
  209. package/src/stories/test/QueryLoader.stories.jsx +36 -0
  210. package/src/stories/utils/generateNodeId.js +12 -0
  211. package/src/stories/utils/lorem.js +15 -0
  212. package/src/stories/utils/relay/EnvironmentProvider.jsx +14 -0
  213. package/src/stories/utils/relay/environment.js +5 -0
  214. package/src/stories/utils/relay/index.js +4 -0
  215. package/src/stories/utils/relay/mockRelayOperation.js +14 -0
  216. package/src/stories/utils/relay/mockResolvers.js +299 -0
  217. package/src/stories/utils/testData.js +63 -0
  218. package/src/ui/a/BackgroundGradient/BackgroundGradient.jsx +76 -0
  219. package/src/ui/a/BackgroundGradient/index.js +2 -0
  220. package/src/ui/a/BackgroundGradient/styles.scss +16 -0
  221. package/src/ui/a/ContentTree/ContentTree.jsx +88 -0
  222. package/src/ui/a/ContentTree/common/Tree/Tree.jsx +138 -0
  223. package/src/ui/a/ContentTree/common/Tree/index.js +2 -0
  224. package/src/ui/a/ContentTree/common/index.js +3 -0
  225. package/src/ui/a/ContentTree/common/useContentTree.js +83 -0
  226. package/src/ui/a/ContentTree/common/useFirstVisibleNode.js +59 -0
  227. package/src/ui/a/ContentTree/index.js +2 -0
  228. package/src/ui/a/ContentTree/styles.scss +33 -0
  229. package/src/ui/a/Conversation/Conversation.jsx +15 -7
  230. package/src/ui/a/Conversation/common/Message/Message.jsx +38 -6
  231. package/src/ui/a/Conversation/styles.scss +132 -33
  232. package/src/ui/a/OvalIllustration/OvalIllustration.jsx +134 -0
  233. package/src/ui/a/OvalIllustration/index.js +2 -0
  234. package/src/ui/a/OvalIllustration/styles.scss +102 -0
  235. package/src/ui/a/Popover/Popover.jsx +157 -0
  236. package/src/ui/a/Popover/index.js +2 -0
  237. package/src/ui/a/Popover/styles.scss +33 -0
  238. package/src/ui/a/Shapes/Shapes.jsx +44 -7
  239. package/src/ui/a/Shapes/styles.scss +79 -23
  240. package/src/ui/a/SnapScroller/SnapScroller.jsx +83 -0
  241. package/src/ui/a/SnapScroller/index.js +2 -0
  242. package/src/ui/a/SnapScroller/styles.scss +38 -0
  243. package/src/ui/a/index.js +5 -0
  244. package/src/ui/b/Button/Button.jsx +9 -1
  245. package/src/ui/b/Button/styles.scss +55 -10
  246. package/src/ui/b/Logo/Logo.jsx +41 -41
  247. package/src/ui/b/Logo/styles.scss +0 -138
  248. package/src/ui/b/Page/common/Section/Section.jsx +39 -5
  249. package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +12 -5
  250. package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
  251. package/src/ui/c/ContentSlides/styles.scss +10 -4
  252. package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +113 -0
  253. package/src/ui/c/SocialMediaShareButton/index.js +2 -0
  254. package/src/ui/c/SocialMediaShareButton/styles.scss +39 -0
  255. package/src/ui/c/index.js +1 -0
  256. package/src/ui/f/FormInput/FormInput.jsx +26 -1
  257. package/src/ui/f/FormInput/styles.scss +11 -0
  258. package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
  259. package/src/ui/f/common/Label/Label.jsx +1 -1
  260. package/src/ui/f/common/Label/styles.scss +1 -1
  261. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +1 -1
  262. package/src/ui/f/fields/ChoicesInput/styles.scss +17 -2
  263. package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +227 -0
  264. package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +222 -0
  265. package/src/ui/f/fields/QueryCombobox/common/Combobox/index.js +2 -0
  266. package/src/ui/f/fields/QueryCombobox/common/Menu/Menu.jsx +103 -0
  267. package/src/ui/f/fields/QueryCombobox/common/Menu/index.js +2 -0
  268. package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +318 -0
  269. package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/index.js +2 -0
  270. package/src/ui/f/fields/QueryCombobox/common/index.js +3 -0
  271. package/src/ui/f/fields/QueryCombobox/index.js +2 -0
  272. package/src/ui/f/fields/QueryCombobox/styles.scss +90 -0
  273. package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +200 -0
  274. package/src/ui/f/fields/QuerySelect/index.js +2 -0
  275. package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +54 -19
  276. package/src/ui/f/fields/RatingsInput/styles.scss +29 -20
  277. package/src/ui/f/fields/SelectInput/SelectInput.jsx +59 -8
  278. package/src/ui/f/fields/SelectInput/styles.scss +33 -13
  279. package/src/ui/f/fields/TextInput/TextInput.jsx +31 -3
  280. package/src/ui/f/fields/TextInput/styles.scss +16 -7
  281. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +24 -13
  282. package/src/ui/f/fields/TextareaInput/styles.scss +19 -6
  283. package/src/ui/f/fields/index.js +2 -3
  284. package/src/ui/form-reset.scss +1 -1
  285. package/src/ui/index.js +2 -0
  286. package/src/ui/test/QueryLoader/QueryLoader.jsx +41 -0
  287. package/src/ui/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +68 -0
  288. package/src/ui/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.jsx +51 -0
  289. package/src/ui/test/QueryLoader/common/PreloadedTestData/index.js +2 -0
  290. package/src/ui/test/QueryLoader/common/index.js +1 -0
  291. package/src/ui/test/QueryLoader/index.js +2 -0
  292. package/src/ui/test/index.js +1 -0
  293. package/src/ui/utils/hooks/index.js +2 -0
  294. package/src/ui/utils/hooks/useDynamicPosition.js +104 -0
  295. package/src/ui/utils/hooks/useWindowSize.js +32 -0
  296. package/src/ui/utils/index.js +1 -0
  297. package/stylelint.config.js +13 -13
  298. package/src/stories/f/CheckboxInput.stories.jsx +0 -37
  299. package/src/stories/f/RadioInput.stories.jsx +0 -37
  300. package/src/stories/f/TaskRecommendationInput.stories.jsx +0 -38
  301. package/src/ui/f/fields/CheckboxInput/CheckboxInput.jsx +0 -107
  302. package/src/ui/f/fields/CheckboxInput/index.js +0 -2
  303. package/src/ui/f/fields/CheckboxInput/styles.scss +0 -28
  304. package/src/ui/f/fields/RadioInput/RadioInput.jsx +0 -112
  305. package/src/ui/f/fields/RadioInput/index.js +0 -2
  306. package/src/ui/f/fields/RadioInput/styles.scss +0 -26
  307. package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +0 -130
  308. package/src/ui/f/fields/TaskRecommendationInput/index.js +0 -2
  309. package/src/ui/f/fields/TaskRecommendationInput/styles.scss +0 -41
@@ -0,0 +1,299 @@
1
+ const customMockResolvers = {
2
+ String :() => 'Test string',
3
+ UserNode:() => ({
4
+ id :'VXNlck5vZGU6OTZkZTA3M2MtNTE3Ni00ZjgyLTg4OWMtMzIwYmVmYzU5ODFj',
5
+ firstName :'Collins',
6
+ isSuperuser:false,
7
+ }),
8
+ TaskNode:() => ({
9
+ id :'VGFza05vZGU6MDAwZmQ4N2UtYjNlNS00NWE5LTg5ZjEtNWI0ZDViNWE2NTlj',
10
+ title :'Task1',
11
+ status:{
12
+ id :'VGFza1N0YXR1c05vZGU6OTczYmM4NTgtMzA0NC00NWNiLTg2MDQtYTRhM2JmNjFmZjEx',
13
+ status:'In Review',
14
+ },
15
+ requester:{
16
+ id :'VXNlck5vZGU6OTZkZTA3M2MtNTE3Ni00ZjgyLTg4OWMtMzIwYmVmYzU5ODFj',
17
+ firstName:'Collins',
18
+ },
19
+ userTeam:{
20
+ id :'VGVhbU5vZGU6MDAxZTIyOGEtYzA5My00MGI0LWE1MTUtYTNkMTM1NTE1MDNl',
21
+ name:'Team 1',
22
+ },
23
+ manager:{
24
+ id :'VXNlck5vZGU6OTZkZTA3M2MtNTE3Ni00ZjgyLTg4OWMtMzIwYmVmYzU5ODFj',
25
+ firstName:'manager',
26
+ },
27
+ createdAt :'2021-09-23',
28
+ dueDate :'2021-10-30',
29
+ requestDate:'2020-01-01',
30
+ description:'First task',
31
+ }),
32
+ TeamNode:() => ({
33
+ id :'VGVhbU5vZGU6MDAxZTIyOGEtYzA5My00MGI0LWE1MTUtYTNkMTM1NTE1MDNl',
34
+ name :'Team 1',
35
+ credits :20.12,
36
+ billingEmail:'team1@hellopareto.com',
37
+ hourlyRate :20,
38
+ partner :{
39
+ firstName:'Test1',
40
+ lastName :'assd',
41
+ },
42
+
43
+ }),
44
+ GroupNode:() => ({
45
+ id :'VGFza05vZGU6MDAwZmQ4N2UtYjNlNS00NWE5LTg5ZjEtNWI0ZDViNWE2NTlk',
46
+ name:'admin',
47
+ }),
48
+ TaskNodeConnection:() => ({
49
+ pageInfo:{
50
+ hasNextPage :true,
51
+ hasPreviousPage:true,
52
+ },
53
+ edges:[
54
+ {
55
+ node:{
56
+ id :'VGFza05vZGU6MDAwZmQ4N2UtYjNlNS00NWE5LTg5ZjEtNWI0ZDViNWE2NTlj',
57
+ title :'Task1',
58
+ status:{
59
+ id :'VGFza1N0YXR1c05vZGU6OTczYmM4NTgtMzA0NC00NWNiLTg2MDQtYTRhM2JmNjFmZjEx',
60
+ status:'In Review',
61
+ },
62
+ requester:{
63
+ id :'VXNlck5vZGU6OTZkZTA3M2MtNTE3Ni00ZjgyLTg4OWMtMzIwYmVmYzU5ODFj',
64
+ firstName:'Collins',
65
+ },
66
+ userTeam:{
67
+ id :'VGVhbU5vZGU6MDAxZTIyOGEtYzA5My00MGI0LWE1MTUtYTNkMTM1NTE1MDNl',
68
+ name:'Team 1',
69
+ },
70
+ manager:{
71
+ id :'VXNlck5vZGU6OTZkZTA3M2MtNTE3Ni00ZjgyLTg4OWMtMzIwYmVmYzU5ODFj',
72
+ firstName:'manager',
73
+ },
74
+ createdAt :'2021-09-23',
75
+ dueDate :'2021-10-30',
76
+ requestDate:'2020-01-01',
77
+ description:'First task',
78
+ },
79
+ },
80
+ {
81
+ node:{
82
+ id :'VGFza05vZGU6MDAwZmQ4N2UtYjNlNS00NWE5LTg5ZjEtNWI0ZDViNWE2NTlj',
83
+ title :'Task2',
84
+ status:{
85
+ id :'VGFza1N0YXR1c05vZGU6OTczYmM4NTgtMzA0NC00NWNiLTg2MDQtYTRhM2JmNjFmZjEx',
86
+ status:'In Review',
87
+ },
88
+ requester:{
89
+ id :'VXNlck5vZGU6OTZkZTA3M2MtNTE3Ni00ZjgyLTg4OWMtMzIwYmVmYzU5ODFj',
90
+ firstName:'Collins',
91
+ },
92
+ userTeam:{
93
+ id :'VGVhbU5vZGU6MDAxZTIyOGEtYzA5My00MGI0LWE1MTUtYTNkMTM1NTE1MDNl',
94
+ name:'Team 2',
95
+ },
96
+ manager:{
97
+ id :'VXNlck5vZGU6OTZkZTA3M2MtNTE3Ni00ZjgyLTg4OWMtMzIwYmVmYzU5ODFj',
98
+ firstName:'manager',
99
+ },
100
+ createdAt :'2021-09-23',
101
+ dueDate :'2021-10-30',
102
+ requestDate:'2020-01-01',
103
+ description:'Second task',
104
+ },
105
+ },
106
+ ],
107
+ }),
108
+ UserNodeConnection:(allArgs) => {
109
+ const { args :{ first, offset } } = allArgs
110
+
111
+ const edges = [
112
+ {
113
+ node:{
114
+ id :'VXNlck5vZGU6OTZkZTA3M2MtNTE3Ni00ZjgyLTg4OWMtMzIwYmVmYzU5ODFj',
115
+ firstName:'Collins',
116
+ },
117
+ },
118
+ {
119
+ node:{
120
+ id :'VXNlck5vZGU6MDEyN2E1NmItYjAxOS00NmQxLTg2NTEtYWEzOGIxZTUwNTA5',
121
+ firstName:'Amritha',
122
+ },
123
+ },
124
+ {
125
+ node:{
126
+ id :'VXNlck5vZGU6YzcwYWIxMDItZWE2Yy00ZWNhLTk0M2ItOTA2OWQwN2RiMDQ0',
127
+ firstName:'Marsya',
128
+ },
129
+ },
130
+ {
131
+ node:{
132
+ id :'VXNlck5vZGU6OTUyNjg1NWYtZTg3NC00ZTlkLWFlZTgtZDZjODc3NDNlNTRh',
133
+ firstName:'James',
134
+ },
135
+ },
136
+ {
137
+ node:{
138
+ id :'VXNlck5vZGU6OTFmOTE4NTYtNjg0Yi00ODhhLWE0YzktZGU5ZDQ5YmJjM2Mz',
139
+ firstName:'Adrian',
140
+ },
141
+ },
142
+ {
143
+ node:{
144
+ id :'VXNlck5vZGU6OTNkZGU3NGEtYTA2Yi00MDMzLWIwMDAtMTFkZDY0N2Y3OWE4',
145
+ firstName:'Melissa',
146
+ },
147
+ },
148
+ {
149
+ node:{
150
+ id :'VXNlck5vZGU6MjgyYTk1MjctMDI4OS00MDlhLWFjNTktYWJkNTFkODAyMjFj',
151
+ firstName:'Beto',
152
+ },
153
+ },
154
+ {
155
+ node:{
156
+ id :'VXNlck5vZGU6YmIxYzI5YmEtYTk0OS00M2I3LWIxMWEtZDQxMjM5ZWI0ZWI2',
157
+ firstName:'Romie',
158
+ },
159
+ },
160
+ {
161
+ node:{
162
+ id :'VXNlck5vZGU6ZjZhNzBiZTgtY2FkMC00NzNjLWEyODUtNDdkMGVmYjQxYTRl',
163
+ firstName:'Miguel',
164
+ },
165
+ },
166
+ {
167
+ node:{
168
+ id :'VXNlck5vZGU6Y2JlOGM4ZTYtY2Q2Zi00M2RlLWI4YmQtODU3YWRhZjYyMzVj',
169
+ firstName:'Phoebe',
170
+ },
171
+ },
172
+ {
173
+ node:{
174
+ id :'VXNlck5vZGU6NDA5MWM1MDUtYjY1MC00M2Y1LTg3NTEtMDc1NTBkMzJhYTcy',
175
+ firstName:'Kim',
176
+ },
177
+ },
178
+ {
179
+ node:{
180
+ id :'VXNlck5vZGU6ZjE0MGUxYTItM2I4My00NmY1LWIzMDQtYmFiOGZjMTc5ZmU4',
181
+ firstName:'Liz',
182
+ },
183
+ },
184
+ {
185
+ node:{
186
+ id :'VXNlck5vZGU6ZGYyOGE5MDYtM2NhMS00NTVmLWIzZmUtNjY5YWFkZTNiZjRk',
187
+ firstName:'Deepanshu',
188
+ },
189
+ },
190
+ {
191
+ node:{
192
+ id :'VXNlck5vZGU6MjBhMDBkYjgtZDExNi00YzAyLWEyOTUtYWM5MzIwMjUwMWU3',
193
+ firstName:'Jennica',
194
+ },
195
+ },
196
+ {
197
+ node:{
198
+ id :'VXNlck5vZGU6MjczNDllYjMtYzNmYi00ZmVkLWE1N2YtNTFjZGJlODI0MWU2',
199
+ firstName:'Michelle',
200
+ },
201
+ },
202
+ ]
203
+
204
+ return ({
205
+ pageInfo:{
206
+ hasNextPage :true,
207
+ hasPreviousPage:true,
208
+ },
209
+ edges:edges.slice(offset, offset + first),
210
+ })
211
+ },
212
+ WorkHoursNodeConnection:() => ({
213
+ pageInfo:{
214
+ hasNextPage :true,
215
+ hasPreviousPage:true,
216
+ },
217
+ edges:[
218
+ {
219
+ node:{
220
+ id :'V29ya0hvdXJzTm9kZTplYWJlYmEyNC0wNTlmLTQxMjEtODIzYi0yYmU2YzMxMmZlNzA=',
221
+ associate:{
222
+ firstName:'Des',
223
+ lastName :'assd',
224
+ },
225
+ timeSpent :15,
226
+ log :'asd',
227
+ paidOut :false,
228
+ sentInvoice:true,
229
+ createdAt :'2021-09-05T17:08:49.000-0430',
230
+ startedAt :'2021-09-05T17:08:49.000-0430',
231
+ },
232
+ },
233
+ {
234
+ node:{
235
+ id :'V29ya0hvdXJzTm9kZTplYmZiZTllZS04NWNkLTRhNDktYTZhMi0zNmNhMTU0M2EwMDU=',
236
+ associate:{
237
+ firstName:'Ella',
238
+ lastName :'asdasd',
239
+ },
240
+ timeSpent :25,
241
+ log :'aasdasdsd',
242
+ paidOut :true,
243
+ sentInvoice:false,
244
+ createdAt :'2021-09-15T17:08:49.000-0430',
245
+ startedAt :'2021-09-15T17:08:49.000-0430',
246
+ },
247
+ },
248
+ ],
249
+ }),
250
+ TeamNodeConnection:() => ({
251
+ pageInfo:{
252
+ hasNextPage :true,
253
+ hasPreviousPage:true,
254
+ },
255
+ edges:[
256
+ {
257
+ node:{
258
+ id :'VGVhbU5vZGU6MDAxZTIyOGEtYzA5My00MGI0LWE1MTUtYTNkMTM1NTE1MDNl',
259
+ name :'Team 1',
260
+ credits :20.12,
261
+ billingEmail:'team1@hellopareto.com',
262
+ hourlyRate :20,
263
+ partner :{
264
+ firstName:'Test1',
265
+ lastName :'assd',
266
+ },
267
+ },
268
+ },
269
+ {
270
+ node:{
271
+ id :'VGVhbU5vZGU6MDA0N2U4MzktODY0Zi00N2U5LTg3ZjgtZGUwMmM2Yzg1YWJm',
272
+ name :'Team 2',
273
+ credits :20.12,
274
+ billingEmail:'team2@hellopareto.com',
275
+ hourlyRate :20,
276
+ partner :{
277
+ firstName:'Test2',
278
+ lastName :'assd',
279
+ },
280
+ },
281
+ },
282
+ {
283
+ node:{
284
+ id :'VGVhbU5vZGU6MDExMmEyZmEtYzE0YS00MGRhLThiNWQtMDMzNTkyNDQ3ZDI2',
285
+ name :'Team 3',
286
+ credits :20.12,
287
+ billingEmail:'team3@hellopareto.com',
288
+ hourlyRate :20,
289
+ partner :{
290
+ firstName:'Test3',
291
+ lastName :'assd',
292
+ },
293
+ },
294
+ },
295
+ ],
296
+ }),
297
+ }
298
+
299
+ export default customMockResolvers
@@ -0,0 +1,63 @@
1
+ export const fruits = [
2
+ 'Apple',
3
+ 'Apricot',
4
+ 'Avocado',
5
+ 'Banana',
6
+ 'Bilberry',
7
+ 'Blackberry',
8
+ 'Blackcurrant',
9
+ 'Blueberry',
10
+ 'Currant',
11
+ 'Cherry',
12
+ 'Cherimoya',
13
+ 'Clementine',
14
+ 'Date',
15
+ 'Damson',
16
+ 'Durian',
17
+ 'Eggplant',
18
+ 'Elderberry',
19
+ 'Feijoa',
20
+ 'Gooseberry',
21
+ 'Grape',
22
+ 'Grapefruit',
23
+ 'Guava',
24
+ 'Huckleberry',
25
+ 'Jackfruit',
26
+ 'Jambul',
27
+ 'Kiwi fruit',
28
+ 'Kumquat',
29
+ 'Legume',
30
+ 'Lemon',
31
+ 'Lime',
32
+ 'Lychee',
33
+ 'Mango',
34
+ 'Mangostine',
35
+ 'Melon',
36
+ 'Cantaloupe',
37
+ 'Honeydew melon',
38
+ 'Rock melon',
39
+ 'Nectarine',
40
+ 'Orange',
41
+ 'Peach',
42
+ 'Pear',
43
+ 'Williams pear or Bartlett pear',
44
+ 'Pitaya',
45
+ 'Physalis',
46
+ 'Plum/prune (dried plum)',
47
+ 'Pineapple',
48
+ 'Pomegranate',
49
+ 'Raisin',
50
+ 'Raspberry',
51
+ 'Western raspberry (blackcap)',
52
+ 'Rambutan',
53
+ 'Redcurrant',
54
+ 'Salal berry',
55
+ 'Satsuma',
56
+ 'Star fruit',
57
+ 'Strawberry',
58
+ 'Tangerine',
59
+ 'Tomato',
60
+ 'Ugli fruit',
61
+ 'Watermelon',
62
+ 'Ziziphus mauritiana',
63
+ ]
@@ -0,0 +1,76 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react'
3
+
4
+ import { useLayoutEffect } from 'react'
5
+
6
+ import PropTypes from 'prop-types'
7
+
8
+ import styleNames from '@pareto-engineering/bem'
9
+
10
+ // Local Definitions
11
+
12
+ const baseClassName = styleNames.base
13
+
14
+ const componentClassName = 'background-gradient'
15
+
16
+ /**
17
+ * This is the component description.
18
+ */
19
+ const BackgroundGradient = ({
20
+ id,
21
+ className:userClassName,
22
+ style,
23
+ height,
24
+ // ...otherProps
25
+ }) => {
26
+ useLayoutEffect(() => {
27
+ import('./styles.scss')
28
+ }, [])
29
+
30
+ return (
31
+ <div
32
+ id={id}
33
+ className={[
34
+
35
+ baseClassName,
36
+
37
+ componentClassName,
38
+ userClassName,
39
+ ]
40
+ .filter((e) => e)
41
+ .join(' ')}
42
+ style={{
43
+ ...style,
44
+ '--gradient-height':height,
45
+ }}
46
+ />
47
+ )
48
+ }
49
+
50
+ BackgroundGradient.propTypes = {
51
+ /**
52
+ * The HTML id for this element
53
+ */
54
+ id:PropTypes.string,
55
+
56
+ /**
57
+ * The HTML class names for this element
58
+ */
59
+ className:PropTypes.string,
60
+
61
+ /**
62
+ * The React-written, css properties for this element.
63
+ */
64
+ style:PropTypes.objectOf(PropTypes.string),
65
+
66
+ /**
67
+ * The height of the shape.
68
+ */
69
+ height:PropTypes.string,
70
+ }
71
+
72
+ BackgroundGradient.defaultProps = {
73
+ // someProp: false,
74
+ }
75
+
76
+ export default BackgroundGradient
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as BackgroundGradient } from './BackgroundGradient'
@@ -0,0 +1,16 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ @use "@pareto-engineering/bem";
3
+
4
+ .#{bem.$base}.background-gradient{
5
+ position: absolute;
6
+ top: 0;
7
+ left: 0;
8
+ width: 100%;
9
+ height: var(--gradient-height);
10
+ background-image: linear-gradient(var(--background1), var(--y) 25%, var(--light-y) 75%, var(--background1));
11
+ opacity: .4;
12
+ z-index: -1;
13
+ }
14
+
15
+
16
+
@@ -0,0 +1,88 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react'
3
+
4
+ import { useLayoutEffect } from 'react'
5
+
6
+ import PropTypes from 'prop-types'
7
+
8
+ import styleNames from '@pareto-engineering/bem'
9
+
10
+ // Local Definitions
11
+ import { Tree, useContentTree } from './common'
12
+
13
+ const baseClassName = styleNames.base
14
+
15
+ const componentClassName = 'content-tree'
16
+
17
+ /**
18
+ * This is the component description.
19
+ */
20
+ const ContentTree = ({
21
+ id,
22
+ className:userClassName,
23
+ style,
24
+ target,
25
+ selectors,
26
+ // ...otherProps
27
+ }) => {
28
+ useLayoutEffect(() => {
29
+ import('./styles.scss')
30
+ }, [])
31
+
32
+ const contentTree = useContentTree(target, selectors)
33
+
34
+ return (
35
+ <div
36
+ id={id}
37
+ className={[
38
+
39
+ baseClassName,
40
+
41
+ componentClassName,
42
+ userClassName,
43
+ ]
44
+ .filter((e) => e)
45
+ .join(' ')}
46
+ style={style}
47
+ // {...otherProps}
48
+ >
49
+ <Tree tree={contentTree} />
50
+ </div>
51
+ )
52
+ }
53
+
54
+ ContentTree.propTypes = {
55
+ /**
56
+ * The HTML id for this element
57
+ */
58
+ id:PropTypes.string,
59
+
60
+ /**
61
+ * The HTML class names for this element
62
+ */
63
+ className:PropTypes.string,
64
+
65
+ /**
66
+ * The React-written, css properties for this element.
67
+ */
68
+ style:PropTypes.objectOf(PropTypes.string),
69
+
70
+ /**
71
+ * The selectors to use to extract the navigation tree from the content.
72
+ */
73
+ selectors:PropTypes.arrayOf(PropTypes.string),
74
+
75
+ /**
76
+ * The reference to the parent element.
77
+ */
78
+ target:PropTypes.oneOfType([
79
+ PropTypes.func,
80
+ PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
81
+ ]),
82
+ }
83
+
84
+ ContentTree.defaultProps = {
85
+ selectors:['h2', 'h3'],
86
+ }
87
+
88
+ export default ContentTree
@@ -0,0 +1,138 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react'
3
+
4
+ import { useState, useEffect, useMemo } from 'react'
5
+
6
+ import PropTypes from 'prop-types'
7
+
8
+ import styleNames from '@pareto-engineering/bem'
9
+
10
+ // Local Definitions
11
+
12
+ import useFirstVisibleNode from '../useFirstVisibleNode'
13
+
14
+ const baseClassName = styleNames.base
15
+
16
+ const componentClassName = 'tree'
17
+
18
+ /**
19
+ * This is the component description.
20
+ */
21
+ const Tree = ({
22
+ id,
23
+ className:userClassName,
24
+ style,
25
+ tree,
26
+ displayDepth,
27
+ // ...otherProps
28
+ }) => {
29
+ // The nodeIds to be used to get the first visible node
30
+ const [nodeIds, setNodeIds] = useState([])
31
+
32
+ // current visible nodeId
33
+ const visibleNodeId = useFirstVisibleNode(nodeIds)
34
+
35
+ useEffect(() => {
36
+ const node = document.getElementsByClassName(visibleNodeId)[0]
37
+ node?.classList.add(styleNames.modifierActive)
38
+
39
+ return () => {
40
+ node?.classList.remove(styleNames.modifierActive)
41
+ }
42
+ }, [visibleNodeId])
43
+
44
+ // Generate the tree structure from the content tree data depending on the display depth
45
+ const getNestedTree = (node, depth) => {
46
+ setNodeIds((prev) => [...prev, node.id])
47
+ if (depth <= 1) {
48
+ return (
49
+ <li key={node.id}>
50
+ <a
51
+ className={node.id}
52
+ href={node.id}
53
+ >
54
+ {node.text}
55
+ </a>
56
+ </li>
57
+ )
58
+ }
59
+ return (
60
+ <li key={node.id}>
61
+ <p>
62
+ <a
63
+ href={node.id}
64
+ className={node.id}
65
+ >
66
+ {node.text}
67
+ </a>
68
+ </p>
69
+ {node.children.length > 0 && (
70
+ <ul>
71
+ {node.children.map((child) => getNestedTree(child, depth - 1))}
72
+ </ul>
73
+ )}
74
+ </li>
75
+ )
76
+ }
77
+
78
+ const ContentTree = useMemo(
79
+ () => tree.map((node) => getNestedTree(node, displayDepth)),
80
+ [tree],
81
+ )
82
+
83
+ return (
84
+ <ul
85
+ id={id}
86
+ className={[
87
+
88
+ baseClassName,
89
+
90
+ componentClassName,
91
+ userClassName,
92
+ ]
93
+ .filter((e) => e)
94
+ .join(' ')}
95
+ style={style}
96
+ >
97
+ {ContentTree}
98
+ </ul>
99
+ )
100
+ }
101
+ Tree.propTypes = {
102
+ /**
103
+ * The HTML id for this element
104
+ */
105
+ id:PropTypes.string,
106
+
107
+ /**
108
+ * The HTML class names for this element
109
+ */
110
+ className:PropTypes.string,
111
+
112
+ /**
113
+ * The React-written, css properties for this element.
114
+ */
115
+ style:PropTypes.objectOf(PropTypes.string),
116
+
117
+ /**
118
+ * The tree to render.
119
+ */
120
+ tree:PropTypes.arrayOf(PropTypes.shape({
121
+ text :PropTypes.string,
122
+ id :PropTypes.string,
123
+ children:PropTypes.arrayOf(PropTypes.shape({
124
+ text:PropTypes.string, id:PropTypes.string,
125
+ })),
126
+ })),
127
+
128
+ /**
129
+ * The levels of the tree to display.
130
+ */
131
+ displayDepth:PropTypes.number,
132
+ }
133
+
134
+ Tree.defaultProps = {
135
+ displayDepth:4,
136
+ }
137
+
138
+ export default Tree
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as Tree } from './Tree'
@@ -0,0 +1,3 @@
1
+ export { default as useContentTree } from './useContentTree'
2
+ export { default as useFirstVisibleNode } from './useFirstVisibleNode'
3
+ export { Tree } from './Tree'