@pareto-engineering/design-system 3.0.0-alpha.28 → 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 -81
  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,492 @@
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
+ }
14
+ ['SCREEN', 'LINEAR_LIGHT'].reduce((hexCode, t, n) => Object.assign(hexCode, {
15
+ [t]: n
16
+ }), {});
17
+
18
+ // Essential functionality of WebGl
19
+ // t = width
20
+ // n = height
21
+ class MiniGl {
22
+ constructor(canvas, width, height, debug = false) {
23
+ const _miniGl = this;
24
+ const debug_output = document.location.search.toLowerCase().indexOf('debug=webgl') !== -1;
25
+ _miniGl.canvas = canvas, _miniGl.gl = _miniGl.canvas.getContext('webgl', {
26
+ antialias: true
27
+ }), _miniGl.meshes = [];
28
+ const context = _miniGl.gl;
29
+ width && height && this.setSize(width, height), _miniGl.lastDebugMsg, _miniGl.debug = debug && debug_output ? function (e) {
30
+ const t = new Date();
31
+ 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;
32
+ } : () => {}, Object.defineProperties(_miniGl, {
33
+ Material: {
34
+ enumerable: false,
35
+ value: class {
36
+ constructor(vertexShaders, fragments, uniforms = {}) {
37
+ const material = this;
38
+ function getShaderByType(type, source) {
39
+ const shader = context.createShader(type);
40
+ return context.shaderSource(shader, source), context.compileShader(shader), context.getShaderParameter(shader, context.COMPILE_STATUS) || console.error(context.getShaderInfoLog(shader)), _miniGl.debug('Material.compileShaderSource', {
41
+ source
42
+ }), shader;
43
+ }
44
+ function getUniformVariableDeclarations(uniforms, type) {
45
+ return Object.entries(uniforms).map(([uniform, value]) => value.getDeclaration(uniform, type)).join('\n');
46
+ }
47
+ material.uniforms = uniforms, material.uniformInstances = [];
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 `, material.Source = `\n ${prefix}\n ${getUniformVariableDeclarations(_miniGl.commonUniforms, 'fragment')}\n ${getUniformVariableDeclarations(uniforms, 'fragment')}\n ${fragments}\n `, material.vertexShader = getShaderByType(context.VERTEX_SHADER, material.vertexSource), material.fragmentShader = getShaderByType(context.FRAGMENT_SHADER, material.Source), material.program = context.createProgram(), context.attachShader(material.program, material.vertexShader), context.attachShader(material.program, material.fragmentShader), context.linkProgram(material.program), context.getProgramParameter(material.program, context.LINK_STATUS) || console.error(context.getProgramInfoLog(material.program)), context.useProgram(material.program), material.attachUniforms(void 0, _miniGl.commonUniforms), material.attachUniforms(void 0, material.uniforms);
50
+ }
51
+
52
+ // t = uniform
53
+ attachUniforms(name, uniforms) {
54
+ // n = material
55
+ const material = this;
56
+ void 0 === name ? Object.entries(uniforms).forEach(([name, uniform]) => {
57
+ material.attachUniforms(name, uniform);
58
+ }) : 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', {
59
+ name,
60
+ uniform: uniforms
61
+ }), material.uniformInstances.push({
62
+ uniform: uniforms,
63
+ location: context.getUniformLocation(material.program, name)
64
+ }));
65
+ }
66
+ }
67
+ },
68
+ Uniform: {
69
+ enumerable: !1,
70
+ value: class {
71
+ constructor(e) {
72
+ this.type = 'float', Object.assign(this, e);
73
+ this.typeFn = {
74
+ float: '1f',
75
+ int: '1i',
76
+ vec2: '2fv',
77
+ vec3: '3fv',
78
+ vec4: '4fv',
79
+ mat4: 'Matrix4fv'
80
+ }[this.type] || '1f', this.update();
81
+ }
82
+ update(value) {
83
+ 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);
84
+ }
85
+
86
+ // e - name
87
+ // t - type
88
+ // n - length
89
+ getDeclaration(name, type, length) {
90
+ const uniform = this;
91
+ if (uniform.excludeFrom !== type) {
92
+ if (uniform.type === 'array') return `${uniform.value[0].getDeclaration(name, type, uniform.value.length)}\nconst int ${name}_length = ${uniform.value.length};`;
93
+ if (uniform.type === 'struct') {
94
+ let name_no_prefix = name.replace('u_', '');
95
+ return name_no_prefix = name_no_prefix.charAt(0).toUpperCase() + name_no_prefix.slice(1), `uniform struct ${name_no_prefix}
96
+ {\n${Object.entries(uniform.value).map(([name, uniform]) => uniform.getDeclaration(name, type).replace(/^uniform/, '')).join('')}\n} ${name}${length > 0 ? `[${length}]` : ''};`;
97
+ }
98
+ return `uniform ${uniform.type} ${name}${length > 0 ? `[${length}]` : ''};`;
99
+ }
100
+ }
101
+ }
102
+ },
103
+ PlaneGeometry: {
104
+ enumerable: !1,
105
+ value: class {
106
+ constructor(width, height, n, i, orientation) {
107
+ context.createBuffer(), this.attributes = {
108
+ position: new _miniGl.Attribute({
109
+ target: context.ARRAY_BUFFER,
110
+ size: 3
111
+ }),
112
+ uv: new _miniGl.Attribute({
113
+ target: context.ARRAY_BUFFER,
114
+ size: 2
115
+ }),
116
+ uvNorm: new _miniGl.Attribute({
117
+ target: context.ARRAY_BUFFER,
118
+ size: 2
119
+ }),
120
+ index: new _miniGl.Attribute({
121
+ target: context.ELEMENT_ARRAY_BUFFER,
122
+ size: 3,
123
+ type: context.UNSIGNED_SHORT
124
+ })
125
+ }, this.setTopology(n, i), this.setSize(width, height, orientation);
126
+ }
127
+ setTopology(e = 1, t = 1) {
128
+ const n = this;
129
+ 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);
130
+ for (let e = 0; e <= n.ySegCount; e++) {
131
+ for (let t = 0; t <= n.xSegCount; t++) {
132
+ const i = e * (n.xSegCount + 1) + t;
133
+ 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) {
134
+ const s = e * n.xSegCount + t;
135
+ 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;
136
+ }
137
+ }
138
+ }
139
+ n.attributes.uv.update(), n.attributes.uvNorm.update(), n.attributes.index.update(), _miniGl.debug('Geometry.setTopology', {
140
+ uv: n.attributes.uv,
141
+ uvNorm: n.attributes.uvNorm,
142
+ index: n.attributes.index
143
+ });
144
+ }
145
+ setSize(width = 1, height = 1, orientation = 'xz') {
146
+ const geometry = this;
147
+ geometry.width = width, geometry.height = height, geometry.orientation = orientation, geometry.attributes.position.values && geometry.attributes.position.values.length === 3 * geometry.vertexCount || (geometry.attributes.position.values = new Float32Array(3 * geometry.vertexCount));
148
+ const o = width / -2;
149
+ const r = height / -2;
150
+ const segment_width = width / geometry.xSegCount;
151
+ const segment_height = height / geometry.ySegCount;
152
+ for (let yIndex = 0; yIndex <= geometry.ySegCount; yIndex++) {
153
+ const t = r + yIndex * segment_height;
154
+ for (let xIndex = 0; xIndex <= geometry.xSegCount; xIndex++) {
155
+ const r = o + xIndex * segment_width;
156
+ const l = yIndex * (geometry.xSegCount + 1) + xIndex;
157
+ geometry.attributes.position.values[3 * l + 'xyz'.indexOf(orientation[0])] = r, geometry.attributes.position.values[3 * l + 'xyz'.indexOf(orientation[1])] = -t;
158
+ }
159
+ }
160
+ geometry.attributes.position.update(), _miniGl.debug('Geometry.setSize', {
161
+ position: geometry.attributes.position
162
+ });
163
+ }
164
+ }
165
+ },
166
+ Mesh: {
167
+ enumerable: !1,
168
+ value: class {
169
+ constructor(geometry, material) {
170
+ const mesh = this;
171
+ mesh.geometry = geometry, mesh.material = material, mesh.wireframe = !1, mesh.attributeInstances = [], Object.entries(mesh.geometry.attributes).forEach(([e, attribute]) => {
172
+ mesh.attributeInstances.push({
173
+ attribute,
174
+ location: attribute.attach(e, mesh.material.program)
175
+ });
176
+ }), _miniGl.meshes.push(mesh), _miniGl.debug('Mesh.constructor', {
177
+ mesh
178
+ });
179
+ }
180
+ draw() {
181
+ context.useProgram(this.material.program), this.material.uniformInstances.forEach(({
182
+ uniform: e,
183
+ location: t
184
+ }) => e.update(t)), this.attributeInstances.forEach(({
185
+ attribute: e,
186
+ location: t
187
+ }) => e.use(t)), context.drawElements(this.wireframe ? context.LINES : context.TRIANGLES, this.geometry.attributes.index.values.length, context.UNSIGNED_SHORT, 0);
188
+ }
189
+ remove() {
190
+ _miniGl.meshes = _miniGl.meshes.filter(e => e != this);
191
+ }
192
+ }
193
+ },
194
+ Attribute: {
195
+ enumerable: !1,
196
+ value: class {
197
+ constructor(e) {
198
+ this.type = context.FLOAT, this.normalized = !1, this.buffer = context.createBuffer(), Object.assign(this, e), this.update();
199
+ }
200
+ update() {
201
+ void 0 !== this.values && (context.bindBuffer(this.target, this.buffer), context.bufferData(this.target, this.values, context.STATIC_DRAW));
202
+ }
203
+ attach(e, t) {
204
+ const n = context.getAttribLocation(t, e);
205
+ return this.target === context.ARRAY_BUFFER && (context.enableVertexAttribArray(n), context.vertexAttribPointer(n, this.size, this.type, this.normalized, 0, 0)), n;
206
+ }
207
+ use(e) {
208
+ 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));
209
+ }
210
+ }
211
+ }
212
+ });
213
+ const a = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
214
+ _miniGl.commonUniforms = {
215
+ projectionMatrix: new _miniGl.Uniform({
216
+ type: 'mat4',
217
+ value: a
218
+ }),
219
+ modelViewMatrix: new _miniGl.Uniform({
220
+ type: 'mat4',
221
+ value: a
222
+ }),
223
+ resolution: new _miniGl.Uniform({
224
+ type: 'vec2',
225
+ value: [1, 1]
226
+ }),
227
+ aspectRatio: new _miniGl.Uniform({
228
+ type: 'float',
229
+ value: 1
230
+ })
231
+ };
232
+ }
233
+ setSize(e = 640, t = 480) {
234
+ 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', {
235
+ width: e,
236
+ height: t
237
+ });
238
+ }
239
+
240
+ // left, right, top, bottom, near, far
241
+ setOrthographicCamera(e = 0, t = 0, n = 0, i = -2e3, s = 2e3) {
242
+ 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);
243
+ }
244
+ render() {
245
+ this.gl.clearColor(0, 0, 0, 0), this.gl.clearDepth(1), this.meshes.forEach(e => e.draw());
246
+ }
247
+ }
248
+
249
+ // Sets initial properties
250
+ function e(object, propertyName, val) {
251
+ return propertyName in object ? Object.defineProperty(object, propertyName, {
252
+ value: val,
253
+ enumerable: !0,
254
+ configurable: !0,
255
+ writable: !0
256
+ }) : object[propertyName] = val, object;
257
+ }
258
+
259
+ // Gradient object
260
+ class Gradient {
261
+ constructor(...t) {
262
+ 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', () => {
263
+ clearTimeout(this.scrollingTimeout), this.scrollingTimeout = setTimeout(this.handleScrollEnd, this.scrollingRefreshDelay), this.isGradientLegendVisible && this.hideGradientLegend(), this.conf.playing && (this.isScrolling = !0, this.pause());
264
+ }), e(this, 'handleScrollEnd', () => {
265
+ this.isScrolling = !1, this.isIntersecting && this.play();
266
+ }), e(this, 'resize', () => {
267
+ 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;
268
+ }), e(this, 'handleMouseDown', e => {
269
+ this.isGradientLegendVisible && (this.isMetaKey = e.metaKey, this.isMouseDown = !0, !1 === this.conf.playing && requestAnimationFrame(this.animate));
270
+ }), e(this, 'handleMouseUp', () => {
271
+ this.isMouseDown = !1;
272
+ }), e(this, 'animate', e => {
273
+ if (!this.shouldSkipFrame(e) || this.isMouseDown) {
274
+ if (this.t += Math.min(e - this.last, 1e3 / 15), this.last = e, this.isMouseDown) {
275
+ let e = 160;
276
+ this.isMetaKey && (e = -160), this.t += e;
277
+ }
278
+ this.mesh.material.uniforms.u_time.value = this.t, this.minigl.render();
279
+ }
280
+ if (this.last !== 0 && this.isStatic) return this.minigl.render(), void this.disconnect();
281
+ ( /* this.isIntersecting && */this.conf.playing || this.isMouseDown) && requestAnimationFrame(this.animate);
282
+ }), e(this, 'addIsLoadedClass', () => {
283
+ /* this.isIntersecting && */!this.isLoadedClass && (this.isLoadedClass = !0, this.el.classList.add('isLoaded'), setTimeout(() => {
284
+ this.el.parentElement.classList.add('isLoaded');
285
+ }, 3e3));
286
+ }), e(this, 'pause', () => {
287
+ this.conf.playing = false;
288
+ }), e(this, 'play', () => {
289
+ requestAnimationFrame(this.animate), this.conf.playing = true;
290
+ }), e(this, 'initGradient', selector => {
291
+ this.el = document.querySelector(selector);
292
+ this.connect();
293
+ return this;
294
+ });
295
+ }
296
+ async connect() {
297
+ this.shaderFiles = {
298
+ 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}',
299
+ 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}',
300
+ 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}',
301
+ 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}'
302
+ }, this.conf = {
303
+ presetName: '',
304
+ wireframe: false,
305
+ density: [0.06, 0.16],
306
+ zoom: 1,
307
+ rotation: 0,
308
+ playing: true
309
+ }, document.querySelectorAll('canvas').length < 1 ? console.log('DID NOT LOAD HERO STRIPE CANVAS') : (this.minigl = new MiniGl(this.el, null, null, !0), requestAnimationFrame(() => {
310
+ this.el && (this.computedCanvasStyle = getComputedStyle(this.el), this.waitForCssVars());
311
+ })
312
+ /*
313
+ this.scrollObserver = await s.create(.1, !1),
314
+ this.scrollObserver.observe(this.el),
315
+ this.scrollObserver.onSeparate(() => {
316
+ 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()
317
+ }),
318
+ this.scrollObserver.onIntersect(() => {
319
+ 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()
320
+ }) */);
321
+ }
322
+
323
+ disconnect() {
324
+ 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);
325
+ }
326
+ initMaterial() {
327
+ this.uniforms = {
328
+ u_time: new this.minigl.Uniform({
329
+ value: 0
330
+ }),
331
+ u_shadow_power: new this.minigl.Uniform({
332
+ value: 5
333
+ }),
334
+ u_darken_top: new this.minigl.Uniform({
335
+ value: this.el.dataset.jsDarkenTop === '' ? 1 : 0
336
+ }),
337
+ u_active_colors: new this.minigl.Uniform({
338
+ value: this.activeColors,
339
+ type: 'vec4'
340
+ }),
341
+ u_global: new this.minigl.Uniform({
342
+ value: {
343
+ noiseFreq: new this.minigl.Uniform({
344
+ value: [this.freqX, this.freqY],
345
+ type: 'vec2'
346
+ }),
347
+ noiseSpeed: new this.minigl.Uniform({
348
+ value: 5e-6
349
+ })
350
+ },
351
+ type: 'struct'
352
+ }),
353
+ u_vertDeform: new this.minigl.Uniform({
354
+ value: {
355
+ incline: new this.minigl.Uniform({
356
+ value: Math.sin(this.angle) / Math.cos(this.angle)
357
+ }),
358
+ offsetTop: new this.minigl.Uniform({
359
+ value: -0.5
360
+ }),
361
+ offsetBottom: new this.minigl.Uniform({
362
+ value: -0.5
363
+ }),
364
+ noiseFreq: new this.minigl.Uniform({
365
+ value: [3, 4],
366
+ type: 'vec2'
367
+ }),
368
+ noiseAmp: new this.minigl.Uniform({
369
+ value: this.amp
370
+ }),
371
+ noiseSpeed: new this.minigl.Uniform({
372
+ value: 10
373
+ }),
374
+ noiseFlow: new this.minigl.Uniform({
375
+ value: 3
376
+ }),
377
+ noiseSeed: new this.minigl.Uniform({
378
+ value: this.seed
379
+ })
380
+ },
381
+ type: 'struct',
382
+ excludeFrom: 'fragment'
383
+ }),
384
+ u_baseColor: new this.minigl.Uniform({
385
+ value: this.sectionColors[0],
386
+ type: 'vec3',
387
+ excludeFrom: 'fragment'
388
+ }),
389
+ u_waveLayers: new this.minigl.Uniform({
390
+ value: [],
391
+ excludeFrom: 'fragment',
392
+ type: 'array'
393
+ })
394
+ };
395
+ for (let e = 1; e < this.sectionColors.length; e += 1) {
396
+ this.uniforms.u_waveLayers.value.push(new this.minigl.Uniform({
397
+ value: {
398
+ color: new this.minigl.Uniform({
399
+ value: this.sectionColors[e],
400
+ type: 'vec3'
401
+ }),
402
+ noiseFreq: new this.minigl.Uniform({
403
+ value: [2 + e / this.sectionColors.length, 3 + e / this.sectionColors.length],
404
+ type: 'vec2'
405
+ }),
406
+ noiseSpeed: new this.minigl.Uniform({
407
+ value: 11 + 0.3 * e
408
+ }),
409
+ noiseFlow: new this.minigl.Uniform({
410
+ value: 6.5 + 0.3 * e
411
+ }),
412
+ noiseSeed: new this.minigl.Uniform({
413
+ value: this.seed + 10 * e
414
+ }),
415
+ noiseFloor: new this.minigl.Uniform({
416
+ value: 0.1
417
+ }),
418
+ noiseCeil: new this.minigl.Uniform({
419
+ value: 0.63 + 0.07 * e
420
+ })
421
+ },
422
+ type: 'struct'
423
+ }));
424
+ }
425
+ 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);
426
+ }
427
+ initMesh() {
428
+ this.material = this.initMaterial(), this.geometry = new this.minigl.PlaneGeometry(), this.mesh = new this.minigl.Mesh(this.geometry, this.material);
429
+ }
430
+ shouldSkipFrame(e) {
431
+ return !!window.document.hidden || !this.conf.playing || parseInt(e, 10) % 2 == 0 || void 0;
432
+ }
433
+ updateFrequency(e) {
434
+ this.freqX += e, this.freqY += e;
435
+ }
436
+ toggleColor(index) {
437
+ this.activeColors[index] = this.activeColors[index] === 0 ? 1 : 0;
438
+ }
439
+ showGradientLegend() {
440
+ this.width > this.minWidth && (this.isGradientLegendVisible = !0, document.body.classList.add('isGradientLegendVisible'));
441
+ }
442
+ hideGradientLegend() {
443
+ this.isGradientLegendVisible = !1, document.body.classList.remove('isGradientLegendVisible');
444
+ }
445
+ init() {
446
+ this.initGradientColors(), this.initMesh(), this.resize(), requestAnimationFrame(this.animate), window.addEventListener('resize', this.resize);
447
+ }
448
+
449
+ /*
450
+ * Waiting for the css variables to become available, usually on page load before we can continue.
451
+ * Using default colors assigned below if no variables have been found after maxCssVarRetries
452
+ */
453
+ waitForCssVars() {
454
+ if (this.computedCanvasStyle && this.computedCanvasStyle.getPropertyValue('--gradient-color-1').indexOf('#') !== -1) this.init(), this.addIsLoadedClass();else {
455
+ if (this.cssVarRetries += 1, this.cssVarRetries > this.maxCssVarRetries) {
456
+ return this.sectionColors = [16711680, 16711680, 16711935, 65280, 255], void this.init();
457
+ }
458
+ requestAnimationFrame(() => this.waitForCssVars());
459
+ }
460
+ }
461
+
462
+ /*
463
+ * Initializes the four section colors by retrieving them from css variables.
464
+ */
465
+ initGradientColors() {
466
+ this.sectionColors = ['--gradient-color-1', '--gradient-color-2', '--gradient-color-3', '--gradient-color-4'].map(cssPropertyName => {
467
+ let hex = this.computedCanvasStyle.getPropertyValue(cssPropertyName).trim();
468
+ // Check if shorthand hex value was used and double the length so the conversion in normalizeColor will work.
469
+ if (hex.length === 4) {
470
+ const hexTemp = hex.substr(1).split('').map(hexTemp => hexTemp + hexTemp).join('');
471
+ hex = `#${hexTemp}`;
472
+ }
473
+ return hex && `0x${hex.substr(1)}`;
474
+ }).filter(Boolean).map(normalizeColor);
475
+ }
476
+ }
477
+
478
+ /*
479
+ *Finally initializing the Gradient class, assigning a canvas to it and calling Gradient.connect() which initializes everything,
480
+ * Use Gradient.pause() and Gradient.play() for controls.
481
+ *
482
+ * Here are some default property values you can change anytime:
483
+ * Amplitude: Gradient.amp = 0
484
+ * Colors: Gradient.sectionColors (if you change colors, use normalizeColor(#hexValue)) before you assign it.
485
+ *
486
+ *
487
+ * Useful functions
488
+ * Gradient.toggleColor(index)
489
+ * Gradient.updateFrequency(freq)
490
+ */
491
+
492
+ export { Gradient };
@@ -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();
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect } from 'react';
3
+ import { useInsertionEffect } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
 
@@ -12,16 +12,15 @@ 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;
24
- useLayoutEffect(() => {
15
+ const ContentTree = ({
16
+ id,
17
+ className: userClassName,
18
+ style,
19
+ target,
20
+ selectors
21
+ // ...otherProps
22
+ }) => {
23
+ useInsertionEffect(() => {
25
24
  import("./styles.scss");
26
25
  }, []);
27
26
  const contentTree = useContentTree(target, selectors);
@@ -55,7 +54,7 @@ ContentTree.propTypes = {
55
54
  * The reference to the parent element.
56
55
  */
57
56
  target: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
58
- current: PropTypes.instanceOf(Element)
57
+ current: PropTypes.node
59
58
  })])
60
59
  };
61
60
  ContentTree.defaultProps = {
@@ -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
-