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

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 (495) 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/{AnimatedCounter/AnimatedCounter.js → AnimatedBlobs/AnimatedBlobs.js} +41 -56
  6. package/dist/cjs/a/AnimatedBlobs/index.js +13 -0
  7. package/dist/cjs/a/AnimatedBlobs/styles.scss +87 -0
  8. package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +56 -0
  9. package/dist/cjs/a/AnimatedGradient/index.js +13 -0
  10. package/dist/cjs/a/AnimatedGradient/styles.scss +14 -0
  11. package/dist/cjs/a/AnimatedGradient/webGIRenderer.js +528 -0
  12. package/dist/cjs/a/AppContext/Context.js +1 -1
  13. package/dist/cjs/a/AppContext/ContextProvider.js +19 -15
  14. package/dist/cjs/a/AppContext/index.js +4 -4
  15. package/dist/cjs/a/AppContext/useTheme.js +7 -7
  16. package/dist/cjs/a/ContentTree/ContentTree.js +8 -8
  17. package/dist/cjs/a/ContentTree/common/Tree/Tree.js +12 -12
  18. package/dist/cjs/a/ContentTree/common/Tree/index.js +1 -1
  19. package/dist/cjs/a/ContentTree/common/index.js +3 -3
  20. package/dist/cjs/a/ContentTree/common/useContentTree.js +14 -14
  21. package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +10 -11
  22. package/dist/cjs/a/ContentTree/index.js +1 -1
  23. package/dist/cjs/a/ContentTree/styles.scss +20 -20
  24. package/dist/cjs/a/Conversation/Context.js +1 -1
  25. package/dist/cjs/a/Conversation/Conversation.js +7 -7
  26. package/dist/cjs/a/Conversation/common/Message/Message.js +8 -8
  27. package/dist/cjs/a/Conversation/common/Message/index.js +1 -1
  28. package/dist/cjs/a/Conversation/common/index.js +1 -1
  29. package/dist/cjs/a/Conversation/index.js +3 -3
  30. package/dist/cjs/a/Conversation/styles.scss +1 -0
  31. package/dist/cjs/a/DotInfo/DotInfo.js +11 -15
  32. package/dist/cjs/a/DotInfo/index.js +1 -1
  33. package/dist/cjs/a/Figure/Figure.js +6 -6
  34. package/dist/cjs/a/Figure/index.js +1 -1
  35. package/dist/cjs/a/HamburgerButton/HamburgerButton.js +17 -20
  36. package/dist/cjs/a/HamburgerButton/index.js +1 -1
  37. package/dist/cjs/a/IconList/IconList.js +19 -26
  38. package/dist/cjs/a/IconList/common/Item/Item.js +17 -24
  39. package/dist/cjs/a/IconList/common/Item/index.js +1 -1
  40. package/dist/cjs/a/IconList/common/index.js +1 -1
  41. package/dist/cjs/a/IconList/index.js +1 -1
  42. package/dist/cjs/a/Label/Label.js +19 -11
  43. package/dist/cjs/a/Label/index.js +1 -1
  44. package/dist/cjs/a/Label/styles.scss +22 -21
  45. package/dist/cjs/a/LoadingCircle/LoadingCircle.js +11 -15
  46. package/dist/cjs/a/LoadingCircle/index.js +1 -1
  47. package/dist/cjs/a/LoadingCircle/styles.scss +35 -37
  48. package/dist/cjs/a/MetaCard/MetaCard.js +60 -0
  49. package/dist/cjs/a/MetaCard/index.js +13 -0
  50. package/dist/cjs/a/MetaCard/styles.scss +30 -0
  51. package/dist/cjs/a/People/People.js +9 -13
  52. package/dist/cjs/a/People/common/Person/Person.js +7 -7
  53. package/dist/cjs/a/People/common/Person/index.js +1 -1
  54. package/dist/cjs/a/People/common/index.js +1 -1
  55. package/dist/cjs/a/People/index.js +1 -1
  56. package/dist/cjs/a/People/styles.scss +4 -4
  57. package/dist/cjs/a/Popover/Popover.js +10 -10
  58. package/dist/cjs/a/Popover/index.js +1 -1
  59. package/dist/cjs/a/Popover/styles.scss +4 -3
  60. package/dist/cjs/a/ProgressBar/ProgressBar.js +11 -15
  61. package/dist/cjs/a/ProgressBar/index.js +1 -1
  62. package/dist/cjs/a/Quote/Quote.js +7 -7
  63. package/dist/cjs/a/Quote/index.js +1 -1
  64. package/dist/cjs/a/Quote/styles.scss +41 -38
  65. package/dist/cjs/a/SVG/SVG.js +23 -26
  66. package/dist/cjs/a/SVG/common/UseSVG/UseSVG.js +9 -11
  67. package/dist/cjs/a/SVG/common/UseSVG/index.js +1 -1
  68. package/dist/cjs/a/SVG/common/index.js +1 -1
  69. package/dist/cjs/a/SVG/index.js +1 -1
  70. package/dist/cjs/a/SnapScroller/SnapScroller.js +6 -6
  71. package/dist/cjs/a/SnapScroller/index.js +1 -1
  72. package/dist/cjs/a/SnapScroller/styles.scss +22 -12
  73. package/dist/cjs/a/Spinner/Spinner.js +7 -7
  74. package/dist/cjs/a/Spinner/index.js +1 -1
  75. package/dist/cjs/a/TextSteps/TextSteps.js +70 -0
  76. package/dist/cjs/a/TextSteps/index.js +13 -0
  77. package/dist/cjs/a/TextSteps/styles.scss +29 -0
  78. package/dist/cjs/a/Timestamp/Timestamp.js +12 -12
  79. package/dist/cjs/a/Timestamp/index.js +1 -1
  80. package/dist/cjs/a/Tip/Tip.js +72 -0
  81. package/dist/cjs/a/Tip/index.js +13 -0
  82. package/dist/cjs/a/Tip/styles.scss +22 -0
  83. package/dist/cjs/a/index.js +53 -25
  84. package/dist/cjs/b/Button/Button.js +28 -26
  85. package/dist/cjs/b/Button/common/Group/Group.js +57 -0
  86. package/dist/cjs/b/Button/common/Group/index.js +13 -0
  87. package/dist/cjs/b/Button/common/Group/styles.scss +11 -0
  88. package/dist/cjs/b/Button/common/index.js +12 -0
  89. package/dist/cjs/b/Button/index.js +1 -1
  90. package/dist/cjs/b/Button/styles.scss +9 -2
  91. package/dist/cjs/b/Card/Card.js +74 -0
  92. package/dist/cjs/b/Card/common/Group/Group.js +73 -0
  93. package/dist/cjs/b/Card/common/Group/index.js +13 -0
  94. package/dist/cjs/b/Card/common/Group/styles.scss +42 -0
  95. package/dist/cjs/b/Card/common/Section/Section.js +59 -0
  96. package/dist/cjs/b/Card/common/Section/index.js +13 -0
  97. package/dist/cjs/b/Card/common/index.js +19 -0
  98. package/dist/cjs/b/Card/index.js +13 -0
  99. package/dist/cjs/b/Card/styles.scss +46 -0
  100. package/dist/cjs/b/Logo/Logo.js +13 -13
  101. package/dist/cjs/b/Logo/index.js +1 -1
  102. package/dist/cjs/b/Logo/styles.scss +4 -2
  103. package/dist/cjs/b/Page/Context.js +1 -1
  104. package/dist/cjs/b/Page/Page.js +25 -21
  105. package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +41 -45
  106. package/dist/cjs/b/Page/common/PageHelmet/index.js +1 -1
  107. package/dist/cjs/b/Page/common/Section/Section.js +25 -18
  108. package/dist/cjs/b/Page/common/Section/index.js +1 -1
  109. package/dist/cjs/b/Page/common/index.js +2 -2
  110. package/dist/cjs/b/Page/index.js +3 -3
  111. package/dist/cjs/b/Page/styles.scss +29 -7
  112. package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +21 -25
  113. package/dist/cjs/b/SocialMediaButton/index.js +1 -1
  114. package/dist/cjs/b/SocialMediaButton/styles.scss +2 -16
  115. package/dist/cjs/b/ThemeSelector/ThemeSelector.js +9 -9
  116. package/dist/cjs/b/ThemeSelector/index.js +1 -1
  117. package/dist/cjs/b/Title/Title.js +9 -6
  118. package/dist/cjs/b/Title/index.js +1 -1
  119. package/dist/cjs/b/index.js +14 -7
  120. package/dist/cjs/c/ContentSlides/ContentSlides.js +33 -30
  121. package/dist/cjs/c/ContentSlides/Context.js +1 -1
  122. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +8 -8
  123. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/index.js +1 -1
  124. package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +7 -7
  125. package/dist/cjs/c/ContentSlides/common/Navigator/index.js +1 -1
  126. package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +5 -5
  127. package/dist/cjs/c/ContentSlides/common/Sidebar/index.js +1 -1
  128. package/dist/cjs/c/ContentSlides/common/Slide/Slide.js +6 -6
  129. package/dist/cjs/c/ContentSlides/common/Slide/index.js +1 -1
  130. package/dist/cjs/c/ContentSlides/common/index.js +4 -4
  131. package/dist/cjs/c/ContentSlides/index.js +3 -3
  132. package/dist/cjs/c/ContentSlides/styles.scss +2 -4
  133. package/dist/cjs/c/Modal/Modal.js +6 -6
  134. package/dist/cjs/c/Modal/common/ModalHeader/ModalHeader.js +5 -5
  135. package/dist/cjs/c/Modal/common/ModalHeader/index.js +1 -1
  136. package/dist/cjs/c/Modal/common/index.js +1 -1
  137. package/dist/cjs/c/Modal/index.js +1 -1
  138. package/dist/cjs/c/Modal/styles.scss +9 -6
  139. package/dist/cjs/c/Shortener/Shortener.js +10 -10
  140. package/dist/cjs/c/Shortener/index.js +1 -1
  141. package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +12 -12
  142. package/dist/cjs/c/SocialMediaShareButton/index.js +1 -1
  143. package/dist/cjs/c/SocialMediaShareButton/styles.scss +3 -3
  144. package/dist/cjs/c/index.js +5 -5
  145. package/dist/cjs/f/FormInput/FormInput.js +14 -17
  146. package/dist/cjs/f/FormInput/index.js +1 -1
  147. package/dist/cjs/f/FormInput/styles.scss +4 -4
  148. package/dist/cjs/f/common/Debugger/Debugger.js +8 -8
  149. package/dist/cjs/f/common/Debugger/index.js +1 -1
  150. package/dist/cjs/f/common/Description/Description.js +8 -8
  151. package/dist/cjs/f/common/Description/index.js +1 -1
  152. package/dist/cjs/f/common/Label/Label.js +7 -7
  153. package/dist/cjs/f/common/Label/index.js +1 -1
  154. package/dist/cjs/f/common/Label/styles.scss +1 -1
  155. package/dist/cjs/f/common/index.js +3 -3
  156. package/dist/cjs/f/fields/Checkbox/Checkbox.js +7 -7
  157. package/dist/cjs/f/fields/Checkbox/index.js +1 -1
  158. package/dist/cjs/f/fields/Checkbox/styles.scss +9 -8
  159. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +26 -22
  160. package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +7 -7
  161. package/dist/cjs/f/fields/ChoicesInput/common/Choice/index.js +1 -1
  162. package/dist/cjs/f/fields/ChoicesInput/common/index.js +1 -1
  163. package/dist/cjs/f/fields/ChoicesInput/index.js +1 -1
  164. package/dist/cjs/f/fields/ChoicesInput/styles.scss +23 -35
  165. package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +25 -30
  166. package/dist/cjs/f/fields/QueryChoices/index.js +1 -1
  167. package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +20 -22
  168. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +12 -12
  169. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/index.js +1 -1
  170. package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +14 -17
  171. package/dist/cjs/f/fields/QueryCombobox/common/Menu/index.js +1 -1
  172. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +22 -26
  173. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/index.js +1 -1
  174. package/dist/cjs/f/fields/QueryCombobox/common/index.js +3 -3
  175. package/dist/cjs/f/fields/QueryCombobox/index.js +1 -1
  176. package/dist/cjs/f/fields/QueryCombobox/styles.scss +60 -59
  177. package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +11 -11
  178. package/dist/cjs/f/fields/QuerySelect/index.js +1 -1
  179. package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +9 -9
  180. package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +7 -7
  181. package/dist/cjs/f/fields/RatingsInput/common/Rating/index.js +1 -1
  182. package/dist/cjs/f/fields/RatingsInput/common/index.js +1 -1
  183. package/dist/cjs/f/fields/RatingsInput/index.js +1 -1
  184. package/dist/cjs/f/fields/RatingsInput/styles.scss +8 -9
  185. package/dist/cjs/f/fields/SelectInput/SelectInput.js +12 -12
  186. package/dist/cjs/f/fields/SelectInput/index.js +1 -1
  187. package/dist/cjs/f/fields/SelectInput/styles.scss +33 -23
  188. package/dist/cjs/f/fields/TextInput/TextInput.js +12 -10
  189. package/dist/cjs/f/fields/TextInput/index.js +1 -1
  190. package/dist/cjs/f/fields/TextInput/styles.scss +27 -18
  191. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +8 -8
  192. package/dist/cjs/f/fields/TextareaInput/index.js +1 -1
  193. package/dist/cjs/f/fields/TextareaInput/styles.scss +7 -6
  194. package/dist/cjs/f/fields/index.js +9 -9
  195. package/dist/cjs/f/index.js +3 -3
  196. package/dist/cjs/index.js +8 -8
  197. package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +7 -10
  198. package/dist/cjs/r/SwitchRouteMap/index.js +1 -1
  199. package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +13 -16
  200. package/dist/cjs/r/common/PrivateRoute/index.js +1 -1
  201. package/dist/cjs/r/common/index.js +1 -1
  202. package/dist/cjs/r/index.js +2 -2
  203. package/dist/cjs/test/QueryLoader/QueryLoader.js +4 -4
  204. package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +1 -1
  205. package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +4 -4
  206. package/dist/cjs/test/QueryLoader/common/PreloadedTestData/index.js +1 -1
  207. package/dist/cjs/test/QueryLoader/common/index.js +1 -1
  208. package/dist/cjs/test/QueryLoader/index.js +1 -1
  209. package/dist/cjs/test/index.js +1 -1
  210. package/dist/cjs/utils/hooks/index.js +2 -2
  211. package/dist/cjs/utils/hooks/useDynamicPosition.js +24 -24
  212. package/dist/cjs/utils/hooks/useWindowSize.js +6 -6
  213. package/dist/cjs/utils/index.js +2 -2
  214. package/dist/es/a/AnimatedBlobs/AnimatedBlobs.js +82 -0
  215. package/dist/es/a/AnimatedBlobs/index.js +1 -0
  216. package/dist/es/a/AnimatedBlobs/styles.scss +87 -0
  217. package/dist/es/a/AnimatedGradient/AnimatedGradient.js +48 -0
  218. package/dist/es/a/AnimatedGradient/index.js +1 -0
  219. package/dist/es/a/AnimatedGradient/styles.scss +14 -0
  220. package/dist/es/a/AnimatedGradient/webGIRenderer.js +492 -0
  221. package/dist/es/a/AppContext/ContextProvider.js +7 -8
  222. package/dist/es/a/AppContext/useTheme.js +1 -2
  223. package/dist/es/a/ContentTree/ContentTree.js +11 -12
  224. package/dist/es/a/ContentTree/common/Tree/Tree.js +8 -9
  225. package/dist/es/a/ContentTree/styles.scss +20 -20
  226. package/dist/es/a/Conversation/Conversation.js +13 -14
  227. package/dist/es/a/Conversation/common/Message/Message.js +12 -13
  228. package/dist/es/a/Conversation/styles.scss +1 -0
  229. package/dist/es/a/DotInfo/DotInfo.js +13 -14
  230. package/dist/es/a/Figure/Figure.js +10 -11
  231. package/dist/es/a/HamburgerButton/HamburgerButton.js +12 -13
  232. package/dist/es/a/IconList/IconList.js +11 -12
  233. package/dist/es/a/IconList/common/Item/Item.js +17 -20
  234. package/dist/es/a/Label/Label.js +22 -15
  235. package/dist/es/a/Label/styles.scss +22 -21
  236. package/dist/es/a/LoadingCircle/LoadingCircle.js +12 -13
  237. package/dist/es/a/LoadingCircle/styles.scss +35 -37
  238. package/dist/es/a/MetaCard/MetaCard.js +52 -0
  239. package/dist/es/a/MetaCard/index.js +1 -0
  240. package/dist/es/a/MetaCard/styles.scss +30 -0
  241. package/dist/es/a/People/People.js +11 -12
  242. package/dist/es/a/People/common/Person/Person.js +24 -27
  243. package/dist/es/a/People/styles.scss +4 -4
  244. package/dist/es/a/Popover/Popover.js +17 -18
  245. package/dist/es/a/Popover/styles.scss +4 -3
  246. package/dist/es/a/ProgressBar/ProgressBar.js +12 -13
  247. package/dist/es/a/Quote/Quote.js +12 -13
  248. package/dist/es/a/Quote/styles.scss +41 -38
  249. package/dist/es/a/SVG/SVG.js +19 -20
  250. package/dist/es/a/SVG/common/UseSVG/UseSVG.js +19 -22
  251. package/dist/es/a/SnapScroller/SnapScroller.js +10 -11
  252. package/dist/es/a/SnapScroller/styles.scss +22 -12
  253. package/dist/es/a/Spinner/Spinner.js +9 -10
  254. package/dist/es/a/TextSteps/TextSteps.js +61 -0
  255. package/dist/es/a/TextSteps/index.js +1 -0
  256. package/dist/es/a/TextSteps/styles.scss +29 -0
  257. package/dist/es/a/Timestamp/Timestamp.js +16 -17
  258. package/dist/es/a/Tip/Tip.js +64 -0
  259. package/dist/es/a/Tip/index.js +2 -0
  260. package/dist/es/a/Tip/styles.scss +22 -0
  261. package/dist/es/a/index.js +6 -2
  262. package/dist/es/b/Button/Button.js +25 -20
  263. package/dist/es/b/Button/common/Group/Group.js +49 -0
  264. package/dist/es/b/Button/common/Group/index.js +1 -0
  265. package/dist/es/b/Button/common/Group/styles.scss +11 -0
  266. package/dist/es/b/Button/common/index.js +1 -0
  267. package/dist/es/b/Button/styles.scss +9 -2
  268. package/dist/es/b/Card/Card.js +66 -0
  269. package/dist/es/b/Card/common/Group/Group.js +65 -0
  270. package/dist/es/b/Card/common/Group/index.js +1 -0
  271. package/dist/es/b/Card/common/Group/styles.scss +42 -0
  272. package/dist/es/b/Card/common/Section/Section.js +48 -0
  273. package/dist/es/b/Card/common/Section/index.js +1 -0
  274. package/dist/es/b/Card/common/index.js +2 -0
  275. package/dist/es/b/Card/index.js +1 -0
  276. package/dist/es/b/Card/styles.scss +46 -0
  277. package/dist/es/b/Logo/Logo.js +14 -15
  278. package/dist/es/b/Logo/styles.scss +4 -2
  279. package/dist/es/b/Page/Page.js +21 -15
  280. package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +9 -11
  281. package/dist/es/b/Page/common/Section/Section.js +19 -10
  282. package/dist/es/b/Page/styles.scss +29 -7
  283. package/dist/es/b/SocialMediaButton/SocialMediaButton.js +13 -14
  284. package/dist/es/b/SocialMediaButton/styles.scss +2 -16
  285. package/dist/es/b/ThemeSelector/ThemeSelector.js +10 -11
  286. package/dist/es/b/Title/Title.js +22 -19
  287. package/dist/es/b/index.js +2 -1
  288. package/dist/es/c/ContentSlides/ContentSlides.js +15 -18
  289. package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +11 -12
  290. package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +14 -15
  291. package/dist/es/c/ContentSlides/common/Sidebar/Sidebar.js +8 -9
  292. package/dist/es/c/ContentSlides/common/Slide/Slide.js +8 -9
  293. package/dist/es/c/ContentSlides/styles.scss +2 -4
  294. package/dist/es/c/Modal/Modal.js +12 -13
  295. package/dist/es/c/Modal/common/ModalHeader/ModalHeader.js +20 -23
  296. package/dist/es/c/Modal/styles.scss +9 -6
  297. package/dist/es/c/Shortener/Shortener.js +13 -14
  298. package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +11 -12
  299. package/dist/es/c/SocialMediaShareButton/styles.scss +3 -3
  300. package/dist/es/f/FormInput/FormInput.js +9 -10
  301. package/dist/es/f/FormInput/styles.scss +4 -4
  302. package/dist/es/f/common/Debugger/Debugger.js +9 -10
  303. package/dist/es/f/common/Description/Description.js +11 -12
  304. package/dist/es/f/common/Label/Label.js +13 -14
  305. package/dist/es/f/common/Label/styles.scss +1 -1
  306. package/dist/es/f/fields/Checkbox/Checkbox.js +13 -14
  307. package/dist/es/f/fields/Checkbox/styles.scss +9 -8
  308. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +33 -26
  309. package/dist/es/f/fields/ChoicesInput/common/Choice/Choice.js +13 -14
  310. package/dist/es/f/fields/ChoicesInput/styles.scss +23 -35
  311. package/dist/es/f/fields/QueryChoices/QueryChoices.js +16 -20
  312. package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +29 -33
  313. package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +22 -24
  314. package/dist/es/f/fields/QueryCombobox/common/Menu/Menu.js +22 -25
  315. package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +24 -26
  316. package/dist/es/f/fields/QueryCombobox/styles.scss +60 -59
  317. package/dist/es/f/fields/QuerySelect/QuerySelect.js +24 -28
  318. package/dist/es/f/fields/RatingsInput/RatingsInput.js +18 -19
  319. package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +15 -16
  320. package/dist/es/f/fields/RatingsInput/styles.scss +8 -9
  321. package/dist/es/f/fields/SelectInput/SelectInput.js +20 -21
  322. package/dist/es/f/fields/SelectInput/styles.scss +33 -23
  323. package/dist/es/f/fields/TextInput/TextInput.js +24 -23
  324. package/dist/es/f/fields/TextInput/styles.scss +27 -18
  325. package/dist/es/f/fields/TextareaInput/TextareaInput.js +22 -23
  326. package/dist/es/f/fields/TextareaInput/styles.scss +7 -6
  327. package/dist/es/r/SwitchRouteMap/SwitchRouteMap.js +15 -21
  328. package/dist/es/r/common/PrivateRoute/PrivateRoute.js +6 -7
  329. package/dist/es/test/QueryLoader/QueryLoader.js +1 -1
  330. package/dist/es/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +5 -6
  331. package/dist/es/utils/hooks/useDynamicPosition.js +9 -10
  332. package/dist/es/utils/hooks/useWindowSize.js +1 -2
  333. package/jest.config.js +5 -5
  334. package/package.json +44 -82
  335. package/src/stories/a/MetaCard.stories.jsx +35 -0
  336. package/src/stories/a/TextSteps.stories.jsx +19 -0
  337. package/src/stories/a/Tip.stories.jsx +28 -0
  338. package/src/stories/b/{Button.stories.jsx → Button/Button.stories.jsx} +15 -0
  339. package/src/stories/b/Button/Group.stories.jsx +35 -0
  340. package/src/stories/b/Card/Card.stories.jsx +59 -0
  341. package/src/stories/b/Card/Group.stories.jsx +59 -0
  342. package/src/stories/b/Page.stories.jsx +21 -4
  343. package/src/stories/colors.js +6 -6
  344. package/src/stories/f/SelectInput.stories.jsx +7 -0
  345. package/src/stories/f/TextInput.stories.jsx +4 -4
  346. package/src/stories/original/Button.jsx +55 -0
  347. package/src/stories/original/Button.stories.js +39 -0
  348. package/src/stories/original/Header.jsx +64 -0
  349. package/src/stories/original/Header.stories.js +22 -0
  350. package/src/stories/original/Introduction.mdx +211 -0
  351. package/src/stories/original/Page.jsx +76 -0
  352. package/src/stories/original/Page.stories.js +26 -0
  353. package/src/stories/original/assets/code-brackets.svg +1 -0
  354. package/src/stories/original/assets/colors.svg +1 -0
  355. package/src/stories/original/assets/comments.svg +1 -0
  356. package/src/stories/original/assets/direction.svg +1 -0
  357. package/src/stories/original/assets/flow.svg +1 -0
  358. package/src/stories/original/assets/plugin.svg +1 -0
  359. package/src/stories/original/assets/repo.svg +1 -0
  360. package/src/stories/original/assets/stackalt.svg +1 -0
  361. package/src/stories/original/button.css +30 -0
  362. package/src/stories/original/header.css +32 -0
  363. package/src/stories/original/page.css +69 -0
  364. package/src/ui/a/AnimatedBlobs/AnimatedBlobs.jsx +102 -0
  365. package/src/ui/a/AnimatedBlobs/index.js +1 -0
  366. package/src/ui/a/AnimatedBlobs/styles.scss +87 -0
  367. package/src/ui/a/AnimatedGradient/AnimatedGradient.jsx +69 -0
  368. package/src/ui/a/AnimatedGradient/index.js +1 -0
  369. package/src/ui/a/AnimatedGradient/styles.scss +14 -0
  370. package/src/ui/a/AnimatedGradient/webGIRenderer.js +541 -0
  371. package/src/ui/a/ContentTree/ContentTree.jsx +3 -3
  372. package/src/ui/a/ContentTree/styles.scss +20 -20
  373. package/src/ui/a/Conversation/Conversation.jsx +2 -2
  374. package/src/ui/a/Conversation/styles.scss +1 -0
  375. package/src/ui/a/DotInfo/DotInfo.jsx +2 -2
  376. package/src/ui/a/Figure/Figure.jsx +2 -2
  377. package/src/ui/a/HamburgerButton/HamburgerButton.jsx +2 -2
  378. package/src/ui/a/IconList/IconList.jsx +2 -2
  379. package/src/ui/a/Label/Label.jsx +13 -4
  380. package/src/ui/a/Label/styles.scss +22 -21
  381. package/src/ui/a/LoadingCircle/LoadingCircle.jsx +2 -2
  382. package/src/ui/a/LoadingCircle/styles.scss +35 -37
  383. package/src/ui/a/MetaCard/MetaCard.jsx +74 -0
  384. package/src/ui/a/MetaCard/index.js +1 -0
  385. package/src/ui/a/MetaCard/styles.scss +30 -0
  386. package/src/ui/a/People/People.jsx +2 -2
  387. package/src/ui/a/People/styles.scss +4 -4
  388. package/src/ui/a/Popover/Popover.jsx +3 -3
  389. package/src/ui/a/Popover/styles.scss +4 -3
  390. package/src/ui/a/ProgressBar/ProgressBar.jsx +2 -2
  391. package/src/ui/a/Quote/Quote.jsx +2 -2
  392. package/src/ui/a/Quote/styles.scss +41 -38
  393. package/src/ui/a/SVG/SVG.jsx +2 -2
  394. package/src/ui/a/SnapScroller/SnapScroller.jsx +2 -2
  395. package/src/ui/a/SnapScroller/styles.scss +22 -12
  396. package/src/ui/a/Spinner/Spinner.jsx +2 -2
  397. package/src/ui/a/TextSteps/TextSteps.jsx +87 -0
  398. package/src/ui/a/TextSteps/index.js +1 -0
  399. package/src/ui/a/TextSteps/styles.scss +29 -0
  400. package/src/ui/a/Timestamp/Timestamp.jsx +2 -2
  401. package/src/ui/a/Tip/Tip.jsx +88 -0
  402. package/src/ui/a/Tip/index.js +2 -0
  403. package/src/ui/a/Tip/styles.scss +22 -0
  404. package/src/ui/a/index.js +5 -1
  405. package/src/ui/b/Button/Button.jsx +14 -5
  406. package/src/ui/b/Button/common/Group/Group.jsx +71 -0
  407. package/src/ui/b/Button/common/Group/index.js +1 -0
  408. package/src/ui/b/Button/common/Group/styles.scss +11 -0
  409. package/src/ui/b/Button/common/index.js +1 -0
  410. package/src/ui/b/Button/styles.scss +9 -2
  411. package/src/ui/b/Card/Card.jsx +94 -0
  412. package/src/ui/b/Card/common/Group/Group.jsx +91 -0
  413. package/src/ui/b/Card/common/Group/index.js +1 -0
  414. package/src/ui/b/Card/common/Group/styles.scss +42 -0
  415. package/src/ui/b/Card/common/Section/Section.jsx +70 -0
  416. package/src/ui/b/Card/common/Section/index.js +1 -0
  417. package/src/ui/b/Card/common/index.js +2 -0
  418. package/src/ui/b/Card/index.js +1 -0
  419. package/src/ui/b/Card/styles.scss +46 -0
  420. package/src/ui/b/Logo/Logo.jsx +2 -2
  421. package/src/ui/b/Logo/styles.scss +4 -2
  422. package/src/ui/b/Page/Page.jsx +9 -3
  423. package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +1 -1
  424. package/src/ui/b/Page/common/Section/Section.jsx +16 -1
  425. package/src/ui/b/Page/styles.scss +29 -7
  426. package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +2 -2
  427. package/src/ui/b/SocialMediaButton/styles.scss +2 -16
  428. package/src/ui/b/ThemeSelector/ThemeSelector.jsx +2 -2
  429. package/src/ui/b/Title/Title.jsx +30 -23
  430. package/src/ui/b/index.js +1 -0
  431. package/src/ui/c/ContentSlides/ContentSlides.jsx +3 -3
  432. package/src/ui/c/ContentSlides/styles.scss +2 -4
  433. package/src/ui/c/Modal/Modal.jsx +2 -2
  434. package/src/ui/c/Modal/styles.scss +9 -6
  435. package/src/ui/c/Shortener/Shortener.jsx +2 -2
  436. package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +2 -2
  437. package/src/ui/c/SocialMediaShareButton/styles.scss +3 -3
  438. package/src/ui/f/FormInput/FormInput.jsx +2 -2
  439. package/src/ui/f/FormInput/styles.scss +4 -4
  440. package/src/ui/f/common/Debugger/Debugger.jsx +2 -2
  441. package/src/ui/f/common/Description/Description.jsx +2 -2
  442. package/src/ui/f/common/Label/Label.jsx +2 -2
  443. package/src/ui/f/common/Label/styles.scss +1 -1
  444. package/src/ui/f/fields/Checkbox/Checkbox.jsx +2 -2
  445. package/src/ui/f/fields/Checkbox/styles.scss +9 -8
  446. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +12 -7
  447. package/src/ui/f/fields/ChoicesInput/styles.scss +23 -35
  448. package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +2 -2
  449. package/src/ui/f/fields/QueryCombobox/styles.scss +60 -59
  450. package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +2 -2
  451. package/src/ui/f/fields/RatingsInput/styles.scss +8 -9
  452. package/src/ui/f/fields/SelectInput/SelectInput.jsx +4 -4
  453. package/src/ui/f/fields/SelectInput/styles.scss +33 -23
  454. package/src/ui/f/fields/TextInput/TextInput.jsx +13 -11
  455. package/src/ui/f/fields/TextInput/styles.scss +27 -18
  456. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +2 -2
  457. package/src/ui/f/fields/TextareaInput/styles.scss +7 -6
  458. package/src/ui/test/QueryLoader/QueryLoader.jsx +1 -1
  459. package/{src → tests}/__snapshots__/Storyshots.test.js.snap +3426 -1617
  460. package/tests/staticStub.js +1 -0
  461. package/.storybook/manager-head.html +0 -6
  462. package/.storybook/preview-head.html +0 -5
  463. package/README.md +0 -1
  464. package/build-storybook.log +0 -2978
  465. package/config/CSSStub.js +0 -1
  466. package/dist/cjs/a/AnimatedCounter/index.js +0 -13
  467. package/dist/cjs/a/AnimatedCounter/styles.scss +0 -16
  468. package/dist/es/a/AnimatedCounter/AnimatedCounter.js +0 -98
  469. package/dist/es/a/AnimatedCounter/index.js +0 -2
  470. package/dist/es/a/AnimatedCounter/styles.scss +0 -16
  471. package/postcss.config.js +0 -13
  472. package/relay.config.js +0 -12
  473. package/src/assets/images/Ellipse1.png +0 -0
  474. package/src/assets/images/Ellipse2.png +0 -0
  475. package/src/assets/images/Fundraising.svg +0 -40
  476. package/src/assets/images/ParetoSupport.svg +0 -190
  477. package/src/assets/images/ParetoWorld.svg +0 -207
  478. package/src/assets/images/Vector.png +0 -0
  479. package/src/assets/images/email-attach.svg +0 -1
  480. package/src/assets/images/email-delete.svg +0 -1
  481. package/src/assets/images/favicon.png +0 -0
  482. package/src/assets/images/onboarding/focus-on-strategic-work.webp +0 -0
  483. package/src/assets/images/onboarding/launch-project.webp +0 -0
  484. package/src/assets/images/onboarding/meet-pareto-partner.webp +0 -0
  485. package/src/assets/images/quality.png +0 -0
  486. package/src/assets/images/sprite.svg +0 -253
  487. package/src/assets/images/test +0 -1
  488. package/src/local.scss +0 -16
  489. package/src/stories/a/AnimatedCounter.stories.jsx +0 -34
  490. package/src/ui/a/AnimatedCounter/AnimatedCounter.jsx +0 -118
  491. package/src/ui/a/AnimatedCounter/index.js +0 -2
  492. package/src/ui/a/AnimatedCounter/styles.scss +0 -16
  493. /package/{src → tests}/Storyshots.test.js +0 -0
  494. /package/{config → tests}/global-setup.js +0 -0
  495. /package/{config → tests}/test-setup.js +0 -0
