@pareto-engineering/design-system 3.0.0-alpha.29 → 4.0.0-alpha.4

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 (359) hide show
  1. package/.storybook/main.js +25 -63
  2. package/.storybook/preview.js +26 -9
  3. package/.storybook/webpackFinal.js +68 -0
  4. package/babel.config.js +25 -48
  5. package/dist/cjs/a/AppContext/Context.js +1 -1
  6. package/dist/cjs/a/AppContext/ContextProvider.js +19 -15
  7. package/dist/cjs/a/AppContext/index.js +4 -4
  8. package/dist/cjs/a/AppContext/useTheme.js +7 -7
  9. package/dist/cjs/a/ContentTree/ContentTree.js +6 -6
  10. package/dist/cjs/a/ContentTree/common/Tree/Tree.js +12 -12
  11. package/dist/cjs/a/ContentTree/common/Tree/index.js +1 -1
  12. package/dist/cjs/a/ContentTree/common/index.js +3 -3
  13. package/dist/cjs/a/ContentTree/common/useContentTree.js +14 -14
  14. package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +10 -11
  15. package/dist/cjs/a/ContentTree/index.js +1 -1
  16. package/dist/cjs/a/ContentTree/styles.scss +20 -20
  17. package/dist/cjs/a/Conversation/Context.js +1 -1
  18. package/dist/cjs/a/Conversation/Conversation.js +6 -6
  19. package/dist/cjs/a/Conversation/common/Message/Message.js +8 -8
  20. package/dist/cjs/a/Conversation/common/Message/index.js +1 -1
  21. package/dist/cjs/a/Conversation/common/index.js +1 -1
  22. package/dist/cjs/a/Conversation/index.js +3 -3
  23. package/dist/cjs/a/Conversation/styles.scss +1 -0
  24. package/dist/cjs/a/DotInfo/DotInfo.js +10 -14
  25. package/dist/cjs/a/DotInfo/index.js +1 -1
  26. package/dist/cjs/a/Figure/Figure.js +5 -5
  27. package/dist/cjs/a/Figure/index.js +1 -1
  28. package/dist/cjs/a/HamburgerButton/HamburgerButton.js +16 -19
  29. package/dist/cjs/a/HamburgerButton/index.js +1 -1
  30. package/dist/cjs/a/IconList/IconList.js +18 -25
  31. package/dist/cjs/a/IconList/common/Item/Item.js +17 -24
  32. package/dist/cjs/a/IconList/common/Item/index.js +1 -1
  33. package/dist/cjs/a/IconList/common/index.js +1 -1
  34. package/dist/cjs/a/IconList/index.js +1 -1
  35. package/dist/cjs/a/Label/Label.js +6 -6
  36. package/dist/cjs/a/Label/index.js +1 -1
  37. package/dist/cjs/a/Label/styles.scss +18 -17
  38. package/dist/cjs/a/LoadingCircle/LoadingCircle.js +10 -14
  39. package/dist/cjs/a/LoadingCircle/index.js +1 -1
  40. package/dist/cjs/a/LoadingCircle/styles.scss +35 -37
  41. package/dist/cjs/a/People/People.js +8 -12
  42. package/dist/cjs/a/People/common/Person/Person.js +7 -7
  43. package/dist/cjs/a/People/common/Person/index.js +1 -1
  44. package/dist/cjs/a/People/common/index.js +1 -1
  45. package/dist/cjs/a/People/index.js +1 -1
  46. package/dist/cjs/a/People/styles.scss +4 -4
  47. package/dist/cjs/a/Popover/Popover.js +8 -8
  48. package/dist/cjs/a/Popover/index.js +1 -1
  49. package/dist/cjs/a/Popover/styles.scss +4 -3
  50. package/dist/cjs/a/ProgressBar/ProgressBar.js +10 -14
  51. package/dist/cjs/a/ProgressBar/index.js +1 -1
  52. package/dist/cjs/a/Quote/Quote.js +6 -6
  53. package/dist/cjs/a/Quote/index.js +1 -1
  54. package/dist/cjs/a/Quote/styles.scss +41 -38
  55. package/dist/cjs/a/SVG/SVG.js +22 -25
  56. package/dist/cjs/a/SVG/common/UseSVG/UseSVG.js +9 -11
  57. package/dist/cjs/a/SVG/common/UseSVG/index.js +1 -1
  58. package/dist/cjs/a/SVG/common/index.js +1 -1
  59. package/dist/cjs/a/SVG/index.js +1 -1
  60. package/dist/cjs/a/SnapScroller/SnapScroller.js +5 -5
  61. package/dist/cjs/a/SnapScroller/index.js +1 -1
  62. package/dist/cjs/a/SnapScroller/styles.scss +6 -4
  63. package/dist/cjs/a/Spinner/Spinner.js +6 -6
  64. package/dist/cjs/a/Spinner/index.js +1 -1
  65. package/dist/cjs/a/Timestamp/Timestamp.js +11 -11
  66. package/dist/cjs/a/Timestamp/index.js +1 -1
  67. package/dist/cjs/a/index.js +20 -27
  68. package/dist/cjs/b/Button/Button.js +18 -21
  69. package/dist/cjs/b/Button/index.js +1 -1
  70. package/dist/cjs/b/Button/styles.scss +2 -2
  71. package/dist/cjs/b/Logo/Logo.js +12 -12
  72. package/dist/cjs/b/Logo/index.js +1 -1
  73. package/dist/cjs/b/Logo/styles.scss +4 -2
  74. package/dist/cjs/b/Page/Context.js +1 -1
  75. package/dist/cjs/b/Page/Page.js +15 -18
  76. package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +41 -45
  77. package/dist/cjs/b/Page/common/PageHelmet/index.js +1 -1
  78. package/dist/cjs/b/Page/common/Section/Section.js +13 -16
  79. package/dist/cjs/b/Page/common/Section/index.js +1 -1
  80. package/dist/cjs/b/Page/common/index.js +2 -2
  81. package/dist/cjs/b/Page/index.js +3 -3
  82. package/dist/cjs/b/Page/styles.scss +7 -6
  83. package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +20 -24
  84. package/dist/cjs/b/SocialMediaButton/index.js +1 -1
  85. package/dist/cjs/b/SocialMediaButton/styles.scss +1 -1
  86. package/dist/cjs/b/ThemeSelector/ThemeSelector.js +8 -8
  87. package/dist/cjs/b/ThemeSelector/index.js +1 -1
  88. package/dist/cjs/b/Title/Title.js +5 -5
  89. package/dist/cjs/b/Title/index.js +1 -1
  90. package/dist/cjs/b/index.js +6 -6
  91. package/dist/cjs/c/ContentSlides/ContentSlides.js +31 -28
  92. package/dist/cjs/c/ContentSlides/Context.js +1 -1
  93. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +8 -8
  94. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/index.js +1 -1
  95. package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +7 -7
  96. package/dist/cjs/c/ContentSlides/common/Navigator/index.js +1 -1
  97. package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +5 -5
  98. package/dist/cjs/c/ContentSlides/common/Sidebar/index.js +1 -1
  99. package/dist/cjs/c/ContentSlides/common/Slide/Slide.js +6 -6
  100. package/dist/cjs/c/ContentSlides/common/Slide/index.js +1 -1
  101. package/dist/cjs/c/ContentSlides/common/index.js +4 -4
  102. package/dist/cjs/c/ContentSlides/index.js +3 -3
  103. package/dist/cjs/c/ContentSlides/styles.scss +2 -4
  104. package/dist/cjs/c/Modal/Modal.js +5 -5
  105. package/dist/cjs/c/Modal/common/ModalHeader/ModalHeader.js +5 -5
  106. package/dist/cjs/c/Modal/common/ModalHeader/index.js +1 -1
  107. package/dist/cjs/c/Modal/common/index.js +1 -1
  108. package/dist/cjs/c/Modal/index.js +1 -1
  109. package/dist/cjs/c/Modal/styles.scss +7 -5
  110. package/dist/cjs/c/Shortener/Shortener.js +9 -9
  111. package/dist/cjs/c/Shortener/index.js +1 -1
  112. package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +11 -11
  113. package/dist/cjs/c/SocialMediaShareButton/index.js +1 -1
  114. package/dist/cjs/c/SocialMediaShareButton/styles.scss +3 -3
  115. package/dist/cjs/c/index.js +5 -5
  116. package/dist/cjs/f/FormInput/FormInput.js +13 -16
  117. package/dist/cjs/f/FormInput/index.js +1 -1
  118. package/dist/cjs/f/FormInput/styles.scss +4 -4
  119. package/dist/cjs/f/common/Debugger/Debugger.js +7 -7
  120. package/dist/cjs/f/common/Debugger/index.js +1 -1
  121. package/dist/cjs/f/common/Description/Description.js +7 -7
  122. package/dist/cjs/f/common/Description/index.js +1 -1
  123. package/dist/cjs/f/common/Label/Label.js +6 -6
  124. package/dist/cjs/f/common/Label/index.js +1 -1
  125. package/dist/cjs/f/common/Label/styles.scss +1 -1
  126. package/dist/cjs/f/common/index.js +3 -3
  127. package/dist/cjs/f/fields/Checkbox/Checkbox.js +6 -6
  128. package/dist/cjs/f/fields/Checkbox/index.js +1 -1
  129. package/dist/cjs/f/fields/Checkbox/styles.scss +9 -8
  130. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +11 -15
  131. package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +7 -7
  132. package/dist/cjs/f/fields/ChoicesInput/common/Choice/index.js +1 -1
  133. package/dist/cjs/f/fields/ChoicesInput/common/index.js +1 -1
  134. package/dist/cjs/f/fields/ChoicesInput/index.js +1 -1
  135. package/dist/cjs/f/fields/ChoicesInput/styles.scss +4 -4
  136. package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +25 -30
  137. package/dist/cjs/f/fields/QueryChoices/index.js +1 -1
  138. package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +19 -21
  139. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +12 -12
  140. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/index.js +1 -1
  141. package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +14 -17
  142. package/dist/cjs/f/fields/QueryCombobox/common/Menu/index.js +1 -1
  143. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +22 -26
  144. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/index.js +1 -1
  145. package/dist/cjs/f/fields/QueryCombobox/common/index.js +3 -3
  146. package/dist/cjs/f/fields/QueryCombobox/index.js +1 -1
  147. package/dist/cjs/f/fields/QueryCombobox/styles.scss +59 -59
  148. package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +11 -11
  149. package/dist/cjs/f/fields/QuerySelect/index.js +1 -1
  150. package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +8 -8
  151. package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +7 -7
  152. package/dist/cjs/f/fields/RatingsInput/common/Rating/index.js +1 -1
  153. package/dist/cjs/f/fields/RatingsInput/common/index.js +1 -1
  154. package/dist/cjs/f/fields/RatingsInput/index.js +1 -1
  155. package/dist/cjs/f/fields/RatingsInput/styles.scss +8 -9
  156. package/dist/cjs/f/fields/SelectInput/SelectInput.js +9 -9
  157. package/dist/cjs/f/fields/SelectInput/index.js +1 -1
  158. package/dist/cjs/f/fields/SelectInput/styles.scss +6 -6
  159. package/dist/cjs/f/fields/TextInput/TextInput.js +7 -7
  160. package/dist/cjs/f/fields/TextInput/index.js +1 -1
  161. package/dist/cjs/f/fields/TextInput/styles.scss +4 -4
  162. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +7 -7
  163. package/dist/cjs/f/fields/TextareaInput/index.js +1 -1
  164. package/dist/cjs/f/fields/TextareaInput/styles.scss +7 -6
  165. package/dist/cjs/f/fields/index.js +9 -9
  166. package/dist/cjs/f/index.js +3 -3
  167. package/dist/cjs/index.js +8 -8
  168. package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +7 -10
  169. package/dist/cjs/r/SwitchRouteMap/index.js +1 -1
  170. package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +13 -16
  171. package/dist/cjs/r/common/PrivateRoute/index.js +1 -1
  172. package/dist/cjs/r/common/index.js +1 -1
  173. package/dist/cjs/r/index.js +2 -2
  174. package/dist/cjs/test/QueryLoader/QueryLoader.js +4 -4
  175. package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +1 -1
  176. package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +4 -4
  177. package/dist/cjs/test/QueryLoader/common/PreloadedTestData/index.js +1 -1
  178. package/dist/cjs/test/QueryLoader/common/index.js +1 -1
  179. package/dist/cjs/test/QueryLoader/index.js +1 -1
  180. package/dist/cjs/test/index.js +1 -1
  181. package/dist/cjs/utils/hooks/index.js +2 -2
  182. package/dist/cjs/utils/hooks/useDynamicPosition.js +24 -24
  183. package/dist/cjs/utils/hooks/useWindowSize.js +6 -6
  184. package/dist/cjs/utils/index.js +2 -2
  185. package/dist/es/a/AppContext/ContextProvider.js +7 -8
  186. package/dist/es/a/AppContext/useTheme.js +1 -2
  187. package/dist/es/a/ContentTree/ContentTree.js +8 -9
  188. package/dist/es/a/ContentTree/common/Tree/Tree.js +8 -9
  189. package/dist/es/a/ContentTree/styles.scss +20 -20
  190. package/dist/es/a/Conversation/Conversation.js +11 -12
  191. package/dist/es/a/Conversation/common/Message/Message.js +12 -13
  192. package/dist/es/a/Conversation/styles.scss +1 -0
  193. package/dist/es/a/DotInfo/DotInfo.js +11 -12
  194. package/dist/es/a/Figure/Figure.js +8 -9
  195. package/dist/es/a/HamburgerButton/HamburgerButton.js +10 -11
  196. package/dist/es/a/IconList/IconList.js +9 -10
  197. package/dist/es/a/IconList/common/Item/Item.js +17 -20
  198. package/dist/es/a/Label/Label.js +9 -10
  199. package/dist/es/a/Label/styles.scss +18 -17
  200. package/dist/es/a/LoadingCircle/LoadingCircle.js +10 -11
  201. package/dist/es/a/LoadingCircle/styles.scss +35 -37
  202. package/dist/es/a/People/People.js +9 -10
  203. package/dist/es/a/People/common/Person/Person.js +24 -27
  204. package/dist/es/a/People/styles.scss +4 -4
  205. package/dist/es/a/Popover/Popover.js +14 -15
  206. package/dist/es/a/Popover/styles.scss +4 -3
  207. package/dist/es/a/ProgressBar/ProgressBar.js +10 -11
  208. package/dist/es/a/Quote/Quote.js +10 -11
  209. package/dist/es/a/Quote/styles.scss +41 -38
  210. package/dist/es/a/SVG/SVG.js +17 -18
  211. package/dist/es/a/SVG/common/UseSVG/UseSVG.js +19 -22
  212. package/dist/es/a/SnapScroller/SnapScroller.js +8 -9
  213. package/dist/es/a/SnapScroller/styles.scss +6 -4
  214. package/dist/es/a/Spinner/Spinner.js +7 -8
  215. package/dist/es/a/Timestamp/Timestamp.js +14 -15
  216. package/dist/es/a/index.js +0 -1
  217. package/dist/es/b/Button/Button.js +13 -14
  218. package/dist/es/b/Button/styles.scss +2 -2
  219. package/dist/es/b/Logo/Logo.js +12 -13
  220. package/dist/es/b/Logo/styles.scss +4 -2
  221. package/dist/es/b/Page/Page.js +10 -11
  222. package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +9 -11
  223. package/dist/es/b/Page/common/Section/Section.js +7 -8
  224. package/dist/es/b/Page/styles.scss +7 -6
  225. package/dist/es/b/SocialMediaButton/SocialMediaButton.js +11 -12
  226. package/dist/es/b/SocialMediaButton/styles.scss +1 -1
  227. package/dist/es/b/ThemeSelector/ThemeSelector.js +8 -9
  228. package/dist/es/b/Title/Title.js +27 -30
  229. package/dist/es/c/ContentSlides/ContentSlides.js +12 -15
  230. package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +11 -12
  231. package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +14 -15
  232. package/dist/es/c/ContentSlides/common/Sidebar/Sidebar.js +8 -9
  233. package/dist/es/c/ContentSlides/common/Slide/Slide.js +8 -9
  234. package/dist/es/c/ContentSlides/styles.scss +2 -4
  235. package/dist/es/c/Modal/Modal.js +10 -11
  236. package/dist/es/c/Modal/common/ModalHeader/ModalHeader.js +20 -23
  237. package/dist/es/c/Modal/styles.scss +7 -5
  238. package/dist/es/c/Shortener/Shortener.js +11 -12
  239. package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +9 -10
  240. package/dist/es/c/SocialMediaShareButton/styles.scss +3 -3
  241. package/dist/es/f/FormInput/FormInput.js +7 -8
  242. package/dist/es/f/FormInput/styles.scss +4 -4
  243. package/dist/es/f/common/Debugger/Debugger.js +7 -8
  244. package/dist/es/f/common/Description/Description.js +9 -10
  245. package/dist/es/f/common/Label/Label.js +11 -12
  246. package/dist/es/f/common/Label/styles.scss +1 -1
  247. package/dist/es/f/fields/Checkbox/Checkbox.js +11 -12
  248. package/dist/es/f/fields/Checkbox/styles.scss +9 -8
  249. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +17 -18
  250. package/dist/es/f/fields/ChoicesInput/common/Choice/Choice.js +13 -14
  251. package/dist/es/f/fields/ChoicesInput/styles.scss +4 -4
  252. package/dist/es/f/fields/QueryChoices/QueryChoices.js +16 -20
  253. package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +27 -31
  254. package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +22 -24
  255. package/dist/es/f/fields/QueryCombobox/common/Menu/Menu.js +22 -25
  256. package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +24 -26
  257. package/dist/es/f/fields/QueryCombobox/styles.scss +59 -59
  258. package/dist/es/f/fields/QuerySelect/QuerySelect.js +24 -28
  259. package/dist/es/f/fields/RatingsInput/RatingsInput.js +16 -17
  260. package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +15 -16
  261. package/dist/es/f/fields/RatingsInput/styles.scss +8 -9
  262. package/dist/es/f/fields/SelectInput/SelectInput.js +16 -17
  263. package/dist/es/f/fields/SelectInput/styles.scss +6 -6
  264. package/dist/es/f/fields/TextInput/TextInput.js +18 -19
  265. package/dist/es/f/fields/TextInput/styles.scss +4 -4
  266. package/dist/es/f/fields/TextareaInput/TextareaInput.js +20 -21
  267. package/dist/es/f/fields/TextareaInput/styles.scss +7 -6
  268. package/dist/es/r/SwitchRouteMap/SwitchRouteMap.js +15 -21
  269. package/dist/es/r/common/PrivateRoute/PrivateRoute.js +6 -7
  270. package/dist/es/test/QueryLoader/QueryLoader.js +1 -1
  271. package/dist/es/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +5 -6
  272. package/dist/es/utils/hooks/useDynamicPosition.js +9 -10
  273. package/dist/es/utils/hooks/useWindowSize.js +1 -2
  274. package/jest.config.js +5 -5
  275. package/package.json +44 -82
  276. package/src/stories/b/Page.stories.jsx +2 -1
  277. package/src/stories/original/Button.jsx +55 -0
  278. package/src/stories/original/Button.stories.js +39 -0
  279. package/src/stories/original/Header.jsx +64 -0
  280. package/src/stories/original/Header.stories.js +22 -0
  281. package/src/stories/original/Introduction.mdx +211 -0
  282. package/src/stories/original/Page.jsx +76 -0
  283. package/src/stories/original/Page.stories.js +26 -0
  284. package/src/stories/original/assets/code-brackets.svg +1 -0
  285. package/src/stories/original/assets/colors.svg +1 -0
  286. package/src/stories/original/assets/comments.svg +1 -0
  287. package/src/stories/original/assets/direction.svg +1 -0
  288. package/src/stories/original/assets/flow.svg +1 -0
  289. package/src/stories/original/assets/plugin.svg +1 -0
  290. package/src/stories/original/assets/repo.svg +1 -0
  291. package/src/stories/original/assets/stackalt.svg +1 -0
  292. package/src/stories/original/button.css +30 -0
  293. package/src/stories/original/header.css +32 -0
  294. package/src/stories/original/page.css +69 -0
  295. package/src/ui/a/ContentTree/styles.scss +20 -20
  296. package/src/ui/a/Conversation/styles.scss +1 -0
  297. package/src/ui/a/Label/styles.scss +18 -17
  298. package/src/ui/a/LoadingCircle/styles.scss +35 -37
  299. package/src/ui/a/People/styles.scss +4 -4
  300. package/src/ui/a/Popover/styles.scss +4 -3
  301. package/src/ui/a/Quote/styles.scss +41 -38
  302. package/src/ui/a/SnapScroller/styles.scss +6 -4
  303. package/src/ui/a/index.js +0 -1
  304. package/src/ui/b/Button/styles.scss +2 -2
  305. package/src/ui/b/Logo/styles.scss +4 -2
  306. package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +1 -1
  307. package/src/ui/b/Page/styles.scss +7 -6
  308. package/src/ui/b/SocialMediaButton/styles.scss +1 -1
  309. package/src/ui/c/ContentSlides/styles.scss +2 -4
  310. package/src/ui/c/Modal/styles.scss +7 -5
  311. package/src/ui/c/SocialMediaShareButton/styles.scss +3 -3
  312. package/src/ui/f/FormInput/styles.scss +4 -4
  313. package/src/ui/f/common/Label/styles.scss +1 -1
  314. package/src/ui/f/fields/Checkbox/styles.scss +9 -8
  315. package/src/ui/f/fields/ChoicesInput/styles.scss +4 -4
  316. package/src/ui/f/fields/QueryCombobox/styles.scss +59 -59
  317. package/src/ui/f/fields/RatingsInput/styles.scss +8 -9
  318. package/src/ui/f/fields/SelectInput/styles.scss +6 -6
  319. package/src/ui/f/fields/TextInput/styles.scss +4 -4
  320. package/src/ui/f/fields/TextareaInput/styles.scss +7 -6
  321. package/src/ui/test/QueryLoader/QueryLoader.jsx +1 -1
  322. package/{src → tests}/__snapshots__/Storyshots.test.js.snap +687 -301
  323. package/tests/staticStub.js +1 -0
  324. package/.storybook/manager-head.html +0 -6
  325. package/.storybook/preview-head.html +0 -5
  326. package/README.md +0 -1
  327. package/build-storybook.log +0 -2978
  328. package/config/CSSStub.js +0 -1
  329. package/dist/cjs/a/AnimatedCounter/AnimatedCounter.js +0 -105
  330. package/dist/cjs/a/AnimatedCounter/index.js +0 -13
  331. package/dist/cjs/a/AnimatedCounter/styles.scss +0 -16
  332. package/dist/es/a/AnimatedCounter/AnimatedCounter.js +0 -98
  333. package/dist/es/a/AnimatedCounter/index.js +0 -2
  334. package/dist/es/a/AnimatedCounter/styles.scss +0 -16
  335. package/postcss.config.js +0 -13
  336. package/relay.config.js +0 -12
  337. package/src/assets/images/Ellipse1.png +0 -0
  338. package/src/assets/images/Ellipse2.png +0 -0
  339. package/src/assets/images/Fundraising.svg +0 -40
  340. package/src/assets/images/ParetoSupport.svg +0 -190
  341. package/src/assets/images/ParetoWorld.svg +0 -207
  342. package/src/assets/images/Vector.png +0 -0
  343. package/src/assets/images/email-attach.svg +0 -1
  344. package/src/assets/images/email-delete.svg +0 -1
  345. package/src/assets/images/favicon.png +0 -0
  346. package/src/assets/images/onboarding/focus-on-strategic-work.webp +0 -0
  347. package/src/assets/images/onboarding/launch-project.webp +0 -0
  348. package/src/assets/images/onboarding/meet-pareto-partner.webp +0 -0
  349. package/src/assets/images/quality.png +0 -0
  350. package/src/assets/images/sprite.svg +0 -253
  351. package/src/assets/images/test +0 -1
  352. package/src/local.scss +0 -16
  353. package/src/stories/a/AnimatedCounter.stories.jsx +0 -34
  354. package/src/ui/a/AnimatedCounter/AnimatedCounter.jsx +0 -118
  355. package/src/ui/a/AnimatedCounter/index.js +0 -2
  356. package/src/ui/a/AnimatedCounter/styles.scss +0 -16
  357. /package/{src → tests}/Storyshots.test.js +0 -0
  358. /package/{config → tests}/global-setup.js +0 -0
  359. /package/{config → tests}/test-setup.js +0 -0