@@ -0,0 +1,541 @@
1
+ /* eslint-disable */
2
+ /*
3
+ * Stripe WebGl Gradient Animation
4
+ * All Credits to Stripe.com
5
+ * ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
6
+ * commented out for now.
7
+ * https://kevinhufnagl.com
8
+ */
9
+
10
+ // Converting colors to proper format
11
+ function normalizeColor(hexCode) {
12
+ return [(hexCode >> 16 & 255) / 255, (hexCode >> 8 & 255) / 255, (255 & hexCode) / 255]
13
+ } ['SCREEN', 'LINEAR_LIGHT'].reduce((hexCode, t, n) => Object.assign(hexCode, {
14
+ [t]:n,
15
+ }), {})
16
+
17
+ // Essential functionality of WebGl
18
+ // t = width
19
+ // n = height
20
+ class MiniGl {
21
+ constructor(canvas, width, height, debug = false) {
22
+ const _miniGl = this
23
+ const debug_output = document.location.search.toLowerCase().indexOf('debug=webgl') !== -1
24
+ _miniGl.canvas = canvas, _miniGl.gl = _miniGl.canvas.getContext('webgl', {
25
+ antialias:true,
26
+ }), _miniGl.meshes = []
27
+ const context = _miniGl.gl
28
+ width && height && this.setSize(width, height), _miniGl.lastDebugMsg, _miniGl.debug = debug && debug_output ? function (e) {
29
+ const t = new Date()
30
+ t - _miniGl.lastDebugMsg > 1e3 && console.log('---'), console.log(`${t.toLocaleTimeString() + Array(Math.max(0, 32 - e.length)).join(' ') + e}: `, ...Array.from(arguments).slice(1)), _miniGl.lastDebugMsg = t
31
+ } : () => { }, Object.defineProperties(_miniGl, {
32
+ Material:{
33
+ enumerable:false,
34
+ value :class {
35
+ constructor(vertexShaders, fragments, uniforms = {}) {
36
+ const material = this
37
+ function getShaderByType(type, source) {
38
+ const shader = context.createShader(type)
39
+ return context.shaderSource(shader, source), context.compileShader(shader), context.getShaderParameter(shader, context.COMPILE_STATUS) || console.error(context.getShaderInfoLog(shader)), _miniGl.debug('Material.compileShaderSource', {
40
+ source,
41
+ }), shader
42
+ }
43
+ function getUniformVariableDeclarations(uniforms, type) {
44
+ return Object.entries(uniforms).map(([uniform, value]) => value.getDeclaration(uniform, type)).join('\n')
45
+ }
46
+ material.uniforms = uniforms, material.uniformInstances = []
47
+
48
+ const prefix = '\n precision highp float;\n '
49
+ material.vertexSource = `\n ${prefix}\n attribute vec4 position;\n attribute vec2 uv;\n attribute vec2 uvNorm;\n ${getUniformVariableDeclarations(_miniGl.commonUniforms, 'vertex')}\n ${getUniformVariableDeclarations(uniforms, 'vertex')}\n ${vertexShaders}\n `,
50
+ material.Source = `\n ${prefix}\n ${getUniformVariableDeclarations(_miniGl.commonUniforms, 'fragment')}\n ${getUniformVariableDeclarations(uniforms, 'fragment')}\n ${fragments}\n `,
51
+ material.vertexShader = getShaderByType(context.VERTEX_SHADER, material.vertexSource),
52
+ material.fragmentShader = getShaderByType(context.FRAGMENT_SHADER, material.Source),
53
+ material.program = context.createProgram(),
54
+ context.attachShader(material.program, material.vertexShader),
55
+ context.attachShader(material.program, material.fragmentShader),
56
+ context.linkProgram(material.program),
57
+ context.getProgramParameter(material.program, context.LINK_STATUS) || console.error(context.getProgramInfoLog(material.program)),
58
+ context.useProgram(material.program),
59
+ material.attachUniforms(void 0, _miniGl.commonUniforms),
60
+ material.attachUniforms(void 0, material.uniforms)
61
+ }
62
+
63
+ // t = uniform
64
+ attachUniforms(name, uniforms) {
65
+ // n = material
66
+ const material = this
67
+ void 0 === name ? Object.entries(uniforms).forEach(([name, uniform]) => {
68
+ material.attachUniforms(name, uniform)
69
+ }) : uniforms.type == 'array' ? uniforms.value.forEach((uniform, i) => material.attachUniforms(`${name}[${i}]`, uniform)) : uniforms.type == 'struct' ? Object.entries(uniforms.value).forEach(([uniform, i]) => material.attachUniforms(`${name}.${uniform}`, i)) : (_miniGl.debug('Material.attachUniforms', {
70
+ name,
71
+ uniform:uniforms,
72
+ }), material.uniformInstances.push({
73
+ uniform :uniforms,
74
+ location:context.getUniformLocation(material.program, name),
75
+ }))
76
+ }
77
+ },
78
+ },
79
+ Uniform:{
80
+ enumerable:!1,
81
+ value :class {
82
+ constructor(e) {
83
+ this.type = 'float', Object.assign(this, e)
84
+ this.typeFn = {
85
+ float:'1f',
86
+ int :'1i',
87
+ vec2 :'2fv',
88
+ vec3 :'3fv',
89
+ vec4 :'4fv',
90
+ mat4 :'Matrix4fv',
91
+ }[this.type] || '1f', this.update()
92
+ }
93
+
94
+ update(value) {
95
+ void 0 !== this.value && context[`uniform${this.typeFn}`](value, this.typeFn.indexOf('Matrix') === 0 ? this.transpose : this.value, this.typeFn.indexOf('Matrix') === 0 ? this.value : null)
96
+ }
97
+
98
+ // e - name
99
+ // t - type
100
+ // n - length
101
+ getDeclaration(name, type, length) {
102
+ const uniform = this
103
+ if (uniform.excludeFrom !== type) {
104
+ if (uniform.type === 'array') return `${uniform.value[0].getDeclaration(name, type, uniform.value.length)}\nconst int ${name}_length = ${uniform.value.length};`
105
+ if (uniform.type === 'struct') {
106
+ let name_no_prefix = name.replace('u_', '')
107
+ return name_no_prefix = name_no_prefix.charAt(0).toUpperCase()
108
+ + name_no_prefix.slice(1),
109
+ `uniform struct ${name_no_prefix}
110
+ {\n${
111
+ Object.entries(uniform.value).map(([name, uniform]) => uniform.getDeclaration(name, type)
112
+ .replace(/^uniform/, ''))
113
+ .join('')
114
+ }\n} ${name}${length > 0 ? `[${length}]` : ''};`
115
+ }
116
+ return `uniform ${uniform.type} ${name}${length > 0 ? `[${length}]` : ''};`
117
+ }
118
+ }
119
+ },
120
+ },
121
+ PlaneGeometry:{
122
+ enumerable:!1,
123
+ value :class {
124
+ constructor(width, height, n, i, orientation) {
125
+ context.createBuffer(), this.attributes = {
126
+ position:new _miniGl.Attribute({
127
+ target:context.ARRAY_BUFFER,
128
+ size :3,
129
+ }),
130
+ uv:new _miniGl.Attribute({
131
+ target:context.ARRAY_BUFFER,
132
+ size :2,
133
+ }),
134
+ uvNorm:new _miniGl.Attribute({
135
+ target:context.ARRAY_BUFFER,
136
+ size :2,
137
+ }),
138
+ index:new _miniGl.Attribute({
139
+ target:context.ELEMENT_ARRAY_BUFFER,
140
+ size :3,
141
+ type :context.UNSIGNED_SHORT,
142
+ }),
143
+ }, this.setTopology(n, i), this.setSize(width, height, orientation)
144
+ }
145
+
146
+ setTopology(e = 1, t = 1) {
147
+ const n = this
148
+ n.xSegCount = e, n.ySegCount = t, n.vertexCount = (n.xSegCount + 1) * (n.ySegCount + 1), n.quadCount = n.xSegCount * n.ySegCount * 2, n.attributes.uv.values = new Float32Array(2 * n.vertexCount), n.attributes.uvNorm.values = new Float32Array(2 * n.vertexCount), n.attributes.index.values = new Uint16Array(3 * n.quadCount)
149
+ for (let e = 0; e <= n.ySegCount; e++) {
150
+ for (let t = 0; t <= n.xSegCount; t++) {
151
+ const i = e * (n.xSegCount + 1) + t
152
+ if (n.attributes.uv.values[2 * i] = t / n.xSegCount, n.attributes.uv.values[2 * i + 1] = 1 - e / n.ySegCount, n.attributes.uvNorm.values[2 * i] = t / n.xSegCount * 2 - 1, n.attributes.uvNorm.values[2 * i + 1] = 1 - e / n.ySegCount * 2, t < n.xSegCount && e < n.ySegCount) {
153
+ const s = e * n.xSegCount + t
154
+ n.attributes.index.values[6 * s] = i, n.attributes.index.values[6 * s + 1] = i + 1 + n.xSegCount, n.attributes.index.values[6 * s + 2] = i + 1, n.attributes.index.values[6 * s + 3] = i + 1, n.attributes.index.values[6 * s + 4] = i + 1 + n.xSegCount, n.attributes.index.values[6 * s + 5] = i + 2 + n.xSegCount
155
+ }
156
+ }
157
+ }
158
+ n.attributes.uv.update(), n.attributes.uvNorm.update(), n.attributes.index.update(), _miniGl.debug('Geometry.setTopology', {
159
+ uv :n.attributes.uv,
160
+ uvNorm:n.attributes.uvNorm,
161
+ index :n.attributes.index,
162
+ })
163
+ }
164
+
165
+ setSize(width = 1, height = 1, orientation = 'xz') {
166
+ const geometry = this
167
+ geometry.width = width,
168
+ geometry.height = height,
169
+ geometry.orientation = orientation,
170
+ geometry.attributes.position.values && geometry.attributes.position.values.length === 3 * geometry.vertexCount
171
+ || (geometry.attributes.position.values = new Float32Array(3 * geometry.vertexCount))
172
+ const o = width / -2
173
+ const r = height / -2
174
+ const segment_width = width / geometry.xSegCount
175
+ const segment_height = height / geometry.ySegCount
176
+ for (let yIndex = 0; yIndex <= geometry.ySegCount; yIndex++) {
177
+ const t = r + yIndex * segment_height
178
+ for (let xIndex = 0; xIndex <= geometry.xSegCount; xIndex++) {
179
+ const r = o + xIndex * segment_width
180
+ const l = yIndex * (geometry.xSegCount + 1) + xIndex
181
+ geometry.attributes.position.values[3 * l + 'xyz'.indexOf(orientation[0])] = r,
182
+ geometry.attributes.position.values[3 * l + 'xyz'.indexOf(orientation[1])] = -t
183
+ }
184
+ }
185
+ geometry.attributes.position.update(), _miniGl.debug('Geometry.setSize', {
186
+ position:geometry.attributes.position,
187
+ })
188
+ }
189
+ },
190
+ },
191
+ Mesh:{
192
+ enumerable:!1,
193
+ value :class {
194
+ constructor(geometry, material) {
195
+ const mesh = this
196
+ mesh.geometry = geometry, mesh.material = material, mesh.wireframe = !1, mesh.attributeInstances = [], Object.entries(mesh.geometry.attributes).forEach(([e, attribute]) => {
197
+ mesh.attributeInstances.push({
198
+ attribute,
199
+ location:attribute.attach(e, mesh.material.program),
200
+ })
201
+ }), _miniGl.meshes.push(mesh), _miniGl.debug('Mesh.constructor', {
202
+ mesh,
203
+ })
204
+ }
205
+
206
+ draw() {
207
+ context.useProgram(this.material.program), this.material.uniformInstances.forEach(({
208
+ uniform: e,
209
+ location: t,
210
+ }) => e.update(t)), this.attributeInstances.forEach(({
211
+ attribute: e,
212
+ location: t,
213
+ }) => e.use(t)), context.drawElements(this.wireframe ? context.LINES : context.TRIANGLES, this.geometry.attributes.index.values.length, context.UNSIGNED_SHORT, 0)
214
+ }
215
+
216
+ remove() {
217
+ _miniGl.meshes = _miniGl.meshes.filter((e) => e != this)
218
+ }
219
+ },
220
+ },
221
+ Attribute:{
222
+ enumerable:!1,
223
+ value :class {
224
+ constructor(e) {
225
+ this.type = context.FLOAT, this.normalized = !1, this.buffer = context.createBuffer(), Object.assign(this, e), this.update()
226
+ }
227
+
228
+ update() {
229
+ void 0 !== this.values && (context.bindBuffer(this.target, this.buffer), context.bufferData(this.target, this.values, context.STATIC_DRAW))
230
+ }
231
+
232
+ attach(e, t) {
233
+ const n = context.getAttribLocation(t, e)
234
+ return this.target === context.ARRAY_BUFFER && (context.enableVertexAttribArray(n), context.vertexAttribPointer(n, this.size, this.type, this.normalized, 0, 0)), n
235
+ }
236
+
237
+ use(e) {
238
+ context.bindBuffer(this.target, this.buffer), this.target === context.ARRAY_BUFFER && (context.enableVertexAttribArray(e), context.vertexAttribPointer(e, this.size, this.type, this.normalized, 0, 0))
239
+ }
240
+ },
241
+ },
242
+ })
243
+ const a = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
244
+ _miniGl.commonUniforms = {
245
+ projectionMatrix:new _miniGl.Uniform({
246
+ type :'mat4',
247
+ value:a,
248
+ }),
249
+ modelViewMatrix:new _miniGl.Uniform({
250
+ type :'mat4',
251
+ value:a,
252
+ }),
253
+ resolution:new _miniGl.Uniform({
254
+ type :'vec2',
255
+ value:[1, 1],
256
+ }),
257
+ aspectRatio:new _miniGl.Uniform({
258
+ type :'float',
259
+ value:1,
260
+ }),
261
+ }
262
+ }
263
+
264
+ setSize(e = 640, t = 480) {
265
+ this.width = e, this.height = t, this.canvas.width = e, this.canvas.height = t, this.gl.viewport(0, 0, e, t), this.commonUniforms.resolution.value = [e, t], this.commonUniforms.aspectRatio.value = e / t, this.debug('MiniGL.setSize', {
266
+ width :e,
267
+ height:t,
268
+ })
269
+ }
270
+
271
+ // left, right, top, bottom, near, far
272
+ setOrthographicCamera(e = 0, t = 0, n = 0, i = -2e3, s = 2e3) {
273
+ this.commonUniforms.projectionMatrix.value = [2 / this.width, 0, 0, 0, 0, 2 / this.height, 0, 0, 0, 0, 2 / (i - s), 0, e, t, n, 1], this.debug('setOrthographicCamera', this.commonUniforms.projectionMatrix.value)
274
+ }
275
+
276
+ render() {
277
+ this.gl.clearColor(0, 0, 0, 0), this.gl.clearDepth(1), this.meshes.forEach((e) => e.draw())
278
+ }
279
+ }
280
+
281
+ // Sets initial properties
282
+ function e(object, propertyName, val) {
283
+ return propertyName in object ? Object.defineProperty(object, propertyName, {
284
+ value :val,
285
+ enumerable :!0,
286
+ configurable:!0,
287
+ writable :!0,
288
+ }) : object[propertyName] = val, object
289
+ }
290
+
291
+ // Gradient object
292
+ class Gradient {
293
+ constructor(...t) {
294
+ e(this, 'el', void 0), e(this, 'cssVarRetries', 0), e(this, 'maxCssVarRetries', 200), e(this, 'angle', 0), e(this, 'isLoadedClass', !1), e(this, 'isScrolling', !1), /* e(this, "isStatic", o.disableAmbientAnimations()), */ e(this, 'scrollingTimeout', void 0), e(this, 'scrollingRefreshDelay', 200), e(this, 'isIntersecting', !1), e(this, 'shaderFiles', void 0), e(this, 'vertexShader', void 0), e(this, 'sectionColors', void 0), e(this, 'computedCanvasStyle', void 0), e(this, 'conf', void 0), e(this, 'uniforms', void 0), e(this, 't', 1253106), e(this, 'last', 0), e(this, 'width', void 0), e(this, 'minWidth', 1111), e(this, 'height', 600), e(this, 'xSegCount', void 0), e(this, 'ySegCount', void 0), e(this, 'mesh', void 0), e(this, 'material', void 0), e(this, 'geometry', void 0), e(this, 'minigl', void 0), e(this, 'scrollObserver', void 0), e(this, 'amp', 320), e(this, 'seed', 5), e(this, 'freqX', 14e-5), e(this, 'freqY', 29e-5), e(this, 'freqDelta', 1e-5), e(this, 'activeColors', [1, 1, 1, 1]), e(this, 'isMetaKey', !1), e(this, 'isGradientLegendVisible', !1), e(this, 'isMouseDown', !1), e(this, 'handleScroll', () => {
295
+ clearTimeout(this.scrollingTimeout), this.scrollingTimeout = setTimeout(this.handleScrollEnd, this.scrollingRefreshDelay), this.isGradientLegendVisible && this.hideGradientLegend(), this.conf.playing && (this.isScrolling = !0, this.pause())
296
+ }), e(this, 'handleScrollEnd', () => {
297
+ this.isScrolling = !1, this.isIntersecting && this.play()
298
+ }), e(this, 'resize', () => {
299
+ this.width = window.innerWidth, this.minigl.setSize(this.width, this.height), this.minigl.setOrthographicCamera(), this.xSegCount = Math.ceil(this.width * this.conf.density[0]), this.ySegCount = Math.ceil(this.height * this.conf.density[1]), this.mesh.geometry.setTopology(this.xSegCount, this.ySegCount), this.mesh.geometry.setSize(this.width, this.height), this.mesh.material.uniforms.u_shadow_power.value = this.width < 600 ? 5 : 6
300
+ }), e(this, 'handleMouseDown', (e) => {
301
+ this.isGradientLegendVisible && (this.isMetaKey = e.metaKey, this.isMouseDown = !0, !1 === this.conf.playing && requestAnimationFrame(this.animate))
302
+ }), e(this, 'handleMouseUp', () => {
303
+ this.isMouseDown = !1
304
+ }), e(this, 'animate', (e) => {
305
+ if (!this.shouldSkipFrame(e) || this.isMouseDown) {
306
+ if (this.t += Math.min(e - this.last, 1e3 / 15), this.last = e, this.isMouseDown) {
307
+ let e = 160
308
+ this.isMetaKey && (e = -160), this.t += e
309
+ }
310
+ this.mesh.material.uniforms.u_time.value = this.t, this.minigl.render()
311
+ }
312
+ if (this.last !== 0 && this.isStatic) return this.minigl.render(), void this.disconnect();
313
+ (/* this.isIntersecting && */this.conf.playing || this.isMouseDown) && requestAnimationFrame(this.animate)
314
+ }), e(this, 'addIsLoadedClass', () => {
315
+ /* this.isIntersecting && */!this.isLoadedClass && (this.isLoadedClass = !0, this.el.classList.add('isLoaded'), setTimeout(() => {
316
+ this.el.parentElement.classList.add('isLoaded')
317
+ }, 3e3))
318
+ }), e(this, 'pause', () => {
319
+ this.conf.playing = false
320
+ }), e(this, 'play', () => {
321
+ requestAnimationFrame(this.animate), this.conf.playing = true
322
+ }), e(this, 'initGradient', (selector) => {
323
+ this.el = document.querySelector(selector)
324
+ this.connect()
325
+ return this
326
+ })
327
+ }
328
+
329
+ async connect() {
330
+ this.shaderFiles = {
331
+ vertex :'varying vec3 v_color;\n\nvoid main() {\n float time = u_time * u_global.noiseSpeed;\n\n vec2 noiseCoord = resolution * uvNorm * u_global.noiseFreq;\n\n vec2 st = 1. - uvNorm.xy;\n\n //\n // Tilting the plane\n //\n\n // Front-to-back tilt\n float tilt = resolution.y / 2.0 * uvNorm.y;\n\n // Left-to-right angle\n float incline = resolution.x * uvNorm.x / 2.0 * u_vertDeform.incline;\n\n // Up-down shift to offset incline\n float offset = resolution.x / 2.0 * u_vertDeform.incline * mix(u_vertDeform.offsetBottom, u_vertDeform.offsetTop, uv.y);\n\n //\n // Vertex noise\n //\n\n float noise = snoise(vec3(\n noiseCoord.x * u_vertDeform.noiseFreq.x + time * u_vertDeform.noiseFlow,\n noiseCoord.y * u_vertDeform.noiseFreq.y,\n time * u_vertDeform.noiseSpeed + u_vertDeform.noiseSeed\n )) * u_vertDeform.noiseAmp;\n\n // Fade noise to zero at edges\n noise *= 1.0 - pow(abs(uvNorm.y), 2.0);\n\n // Clamp to 0\n noise = max(0.0, noise);\n\n vec3 pos = vec3(\n position.x,\n position.y + tilt + incline + noise - offset,\n position.z\n );\n\n //\n // Vertex color, to be passed to fragment shader\n //\n\n if (u_active_colors[0] == 1.) {\n v_color = u_baseColor;\n }\n\n for (int i = 0; i < u_waveLayers_length; i++) {\n if (u_active_colors[i + 1] == 1.) {\n WaveLayers layer = u_waveLayers[i];\n\n float noise = smoothstep(\n layer.noiseFloor,\n layer.noiseCeil,\n snoise(vec3(\n noiseCoord.x * layer.noiseFreq.x + time * layer.noiseFlow,\n noiseCoord.y * layer.noiseFreq.y,\n time * layer.noiseSpeed + layer.noiseSeed\n )) / 2.0 + 0.5\n );\n\n v_color = blendNormal(v_color, layer.color, pow(noise, 4.));\n }\n }\n\n //\n // Finish\n //\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);\n}',
332
+ noise :'//\n// Description : Array and textureless GLSL 2D/3D/4D simplex\n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n//\n\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nfloat snoise(vec3 v)\n{\n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i);\n vec4 p = permute( permute( permute(\n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n dot(p2,x2), dot(p3,x3) ) );\n}',
333
+ blend :'//\n// https://github.com/jamieowen/glsl-blend\n//\n\n// Normal\n\nvec3 blendNormal(vec3 base, vec3 blend) {\n\treturn blend;\n}\n\nvec3 blendNormal(vec3 base, vec3 blend, float opacity) {\n\treturn (blendNormal(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Screen\n\nfloat blendScreen(float base, float blend) {\n\treturn 1.0-((1.0-base)*(1.0-blend));\n}\n\nvec3 blendScreen(vec3 base, vec3 blend) {\n\treturn vec3(blendScreen(base.r,blend.r),blendScreen(base.g,blend.g),blendScreen(base.b,blend.b));\n}\n\nvec3 blendScreen(vec3 base, vec3 blend, float opacity) {\n\treturn (blendScreen(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Multiply\n\nvec3 blendMultiply(vec3 base, vec3 blend) {\n\treturn base*blend;\n}\n\nvec3 blendMultiply(vec3 base, vec3 blend, float opacity) {\n\treturn (blendMultiply(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Overlay\n\nfloat blendOverlay(float base, float blend) {\n\treturn base<0.5?(2.0*base*blend):(1.0-2.0*(1.0-base)*(1.0-blend));\n}\n\nvec3 blendOverlay(vec3 base, vec3 blend) {\n\treturn vec3(blendOverlay(base.r,blend.r),blendOverlay(base.g,blend.g),blendOverlay(base.b,blend.b));\n}\n\nvec3 blendOverlay(vec3 base, vec3 blend, float opacity) {\n\treturn (blendOverlay(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Hard light\n\nvec3 blendHardLight(vec3 base, vec3 blend) {\n\treturn blendOverlay(blend,base);\n}\n\nvec3 blendHardLight(vec3 base, vec3 blend, float opacity) {\n\treturn (blendHardLight(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Soft light\n\nfloat blendSoftLight(float base, float blend) {\n\treturn (blend<0.5)?(2.0*base*blend+base*base*(1.0-2.0*blend)):(sqrt(base)*(2.0*blend-1.0)+2.0*base*(1.0-blend));\n}\n\nvec3 blendSoftLight(vec3 base, vec3 blend) {\n\treturn vec3(blendSoftLight(base.r,blend.r),blendSoftLight(base.g,blend.g),blendSoftLight(base.b,blend.b));\n}\n\nvec3 blendSoftLight(vec3 base, vec3 blend, float opacity) {\n\treturn (blendSoftLight(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Color dodge\n\nfloat blendColorDodge(float base, float blend) {\n\treturn (blend==1.0)?blend:min(base/(1.0-blend),1.0);\n}\n\nvec3 blendColorDodge(vec3 base, vec3 blend) {\n\treturn vec3(blendColorDodge(base.r,blend.r),blendColorDodge(base.g,blend.g),blendColorDodge(base.b,blend.b));\n}\n\nvec3 blendColorDodge(vec3 base, vec3 blend, float opacity) {\n\treturn (blendColorDodge(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Color burn\n\nfloat blendColorBurn(float base, float blend) {\n\treturn (blend==0.0)?blend:max((1.0-((1.0-base)/blend)),0.0);\n}\n\nvec3 blendColorBurn(vec3 base, vec3 blend) {\n\treturn vec3(blendColorBurn(base.r,blend.r),blendColorBurn(base.g,blend.g),blendColorBurn(base.b,blend.b));\n}\n\nvec3 blendColorBurn(vec3 base, vec3 blend, float opacity) {\n\treturn (blendColorBurn(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Vivid Light\n\nfloat blendVividLight(float base, float blend) {\n\treturn (blend<0.5)?blendColorBurn(base,(2.0*blend)):blendColorDodge(base,(2.0*(blend-0.5)));\n}\n\nvec3 blendVividLight(vec3 base, vec3 blend) {\n\treturn vec3(blendVividLight(base.r,blend.r),blendVividLight(base.g,blend.g),blendVividLight(base.b,blend.b));\n}\n\nvec3 blendVividLight(vec3 base, vec3 blend, float opacity) {\n\treturn (blendVividLight(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Lighten\n\nfloat blendLighten(float base, float blend) {\n\treturn max(blend,base);\n}\n\nvec3 blendLighten(vec3 base, vec3 blend) {\n\treturn vec3(blendLighten(base.r,blend.r),blendLighten(base.g,blend.g),blendLighten(base.b,blend.b));\n}\n\nvec3 blendLighten(vec3 base, vec3 blend, float opacity) {\n\treturn (blendLighten(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Linear burn\n\nfloat blendLinearBurn(float base, float blend) {\n\t// Note : Same implementation as BlendSubtractf\n\treturn max(base+blend-1.0,0.0);\n}\n\nvec3 blendLinearBurn(vec3 base, vec3 blend) {\n\t// Note : Same implementation as BlendSubtract\n\treturn max(base+blend-vec3(1.0),vec3(0.0));\n}\n\nvec3 blendLinearBurn(vec3 base, vec3 blend, float opacity) {\n\treturn (blendLinearBurn(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Linear dodge\n\nfloat blendLinearDodge(float base, float blend) {\n\t// Note : Same implementation as BlendAddf\n\treturn min(base+blend,1.0);\n}\n\nvec3 blendLinearDodge(vec3 base, vec3 blend) {\n\t// Note : Same implementation as BlendAdd\n\treturn min(base+blend,vec3(1.0));\n}\n\nvec3 blendLinearDodge(vec3 base, vec3 blend, float opacity) {\n\treturn (blendLinearDodge(base, blend) * opacity + base * (1.0 - opacity));\n}\n\n// Linear light\n\nfloat blendLinearLight(float base, float blend) {\n\treturn blend<0.5?blendLinearBurn(base,(2.0*blend)):blendLinearDodge(base,(2.0*(blend-0.5)));\n}\n\nvec3 blendLinearLight(vec3 base, vec3 blend) {\n\treturn vec3(blendLinearLight(base.r,blend.r),blendLinearLight(base.g,blend.g),blendLinearLight(base.b,blend.b));\n}\n\nvec3 blendLinearLight(vec3 base, vec3 blend, float opacity) {\n\treturn (blendLinearLight(base, blend) * opacity + base * (1.0 - opacity));\n}',
334
+ fragment:'varying vec3 v_color;\n\nvoid main() {\n vec3 color = v_color;\n if (u_darken_top == 1.0) {\n vec2 st = gl_FragCoord.xy/resolution.xy;\n color.g -= pow(st.y + sin(-12.0) * st.x, u_shadow_power) * 0.4;\n }\n gl_FragColor = vec4(color, 1.0);\n}',
335
+ },
336
+ this.conf = {
337
+ presetName:'',
338
+ wireframe :false,
339
+ density :[0.06, 0.16],
340
+ zoom :1,
341
+ rotation :0,
342
+ playing :true,
343
+ },
344
+ document.querySelectorAll('canvas').length < 1 ? console.log('DID NOT LOAD HERO STRIPE CANVAS') : (
345
+
346
+ this.minigl = new MiniGl(this.el, null, null, !0),
347
+ requestAnimationFrame(() => {
348
+ this.el && (this.computedCanvasStyle = getComputedStyle(this.el), this.waitForCssVars())
349
+ })
350
+ /*
351
+ this.scrollObserver = await s.create(.1, !1),
352
+ this.scrollObserver.observe(this.el),
353
+ this.scrollObserver.onSeparate(() => {
354
+ window.removeEventListener("scroll", this.handleScroll), window.removeEventListener("mousedown", this.handleMouseDown), window.removeEventListener("mouseup", this.handleMouseUp), window.removeEventListener("keydown", this.handleKeyDown), this.isIntersecting = !1, this.conf.playing && this.pause()
355
+ }),
356
+ this.scrollObserver.onIntersect(() => {
357
+ window.addEventListener("scroll", this.handleScroll), window.addEventListener("mousedown", this.handleMouseDown), window.addEventListener("mouseup", this.handleMouseUp), window.addEventListener("keydown", this.handleKeyDown), this.isIntersecting = !0, this.addIsLoadedClass(), this.play()
358
+ }) */
359
+
360
+ )
361
+ }
362
+
363
+ disconnect() {
364
+ this.scrollObserver && (window.removeEventListener('scroll', this.handleScroll), window.removeEventListener('mousedown', this.handleMouseDown), window.removeEventListener('mouseup', this.handleMouseUp), window.removeEventListener('keydown', this.handleKeyDown), this.scrollObserver.disconnect()), window.removeEventListener('resize', this.resize)
365
+ }
366
+
367
+ initMaterial() {
368
+ this.uniforms = {
369
+ u_time:new this.minigl.Uniform({
370
+ value:0,
371
+ }),
372
+ u_shadow_power:new this.minigl.Uniform({
373
+ value:5,
374
+ }),
375
+ u_darken_top:new this.minigl.Uniform({
376
+ value:this.el.dataset.jsDarkenTop === '' ? 1 : 0,
377
+ }),
378
+ u_active_colors:new this.minigl.Uniform({
379
+ value:this.activeColors,
380
+ type :'vec4',
381
+ }),
382
+ u_global:new this.minigl.Uniform({
383
+ value:{
384
+ noiseFreq:new this.minigl.Uniform({
385
+ value:[this.freqX, this.freqY],
386
+ type :'vec2',
387
+ }),
388
+ noiseSpeed:new this.minigl.Uniform({
389
+ value:5e-6,
390
+ }),
391
+ },
392
+ type:'struct',
393
+ }),
394
+ u_vertDeform:new this.minigl.Uniform({
395
+ value:{
396
+ incline:new this.minigl.Uniform({
397
+ value:Math.sin(this.angle) / Math.cos(this.angle),
398
+ }),
399
+ offsetTop:new this.minigl.Uniform({
400
+ value:-0.5,
401
+ }),
402
+ offsetBottom:new this.minigl.Uniform({
403
+ value:-0.5,
404
+ }),
405
+ noiseFreq:new this.minigl.Uniform({
406
+ value:[3, 4],
407
+ type :'vec2',
408
+ }),
409
+ noiseAmp:new this.minigl.Uniform({
410
+ value:this.amp,
411
+ }),
412
+ noiseSpeed:new this.minigl.Uniform({
413
+ value:10,
414
+ }),
415
+ noiseFlow:new this.minigl.Uniform({
416
+ value:3,
417
+ }),
418
+ noiseSeed:new this.minigl.Uniform({
419
+ value:this.seed,
420
+ }),
421
+ },
422
+ type :'struct',
423
+ excludeFrom:'fragment',
424
+ }),
425
+ u_baseColor:new this.minigl.Uniform({
426
+ value :this.sectionColors[0],
427
+ type :'vec3',
428
+ excludeFrom:'fragment',
429
+ }),
430
+ u_waveLayers:new this.minigl.Uniform({
431
+ value :[],
432
+ excludeFrom:'fragment',
433
+ type :'array',
434
+ }),
435
+ }
436
+ for (let e = 1; e < this.sectionColors.length; e += 1) {
437
+ this.uniforms.u_waveLayers.value.push(new this.minigl.Uniform({
438
+ value:{
439
+ color:new this.minigl.Uniform({
440
+ value:this.sectionColors[e],
441
+ type :'vec3',
442
+ }),
443
+ noiseFreq:new this.minigl.Uniform({
444
+ value:[2 + e / this.sectionColors.length, 3 + e / this.sectionColors.length],
445
+ type :'vec2',
446
+ }),
447
+ noiseSpeed:new this.minigl.Uniform({
448
+ value:11 + 0.3 * e,
449
+ }),
450
+ noiseFlow:new this.minigl.Uniform({
451
+ value:6.5 + 0.3 * e,
452
+ }),
453
+ noiseSeed:new this.minigl.Uniform({
454
+ value:this.seed + 10 * e,
455
+ }),
456
+ noiseFloor:new this.minigl.Uniform({
457
+ value:0.1,
458
+ }),
459
+ noiseCeil:new this.minigl.Uniform({
460
+ value:0.63 + 0.07 * e,
461
+ }),
462
+ },
463
+ type:'struct',
464
+ }))
465
+ }
466
+ return this.vertexShader = [this.shaderFiles.noise, this.shaderFiles.blend, this.shaderFiles.vertex].join('\n\n'), new this.minigl.Material(this.vertexShader, this.shaderFiles.fragment, this.uniforms)
467
+ }
468
+
469
+ initMesh() {
470
+ this.material = this.initMaterial(), this.geometry = new this.minigl.PlaneGeometry(), this.mesh = new this.minigl.Mesh(this.geometry, this.material)
471
+ }
472
+
473
+ shouldSkipFrame(e) {
474
+ return !!window.document.hidden || (!this.conf.playing || (parseInt(e, 10) % 2 == 0 || void 0))
475
+ }
476
+
477
+ updateFrequency(e) {
478
+ this.freqX += e, this.freqY += e
479
+ }
480
+
481
+ toggleColor(index) {
482
+ this.activeColors[index] = this.activeColors[index] === 0 ? 1 : 0
483
+ }
484
+
485
+ showGradientLegend() {
486
+ this.width > this.minWidth && (this.isGradientLegendVisible = !0, document.body.classList.add('isGradientLegendVisible'))
487
+ }
488
+
489
+ hideGradientLegend() {
490
+ this.isGradientLegendVisible = !1, document.body.classList.remove('isGradientLegendVisible')
491
+ }
492
+
493
+ init() {
494
+ this.initGradientColors(), this.initMesh(), this.resize(), requestAnimationFrame(this.animate), window.addEventListener('resize', this.resize)
495
+ }
496
+
497
+ /*
498
+ * Waiting for the css variables to become available, usually on page load before we can continue.
499
+ * Using default colors assigned below if no variables have been found after maxCssVarRetries
500
+ */
501
+ waitForCssVars() {
502
+ if (this.computedCanvasStyle && this.computedCanvasStyle.getPropertyValue('--gradient-color-1').indexOf('#') !== -1) this.init(), this.addIsLoadedClass()
503
+ else {
504
+ if (this.cssVarRetries += 1, this.cssVarRetries > this.maxCssVarRetries) {
505
+ return this.sectionColors = [16711680, 16711680, 16711935, 65280, 255], void this.init()
506
+ }
507
+ requestAnimationFrame(() => this.waitForCssVars())
508
+ }
509
+ }
510
+
511
+ /*
512
+ * Initializes the four section colors by retrieving them from css variables.
513
+ */
514
+ initGradientColors() {
515
+ this.sectionColors = ['--gradient-color-1', '--gradient-color-2', '--gradient-color-3', '--gradient-color-4'].map((cssPropertyName) => {
516
+ let hex = this.computedCanvasStyle.getPropertyValue(cssPropertyName).trim()
517
+ // Check if shorthand hex value was used and double the length so the conversion in normalizeColor will work.
518
+ if (hex.length === 4) {
519
+ const hexTemp = hex.substr(1).split('').map((hexTemp) => hexTemp + hexTemp).join('')
520
+ hex = `#${hexTemp}`
521
+ }
522
+ return hex && `0x${hex.substr(1)}`
523
+ }).filter(Boolean).map(normalizeColor)
524
+ }
525
+ }
526
+
527
+ /*
528
+ *Finally initializing the Gradient class, assigning a canvas to it and calling Gradient.connect() which initializes everything,
529
+ * Use Gradient.pause() and Gradient.play() for controls.
530
+ *
531
+ * Here are some default property values you can change anytime:
532
+ * Amplitude: Gradient.amp = 0
533
+ * Colors: Gradient.sectionColors (if you change colors, use normalizeColor(#hexValue)) before you assign it.
534
+ *
535
+ *
536
+ * Useful functions
537
+ * Gradient.toggleColor(index)
538
+ * Gradient.updateFrequency(freq)
539
+ */
540
+
541
+ export { Gradient }
@@ -1,7 +1,7 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
- import { useLayoutEffect } from 'react'
4
+ import { useInsertionEffect } from 'react'
5
5
 