package/dist/cjs/index.js CHANGED
@@ -9,7 +9,7 @@ Object.keys(_r).forEach(function (key) {
9
9
  if (key in exports && exports[key] === _r[key]) return;
10
10
  Object.defineProperty(exports, key, {
11
11
  enumerable: true,
12
- get: function get() {
12
+ get: function () {
13
13
  return _r[key];
14
14
  }
15
15
  });
@@ -20,7 +20,7 @@ Object.keys(_a).forEach(function (key) {
20
20
  if (key in exports && exports[key] === _a[key]) return;
21
21
  Object.defineProperty(exports, key, {
22
22
  enumerable: true,
23
- get: function get() {
23
+ get: function () {
24
24
  return _a[key];
25
25
  }
26
26
  });
@@ -31,7 +31,7 @@ Object.keys(_b).forEach(function (key) {
31
31
  if (key in exports && exports[key] === _b[key]) return;
32
32
  Object.defineProperty(exports, key, {
33
33
  enumerable: true,
34
- get: function get() {
34
+ get: function () {
35
35
  return _b[key];
36
36
  }
37
37
  });
@@ -42,7 +42,7 @@ Object.keys(_c).forEach(function (key) {
42
42
  if (key in exports && exports[key] === _c[key]) return;
43
43
  Object.defineProperty(exports, key, {
44
44
  enumerable: true,
45
- get: function get() {
45
+ get: function () {
46
46
  return _c[key];
47
47
  }
48
48
  });
@@ -53,7 +53,7 @@ Object.keys(_d).forEach(function (key) {
53
53
  if (key in exports && exports[key] === _d[key]) return;
54
54
  Object.defineProperty(exports, key, {
55
55
  enumerable: true,
56
- get: function get() {
56
+ get: function () {
57
57
  return _d[key];
58
58
  }
59
59
  });
@@ -64,7 +64,7 @@ Object.keys(_f).forEach(function (key) {
64
64
  if (key in exports && exports[key] === _f[key]) return;
65
65
  Object.defineProperty(exports, key, {
66
66
  enumerable: true,
67
- get: function get() {
67
+ get: function () {
68
68
  return _f[key];
69
69
  }
70
70
  });
@@ -75,7 +75,7 @@ Object.keys(_utils).forEach(function (key) {
75
75
  if (key in exports && exports[key] === _utils[key]) return;
76
76
  Object.defineProperty(exports, key, {
77
77
  enumerable: true,
78
- get: function get() {
78
+ get: function () {
79
79
  return _utils[key];
80
80
  }
81
81
  });
@@ -86,7 +86,7 @@ Object.keys(_test).forEach(function (key) {
86
86
  if (key in exports && exports[key] === _test[key]) return;
87
87
  Object.defineProperty(exports, key, {
88
88
  enumerable: true,
89
- get: function get() {
89
+ get: function () {
90
90
  return _test[key];
91
91
  }
92
92
  });
@@ -8,30 +8,27 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _reactRouterDom = require("react-router-dom");
10
10
  var _common = require("../common");
11
- var _excluded = ["isPrivate"];
12
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
14
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
17
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
18
15
  /* eslint-disable react/no-children-prop */
19
16
  /**
20
17
  * **Dependencies : `react-router-dom.Router`,**
21
18
  * **`SessionContextProvider` in case you're using PrivateRoutes. **
22
19
  * `SwitchRouteMap` generates a routing `Switch` from an array of route Props
23
20
  */
24
- var SwitchRouteMap = _ref => {
25
- var {
21
+ const SwitchRouteMap = _ref => {
22
+ let {
26
23
  routes,
27
24
  NotFound
28
25
  } = _ref;
29
26
  return /*#__PURE__*/React.createElement(_reactRouterDom.Switch, {
30
27
  children: [...routes.map(_ref2 => {
31
- var {
32
- isPrivate
33
- } = _ref2,
34
- routeProps = _objectWithoutProperties(_ref2, _excluded);
28
+ let {
29
+ isPrivate,
30
+ ...routeProps
31
+ } = _ref2;
35
32
  return isPrivate ? /*#__PURE__*/React.createElement(_common.PrivateRoute, _extends({
36
33
  key: routeProps.path
37
34
  }, routeProps)) : /*#__PURE__*/React.createElement(_reactRouterDom.Route, _extends({
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "SwitchRouteMap", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _SwitchRouteMap.default;
10
10
  }
11
11
  });
@@ -7,15 +7,12 @@ exports.default = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _reactRouterDom = require("react-router-dom");
10
- var _excluded = ["component", "render", "test"];
11
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
13
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
16
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
17
14
  // import { SessionContext } from '..'
18
- var SessionContext = /*#__PURE__*/React.createContext({});
15
+ const SessionContext = /*#__PURE__*/React.createContext({});
19
16
 
20
17
  // Package-level Imports
21
18
  // import styleNames from 'style_names.scss'
@@ -30,23 +27,23 @@ var SessionContext = /*#__PURE__*/React.createContext({});
30
27
  * Please remember this is a front-end test, and is not equivalent to back-end permission checks.
31
28
  * This component is meant to be used alongside back-end checks.
32
29
  */
33
- var PrivateRoute = _ref => {
34
- var {
35
- component: Component,
36
- render: _render,
37
- test
38
- } = _ref,
39
- rest = _objectWithoutProperties(_ref, _excluded);
40
- var {
30
+ const PrivateRoute = _ref => {
31
+ let {
32
+ component: Component,
33
+ render,
34
+ test,
35
+ ...rest
36
+ } = _ref;
37
+ const {
41
38
  currentUserData: currentUser,
42
39
  loginPath
43
40
  } = (0, React.useContext)(SessionContext);
44
- var location = (0, _reactRouterDom.useLocation)();
41
+ const location = (0, _reactRouterDom.useLocation)();
45
42
  // console.log(me)
46
43
 
47
- var isUserAllowed = currentUser && test(currentUser);
44
+ const isUserAllowed = currentUser && test(currentUser);
48
45
  return /*#__PURE__*/React.createElement(_reactRouterDom.Route, _extends({}, rest, {
49
- render: props => isUserAllowed ? (_render === null || _render === void 0 ? void 0 : _render(props)) || /*#__PURE__*/React.createElement(Component, props) : /*#__PURE__*/React.createElement(_reactRouterDom.Redirect, {
46
+ render: props => isUserAllowed ? render?.(props) || /*#__PURE__*/React.createElement(Component, props) : /*#__PURE__*/React.createElement(_reactRouterDom.Redirect, {
50
47
  to: {
51
48
  pathname: loginPath,
52
49
  state: {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "PrivateRoute", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _PrivateRoute.default;
10
10
  }
11
11
  });
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "PrivateRoute", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _PrivateRoute.PrivateRoute;
10
10
  }
11
11
  });
@@ -8,7 +8,7 @@ var _exportNames = {
8
8
  };
9
9
  Object.defineProperty(exports, "SwitchRouteMap", {
10
10
  enumerable: true,
11
- get: function get() {
11
+ get: function () {
12
12
  return _SwitchRouteMap.SwitchRouteMap;
13
13
  }
14
14
  });
@@ -19,7 +19,7 @@ Object.keys(_common).forEach(function (key) {
19
19
  if (key in exports && exports[key] === _common[key]) return;
20
20
  Object.defineProperty(exports, key, {
21
21
  enumerable: true,
22
- get: function get() {
22
+ get: function () {
23
23
  return _common[key];
24
24
  }
25
25
  });
@@ -8,15 +8,15 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _reactRelay = require("react-relay");
9
9
  var _common = require("./common");
10
10
  var _QueryLoaderHelloQuery;
11
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
- var testQuery = _QueryLoaderHelloQuery !== void 0 ? _QueryLoaderHelloQuery : (_QueryLoaderHelloQuery = require("./__generated__/QueryLoaderHelloQuery.graphql"), _QueryLoaderHelloQuery.hash && _QueryLoaderHelloQuery.hash !== "b92d001ab0208bd484a99f77c274d5ef" && console.error("The definition of 'QueryLoaderHelloQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _QueryLoaderHelloQuery);
13
+ const testQuery = _QueryLoaderHelloQuery !== void 0 ? _QueryLoaderHelloQuery : (_QueryLoaderHelloQuery = require("./__generated__/QueryLoaderHelloQuery.graphql"), _QueryLoaderHelloQuery.hash && _QueryLoaderHelloQuery.hash !== "b92d001ab0208bd484a99f77c274d5ef" && console.error("The definition of 'QueryLoaderHelloQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _QueryLoaderHelloQuery);
14
14
 
15
15
  /**
16
16
  * This is the component description.
17
17
  */
18
- var QueryLoader = () => {
19
- var [queryReference, loadQuery] = (0, _reactRelay.useQueryLoader)(testQuery);
18
+ const QueryLoader = () => {
19
+ const [queryReference, loadQuery] = (0, _reactRelay.useQueryLoader)(testQuery);
20
20
  (0, React.useEffect)(() => {
21
21
  loadQuery({});
22
22
  }, []);
@@ -23,7 +23,7 @@ query QueryLoaderHelloQuery {
23
23
  hello
24
24
  }
25
25
  */
26
- var node /*: ConcreteRequest*/ = function () {
26
+ const node /*: ConcreteRequest*/ = function () {
27
27
  var v0 = [{
28
28
  "alias": null,
29
29
  "args": null,
@@ -8,20 +8,20 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _reactRelay = require("react-relay");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
13
  /* @pareto-engineering/generator-front 1.0.12 */
14
14
 
15
15
  /**
16
16
  * This is the component description.
17
17
  */
18
- var PreloadedTestData = _ref => {
19
- var {
18
+ const PreloadedTestData = _ref => {
19
+ let {
20
20
  query,
21
21
  queryReference
22
22
  // ...otherProps
23
23
  } = _ref;
24
- var data = (0, _reactRelay.usePreloadedQuery)(query, queryReference);
24
+ const data = (0, _reactRelay.usePreloadedQuery)(query, queryReference);
25
25
  return /*#__PURE__*/React.createElement("pre", null, JSON.stringify(data, null, 2));
26
26
  };
27
27
  PreloadedTestData.propTypes = {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "PreloadedTestData", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _PreloadedTestData.default;
10
10
  }
11
11
  });
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "PreloadedTestData", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _PreloadedTestData.PreloadedTestData;
10
10
  }
11
11
  });
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "QueryLoader", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _QueryLoader.default;
10
10
  }
11
11
  });
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "QueryLoader", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _QueryLoader.QueryLoader;
10
10
  }
11
11
  });
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "useDynamicPosition", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _useDynamicPosition.default;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "useWindowSize", {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _useWindowSize.default;
16
16
  }
17
17
  });
@@ -8,9 +8,9 @@ var _react = require("react");
8
8
  var _throttle = _interopRequireDefault(require("lodash/throttle"));
9
9
  var _useWindowSize = _interopRequireDefault(require("./useWindowSize"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- var verticalPositions = ['top', 'bottom'];
12
- var horizontalPositions = ['left', 'right'];
13
- var findCompatiblePositions = (primary, secondaryArray) => {
11
+ const verticalPositions = ['top', 'bottom'];
12
+ const horizontalPositions = ['left', 'right'];
13
+ const findCompatiblePositions = (primary, secondaryArray) => {
14
14
  if (verticalPositions.includes(primary)) {
15
15
  return secondaryArray.filter(secondary => horizontalPositions.includes(secondary));
16
16
  }
@@ -19,8 +19,8 @@ var findCompatiblePositions = (primary, secondaryArray) => {
19
19
  }
20
20
  return [];
21
21
  };
22
- var useDynamicPosition = _ref => {
23
- var {
22
+ const useDynamicPosition = _ref => {
23
+ let {
24
24
  elementRef,
25
25
  parentRef,
26
26
  preferredPrimaryOrder,
@@ -29,44 +29,44 @@ var useDynamicPosition = _ref => {
29
29
  offsetXPx,
30
30
  throttleMs = 200
31
31
  } = _ref;
32
- var isClient = typeof window === 'object';
33
- var {
32
+ const isClient = typeof window === 'object';
33
+ const {
34
34
  height: currentHeight,
35
35
  width: currentWidth
36
36
  } = (0, _useWindowSize.default)();
37
- var [primaryPosition, setPrimaryPosition] = (0, _react.useState)(preferredPrimaryOrder[0]);
38
- var compatibleSecondaryPositions = (0, _react.useMemo)(() => findCompatiblePositions(primaryPosition, preferredSecondaryOrder), [primaryPosition, preferredSecondaryOrder]);
39
- var [secondaryPosition, setSecondaryPosition] = (0, _react.useState)(compatibleSecondaryPositions[0]);
40
- var handle = (0, _react.useCallback)((0, _throttle.default)(() => {
41
- var parentNode = parentRef === null || parentRef === void 0 ? void 0 : parentRef.current;
42
- var elementNode = elementRef === null || elementRef === void 0 ? void 0 : elementRef.current;
43
- var {
37
+ const [primaryPosition, setPrimaryPosition] = (0, _react.useState)(preferredPrimaryOrder[0]);
38
+ const compatibleSecondaryPositions = (0, _react.useMemo)(() => findCompatiblePositions(primaryPosition, preferredSecondaryOrder), [primaryPosition, preferredSecondaryOrder]);
39
+ const [secondaryPosition, setSecondaryPosition] = (0, _react.useState)(compatibleSecondaryPositions[0]);
40
+ const handle = (0, _react.useCallback)((0, _throttle.default)(() => {
41
+ const parentNode = parentRef?.current;
42
+ const elementNode = elementRef?.current;
43
+ const {
44
44
  top: parentTop,
45
45
  bottom: parentBottom,
46
46
  right: parentRight,
47
47
  left: parentLeft
48
- } = (parentNode === null || parentNode === void 0 ? void 0 : parentNode.getBoundingClientRect()) || {};
49
- var {
48
+ } = parentNode?.getBoundingClientRect() || {};
49
+ const {
50
50
  width: elementWidth,
51
51
  height: elementHeight
52
- } = (elementNode === null || elementNode === void 0 ? void 0 : elementNode.getBoundingClientRect()) || {};
53
- var availablePositions = {
52
+ } = elementNode?.getBoundingClientRect() || {};
53
+ const availablePositions = {
54
54
  top: parentTop >= elementHeight,
55
55
  bottom: currentHeight - parentBottom >= elementHeight,
56
56
  right: parentRight >= elementWidth,
57
57
  left: currentWidth - parentLeft >= elementWidth
58
58
  };
59
- for (var i = 0; i < preferredPrimaryOrder.length; i += 1) {
60
- var position = preferredPrimaryOrder[i];
59
+ for (let i = 0; i < preferredPrimaryOrder.length; i += 1) {
60
+ const position = preferredPrimaryOrder[i];
61
61
  if (availablePositions[position]) {
62
62
  setPrimaryPosition(position);
63
63
  break;
64
64
  }
65
65
  }
66
- for (var _i = 0; _i < compatibleSecondaryPositions.length; _i += 1) {
67
- var _position = compatibleSecondaryPositions[_i];
68
- if (availablePositions[_position]) {
69
- setSecondaryPosition(_position);
66
+ for (let i = 0; i < compatibleSecondaryPositions.length; i += 1) {
67
+ const position = compatibleSecondaryPositions[i];
68
+ if (availablePositions[position]) {
69
+ setSecondaryPosition(position);
70
70
  break;
71
71
  }
72
72
  }
@@ -7,15 +7,15 @@ exports.default = void 0;
7
7
  var _react = require("react");
8
8
  var _debounce = _interopRequireDefault(require("lodash/debounce"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- var useWindowSize = function useWindowSize() {
11
- var debounceMs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 700;
12
- var isClient = typeof window === 'object';
13
- var getSize = () => ({
10
+ const useWindowSize = function () {
11
+ let debounceMs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 700;
12
+ const isClient = typeof window === 'object';
13
+ const getSize = () => ({
14
14
  width: isClient ? window.innerWidth : undefined,
15
15
  height: isClient ? window.innerHeight : undefined
16
16
  });
17
- var [windowSize, setWindowSize] = (0, _react.useState)(getSize);
18
- var handle = (0, _react.useCallback)((0, _debounce.default)(() => {
17
+ const [windowSize, setWindowSize] = (0, _react.useState)(getSize);
18
+ const handle = (0, _react.useCallback)((0, _debounce.default)(() => {
19
19
  setWindowSize(getSize());
20
20
  }, debounceMs));
21
21
  (0, _react.useEffect)(() => {
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "useDynamicPosition", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _hooks.useDynamicPosition;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "useWindowSize", {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _hooks.useWindowSize;
16
16
  }
17
17
  });
@@ -22,14 +22,13 @@ const reducer = (state, action) => {
22
22
  return state;
23
23
  }
24
24
  };
25
- const AppContextProvider = _ref => {
26
- let {
27
- children,
28
- initialTheme,
29
- config,
30
- initialState
31
- // ...otherProps
32
- } = _ref;
25
+ const AppContextProvider = ({
26
+ children,
27
+ initialTheme,
28
+ config,
29
+ initialState
30
+ // ...otherProps
31
+ }) => {
33
32
  const theme = useTheme(initialTheme);
34
33
  const [state, dispatch] = useReducer(reducer, initialState);
35
34
  return /*#__PURE__*/React.createElement(Context.Provider, {
@@ -1,6 +1,5 @@
1
1
  import { useCallback, useState, useEffect } from 'react';
2
- export default (function (initialTheme) {
3
- let storageKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'theme';
2
+ export default ((initialTheme, storageKey = 'theme') => {
4
3
  const isClient = typeof window === 'object';
5
4
  const [preferredTheme, setPreferredTheme] = useState(initialTheme);
6
5
  const [userTheme, setUserTheme] = useState();
@@ -12,15 +12,14 @@ const componentClassName = 'content-tree';
12
12
  /**
13
13
  * This is the component description.
14
14
  */
15
- const ContentTree = _ref => {
16
- let {
17
- id,
18
- className: userClassName,
19
- style,
20
- target,
21
- selectors
22
- // ...otherProps
23
- } = _ref;
15
+ const ContentTree = ({
16
+ id,
17
+ className: userClassName,
18
+ style,
19
+ target,
20
+ selectors
21
+ // ...otherProps
22
+ }) => {
24
23
  useLayoutEffect(() => {
25
24
  import("./styles.scss");
26
25
  }, []);
@@ -13,15 +13,14 @@ const componentClassName = 'tree';
13
13
  /**
14
14
  * This is the component description.
15
15
  */
16
- const Tree = _ref => {
17
- let {
18
- id,
19
- className: userClassName,
20
- style,
21
- tree,
22
- displayDepth
23
- // ...otherProps
24
- } = _ref;
16
+ const Tree = ({
17
+ id,
18
+ className: userClassName,
19
+ style,
20
+ tree,
21
+ displayDepth
22
+ // ...otherProps
23
+ }) => {
25
24
  // The nodeIds to be used to get the first visible node
26
25
  const [nodeIds, setNodeIds] = useState([]);
27
26
 
@@ -1,33 +1,33 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
+
2
3
  @use "@pareto-engineering/bem";
3
4
 
4
5
  $default-margin: 1em;
5
6
  $default-padding: 1em;
6
7
 
7
- .#{bem.$base}.content-tree{
8
+ .#{bem.$base}.content-tree {
9
+ ul {
10
+ list-style: none;
11
+ }
12
+
13
+ .#{bem.$base}.tree {
14
+ padding: 0;
15
+ position: sticky;
16
+ top: 0;
8
17
 
9
- ul {
10
- list-style: none;
18
+ .#{bem.$modifier-active} {
19
+ color: var(--main2);
20
+ transition: color .2s;
11
21
  }
12
22
 
13
- .#{bem.$base}.tree {
14
- position: sticky;
15
- top: 0;
16
- padding: 0;
17
-
18
- .#{bem.$modifier-active} {
19
- color: var(--main2);
20
- transition: color 0.2s;
21
- }
22
-
23
- li:not(:last-child) {
24
- margin-bottom: $default-margin;
25
- ul {
26
- padding-left: $default-padding;
27
- }
28
- }
23
+ li:not(:last-child) {
24
+ margin-bottom: $default-margin;
25
+
26
+ ul {
27
+ padding-left: $default-padding;
28
+ }
29
29
  }
30
+ }
30
31
  }
31
32
 
32
33
 
33
-
@@ -14,18 +14,17 @@ const componentClassName = 'conversation';
14
14
  /**
15
15
  * This is the component description.
16
16
  */
17
- const Conversation = _ref => {
18
- let {
19
- id,
20
- className: userClassName,
21
- style,
22
- backgroundColor,
23
- ourColor,
24
- theirColor,
25
- children,
26
- hasTriangle
27
- // ...otherProps
28
- } = _ref;
17
+ const Conversation = ({
18
+ id,
19
+ className: userClassName,
20
+ style,
21
+ backgroundColor,
22
+ ourColor,
23
+ theirColor,
24
+ children,
25
+ hasTriangle
26
+ // ...otherProps
27
+ }) => {
29
28
  useLayoutEffect(() => {
30
29
  import("./styles.scss");
31
30
  }, []);