6
6
  import PropTypes from 'prop-types'
7
7
 
@@ -25,7 +25,7 @@ const ContentTree = ({
25
25
  selectors,
26
26
  // ...otherProps
27
27
  }) => {
28
- useLayoutEffect(() => {
28
+ useInsertionEffect(() => {
29
29
  import('./styles.scss')
30
30
  }, [])
31
31
 
@@ -77,7 +77,7 @@ ContentTree.propTypes = {
77
77
  */
78
78
  target:PropTypes.oneOfType([
79
79
  PropTypes.func,
80
- PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
80
+ PropTypes.shape({ current: PropTypes.node }),
81
81
  ]),
82
82
  }
83
83
 
@@ -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
-
@@ -1,7 +1,7 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
- import { useLayoutEffect } from 'react'
4
+ import { useInsertionEffect } from 'react'
5
5
 
6
6
  import PropTypes from 'prop-types'
7
7
 
@@ -31,7 +31,7 @@ const Conversation = ({
31
31
  hasTriangle,
32
32
  // ...otherProps
33
33
  }) => {
34
- useLayoutEffect(() => {
34
+ useInsertionEffect(() => {
35
35
  import('./styles.scss')
36
36
  }, [])
37
37
 
@@ -1,4 +1,5 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
+ /* stylelint-disable selector-max-compound-selectors -- exception */
2
3
 
3
4
  @use "@pareto-engineering/bem";
4
5
  @use "@pareto-engineering/styles/src/mixins";