@treely/strapi-slices 1.0.0

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 (560) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -0
  3. package/dist/components/CreditsAvailableBadge/CreditsAvailableBadge.d.ts +7 -0
  4. package/dist/components/CreditsAvailableBadge/index.d.ts +2 -0
  5. package/dist/components/CreditsAvailableBadge/messages.de.d.ts +7 -0
  6. package/dist/components/CreditsAvailableBadge/messages.en.d.ts +7 -0
  7. package/dist/components/FullScreenImage/FullScreenImage.d.ts +8 -0
  8. package/dist/components/FullScreenImage/ZoomableImage.d.ts +7 -0
  9. package/dist/components/FullScreenImage/index.d.ts +2 -0
  10. package/dist/components/MinimalProviders/MinimalProviders.d.ts +7 -0
  11. package/dist/components/MinimalProviders/index.d.ts +2 -0
  12. package/dist/components/SliceRenderer/SliceRenderer.d.ts +12 -0
  13. package/dist/components/SliceRenderer/index.d.ts +2 -0
  14. package/dist/components/StrapiLinkButton/StrapiLinkButton.d.ts +18 -0
  15. package/dist/components/StrapiLinkButton/index.d.ts +2 -0
  16. package/dist/components/StrapiLinkButtonWithIcon/StrapiLinkButtonWithIcon.d.ts +7 -0
  17. package/dist/components/StrapiLinkButtonWithIcon/index.d.ts +2 -0
  18. package/dist/components/portfolio/Contact/Contact.d.ts +10 -0
  19. package/dist/components/portfolio/Contact/index.d.ts +2 -0
  20. package/dist/components/portfolio/DocumentsDownloadList/DocumentsDownloadList.d.ts +6 -0
  21. package/dist/components/portfolio/DocumentsDownloadList/index.d.ts +2 -0
  22. package/dist/components/portfolio/DocumentsDownloadList/messages.de.d.ts +5 -0
  23. package/dist/components/portfolio/DocumentsDownloadList/messages.en.d.ts +5 -0
  24. package/dist/components/portfolio/ProjectInfo/ProjectInfo.d.ts +18 -0
  25. package/dist/components/portfolio/ProjectInfo/index.d.ts +2 -0
  26. package/dist/components/portfolio/ProjectInfo/messages.de.d.ts +15 -0
  27. package/dist/components/portfolio/ProjectInfo/messages.en.d.ts +15 -0
  28. package/dist/components/portfolio/SmallCheckout/SmallCheckout.d.ts +13 -0
  29. package/dist/components/portfolio/SmallCheckout/index.d.ts +2 -0
  30. package/dist/components/portfolio/SmallCheckout/messages.de.d.ts +16 -0
  31. package/dist/components/portfolio/SmallCheckout/messages.en.d.ts +16 -0
  32. package/dist/constants/animations.d.ts +1 -0
  33. package/dist/constants/api.d.ts +3 -0
  34. package/dist/constants/breakpoints.d.ts +8 -0
  35. package/dist/constants/domain.d.ts +2 -0
  36. package/dist/constants/fontCustomizations.d.ts +6 -0
  37. package/dist/constants/formatter.d.ts +6 -0
  38. package/dist/constants/globalStyle.d.ts +1 -0
  39. package/dist/constants/mapbox.d.ts +17 -0
  40. package/dist/constants/strapi.d.ts +1 -0
  41. package/dist/icons/LinkedInIcon.d.ts +2 -0
  42. package/dist/index.d.ts +1 -0
  43. package/dist/index.js +8 -0
  44. package/dist/models/BBox.d.ts +2 -0
  45. package/dist/models/CreditsAvailableState.d.ts +7 -0
  46. package/dist/models/Locale.d.ts +2 -0
  47. package/dist/models/PortfolioProject.d.ts +7 -0
  48. package/dist/models/forms/CheckoutForm.d.ts +4 -0
  49. package/dist/models/fpm/FPMProject.d.ts +37 -0
  50. package/dist/models/fpm/Issuer.d.ts +6 -0
  51. package/dist/models/strapi/IStrapi.d.ts +4 -0
  52. package/dist/models/strapi/IStrapiData.d.ts +5 -0
  53. package/dist/models/strapi/IStrapiResponse.d.ts +13 -0
  54. package/dist/models/strapi/StrapiAuthor.d.ts +10 -0
  55. package/dist/models/strapi/StrapiAvatarWithName.d.ts +8 -0
  56. package/dist/models/strapi/StrapiBanner.d.ts +9 -0
  57. package/dist/models/strapi/StrapiBlogPost.d.ts +25 -0
  58. package/dist/models/strapi/StrapiButtonWithVariant.d.ts +6 -0
  59. package/dist/models/strapi/StrapiCategory.d.ts +8 -0
  60. package/dist/models/strapi/StrapiContactArea.d.ts +10 -0
  61. package/dist/models/strapi/StrapiCustomerStory.d.ts +21 -0
  62. package/dist/models/strapi/StrapiDefaultHeader.d.ts +6 -0
  63. package/dist/models/strapi/StrapiGlobal.d.ts +26 -0
  64. package/dist/models/strapi/StrapiGlossaryItem.d.ts +6 -0
  65. package/dist/models/strapi/StrapiHeroCard.d.ts +13 -0
  66. package/dist/models/strapi/StrapiImage.d.ts +10 -0
  67. package/dist/models/strapi/StrapiImageFormat.d.ts +12 -0
  68. package/dist/models/strapi/StrapiImageWithLink.d.ts +6 -0
  69. package/dist/models/strapi/StrapiLink.d.ts +11 -0
  70. package/dist/models/strapi/StrapiLinkList.d.ts +7 -0
  71. package/dist/models/strapi/StrapiLinkPage.d.ts +10 -0
  72. package/dist/models/strapi/StrapiLinkWithIcon.d.ts +7 -0
  73. package/dist/models/strapi/StrapiLocalization.d.ts +7 -0
  74. package/dist/models/strapi/StrapiMedia.d.ts +27 -0
  75. package/dist/models/strapi/StrapiMetadata.d.ts +13 -0
  76. package/dist/models/strapi/StrapiNavMenu.d.ts +13 -0
  77. package/dist/models/strapi/StrapiPage.d.ts +17 -0
  78. package/dist/models/strapi/StrapiPortfolio.d.ts +10 -0
  79. package/dist/models/strapi/StrapiPortfolioCard.d.ts +15 -0
  80. package/dist/models/strapi/StrapiProject.d.ts +23 -0
  81. package/dist/models/strapi/StrapiProjectCard.d.ts +18 -0
  82. package/dist/models/strapi/StrapiQuoteCard.d.ts +7 -0
  83. package/dist/models/strapi/StrapiShapesCard.d.ts +11 -0
  84. package/dist/models/strapi/StrapiTextCardWithIcons.d.ts +8 -0
  85. package/dist/models/strapi/StrapiTopBanner.d.ts +7 -0
  86. package/dist/rootMessages.de.d.ts +58 -0
  87. package/dist/rootMessages.en.d.ts +58 -0
  88. package/dist/slices/Blog/Blog.d.ts +10 -0
  89. package/dist/slices/Blog/index.d.ts +2 -0
  90. package/dist/slices/Blog/styles.d.ts +9 -0
  91. package/dist/slices/BlogCards/BlogCards.d.ts +18 -0
  92. package/dist/slices/BlogCards/BlogCards.stories.d.ts +5 -0
  93. package/dist/slices/BlogCards/index.d.ts +2 -0
  94. package/dist/slices/Comparison/Comparison.d.ts +33 -0
  95. package/dist/slices/Comparison/Comparison.stories.d.ts +6 -0
  96. package/dist/slices/Comparison/Icon.d.ts +7 -0
  97. package/dist/slices/Comparison/index.d.ts +2 -0
  98. package/dist/slices/Comparison/messages.de.d.ts +4 -0
  99. package/dist/slices/Comparison/messages.en.d.ts +4 -0
  100. package/dist/slices/Cta/Cta.d.ts +26 -0
  101. package/dist/slices/Cta/Cta.stories.d.ts +9 -0
  102. package/dist/slices/Cta/index.d.ts +2 -0
  103. package/dist/slices/Cta/messages.de.d.ts +5 -0
  104. package/dist/slices/Cta/messages.en.d.ts +5 -0
  105. package/dist/slices/CtaOnly/CtaOnly.d.ts +8 -0
  106. package/dist/slices/CtaOnly/CtaOnly.stories.d.ts +3 -0
  107. package/dist/slices/CtaOnly/index.d.ts +2 -0
  108. package/dist/slices/CustomerStories/CustomerStories.d.ts +10 -0
  109. package/dist/slices/CustomerStories/CustomerStories.stories.d.ts +3 -0
  110. package/dist/slices/CustomerStories/index.d.ts +2 -0
  111. package/dist/slices/CustomerStories/messages.de.d.ts +4 -0
  112. package/dist/slices/CustomerStories/messages.en.d.ts +4 -0
  113. package/dist/slices/Facts/Facts.d.ts +16 -0
  114. package/dist/slices/Facts/Facts.stories.d.ts +7 -0
  115. package/dist/slices/Facts/index.d.ts +2 -0
  116. package/dist/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.d.ts +10 -0
  117. package/dist/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.stories.d.ts +4 -0
  118. package/dist/slices/FullWidthHighlightQuote/index.d.ts +2 -0
  119. package/dist/slices/FullWidthImage/FullWidthImage.d.ts +11 -0
  120. package/dist/slices/FullWidthImage/FullWidthImage.stories.d.ts +5 -0
  121. package/dist/slices/FullWidthImage/index.d.ts +2 -0
  122. package/dist/slices/FullWidthImage/styles.d.ts +5 -0
  123. package/dist/slices/FullWidthImageSlider/FullWidthImageSlider.d.ts +12 -0
  124. package/dist/slices/FullWidthImageSlider/FullWidthImageSlider.stories.d.ts +3 -0
  125. package/dist/slices/FullWidthImageSlider/index.d.ts +2 -0
  126. package/dist/slices/FullWidthImageSlider/styles.d.ts +295 -0
  127. package/dist/slices/FullWidthImageSlider/utils.d.ts +1 -0
  128. package/dist/slices/Glossary/Glossary.d.ts +9 -0
  129. package/dist/slices/Glossary/Glossary.stories.d.ts +3 -0
  130. package/dist/slices/Glossary/index.d.ts +2 -0
  131. package/dist/slices/Glossary/messages.de.d.ts +6 -0
  132. package/dist/slices/Glossary/messages.en.d.ts +6 -0
  133. package/dist/slices/Hero/Hero.d.ts +17 -0
  134. package/dist/slices/Hero/Hero.stories.d.ts +9 -0
  135. package/dist/slices/Hero/index.d.ts +2 -0
  136. package/dist/slices/Hero/styles.d.ts +17 -0
  137. package/dist/slices/IconGrid/IconGrid.d.ts +18 -0
  138. package/dist/slices/IconGrid/IconGrid.stories.d.ts +5 -0
  139. package/dist/slices/IconGrid/index.d.ts +2 -0
  140. package/dist/slices/IconGrid/styles.d.ts +9 -0
  141. package/dist/slices/ImageGrid/ImageGrid.d.ts +18 -0
  142. package/dist/slices/ImageGrid/ImageGrid.stories.d.ts +5 -0
  143. package/dist/slices/ImageGrid/index.d.ts +2 -0
  144. package/dist/slices/ImageGrid/styles.d.ts +5 -0
  145. package/dist/slices/ImageTextSequence/ImageTextSequence.d.ts +19 -0
  146. package/dist/slices/ImageTextSequence/ImageTextSequence.stories.d.ts +7 -0
  147. package/dist/slices/ImageTextSequence/index.d.ts +2 -0
  148. package/dist/slices/ImageTextSequence/styles.d.ts +13 -0
  149. package/dist/slices/LeftTextRightCard/LeftTextRightCard.d.ts +17 -0
  150. package/dist/slices/LeftTextRightCard/LeftTextRightCard.stories.d.ts +8 -0
  151. package/dist/slices/LeftTextRightCard/index.d.ts +2 -0
  152. package/dist/slices/LinkCardsGrid/LinkCardsGrid.d.ts +18 -0
  153. package/dist/slices/LinkCardsGrid/LinkCardsGrid.stories.d.ts +5 -0
  154. package/dist/slices/LinkCardsGrid/index.d.ts +2 -0
  155. package/dist/slices/LogoGridWithText/LogoGridWithText.d.ts +12 -0
  156. package/dist/slices/LogoGridWithText/LogoGridWithText.stories.d.ts +6 -0
  157. package/dist/slices/LogoGridWithText/index.d.ts +2 -0
  158. package/dist/slices/LogoGridWithText/styles.d.ts +5 -0
  159. package/dist/slices/MapHero/MapHero.d.ts +15 -0
  160. package/dist/slices/MapHero/MapHero.stories.d.ts +8 -0
  161. package/dist/slices/MapHero/index.d.ts +2 -0
  162. package/dist/slices/MapHero/styles.d.ts +21 -0
  163. package/dist/slices/ProjectFacts/ProjectFacts.d.ts +34 -0
  164. package/dist/slices/ProjectFacts/ProjectFacts.stories.d.ts +6 -0
  165. package/dist/slices/ProjectFacts/index.d.ts +2 -0
  166. package/dist/slices/ProjectFacts/messages.de.d.ts +5 -0
  167. package/dist/slices/ProjectFacts/messages.en.d.ts +5 -0
  168. package/dist/slices/ProjectsGrid/ProjectsGrid.d.ts +8 -0
  169. package/dist/slices/ProjectsGrid/ProjectsGrid.stories.d.ts +3 -0
  170. package/dist/slices/ProjectsGrid/index.d.ts +2 -0
  171. package/dist/slices/ProjectsMap/MapMarker.d.ts +10 -0
  172. package/dist/slices/ProjectsMap/ProjectsMap.d.ts +17 -0
  173. package/dist/slices/ProjectsMap/ProjectsMap.stories.d.ts +6 -0
  174. package/dist/slices/ProjectsMap/index.d.ts +2 -0
  175. package/dist/slices/ProjectsMap/messages.de.d.ts +4 -0
  176. package/dist/slices/ProjectsMap/messages.en.d.ts +4 -0
  177. package/dist/slices/QAndA/QAndA.d.ts +43 -0
  178. package/dist/slices/QAndA/QAndA.stories.d.ts +7 -0
  179. package/dist/slices/QAndA/index.d.ts +2 -0
  180. package/dist/slices/QuoteCards/QuoteCards.d.ts +15 -0
  181. package/dist/slices/QuoteCards/QuoteCards.stories.d.ts +8 -0
  182. package/dist/slices/QuoteCards/index.d.ts +2 -0
  183. package/dist/slices/QuoteCards/styles.d.ts +13 -0
  184. package/dist/slices/RichTextSection/RichTextSection.d.ts +7 -0
  185. package/dist/slices/RichTextSection/RichTextSection.stories.d.ts +3 -0
  186. package/dist/slices/RichTextSection/index.d.ts +2 -0
  187. package/dist/slices/ShopCheckout/ShopCheckout.d.ts +16 -0
  188. package/dist/slices/ShopCheckout/ShopCheckout.stories.d.ts +7 -0
  189. package/dist/slices/ShopCheckout/index.d.ts +2 -0
  190. package/dist/slices/ShopCheckout/messages.de.d.ts +15 -0
  191. package/dist/slices/ShopCheckout/messages.en.d.ts +15 -0
  192. package/dist/slices/SideBySideImages/SideBySideImages.d.ts +12 -0
  193. package/dist/slices/SideBySideImages/SideBySideImages.stories.d.ts +3 -0
  194. package/dist/slices/SideBySideImages/index.d.ts +2 -0
  195. package/dist/slices/SmallHero/SmallHero.d.ts +20 -0
  196. package/dist/slices/SmallHero/SmallHero.stories.d.ts +11 -0
  197. package/dist/slices/SmallHero/index.d.ts +2 -0
  198. package/dist/slices/SmallHero/styles.d.ts +9 -0
  199. package/dist/slices/Steps/Steps.d.ts +19 -0
  200. package/dist/slices/Steps/Steps.stories.d.ts +7 -0
  201. package/dist/slices/Steps/index.d.ts +2 -0
  202. package/dist/slices/Steps/styles.d.ts +25 -0
  203. package/dist/slices/TextCardGrid/TextCardGrid.d.ts +20 -0
  204. package/dist/slices/TextCardGrid/TextCardGrid.stories.d.ts +8 -0
  205. package/dist/slices/TextCardGrid/index.d.ts +2 -0
  206. package/dist/slices/TextCarousel/TextCarousel.d.ts +13 -0
  207. package/dist/slices/TextCarousel/TextCarousel.stories.d.ts +6 -0
  208. package/dist/slices/TextCarousel/index.d.ts +2 -0
  209. package/dist/slices/TextCarousel/styles.d.ts +284 -0
  210. package/dist/slices/TextWithCard/TextWithCard.d.ts +20 -0
  211. package/dist/slices/TextWithCard/TextWithCard.stories.d.ts +9 -0
  212. package/dist/slices/TextWithCard/index.d.ts +2 -0
  213. package/dist/slices/TextWithTextCards/TextWithTextCards.d.ts +15 -0
  214. package/dist/slices/TextWithTextCards/TextWithTextCards.stories.d.ts +7 -0
  215. package/dist/slices/TextWithTextCards/index.d.ts +2 -0
  216. package/dist/slices/TextWithTextCards/styles.d.ts +5 -0
  217. package/dist/slices/Video/Video.d.ts +10 -0
  218. package/dist/slices/Video/Video.stories.d.ts +3 -0
  219. package/dist/slices/Video/index.d.ts +2 -0
  220. package/dist/strapi-slices.cjs.development.js +39 -0
  221. package/dist/strapi-slices.cjs.development.js.map +1 -0
  222. package/dist/strapi-slices.cjs.production.min.js +2 -0
  223. package/dist/strapi-slices.cjs.production.min.js.map +1 -0
  224. package/dist/strapi-slices.esm.js +36 -0
  225. package/dist/strapi-slices.esm.js.map +1 -0
  226. package/dist/test/defaultMocks/next.d.ts +2 -0
  227. package/dist/test/integrationMocks/fpmProjectMock.d.ts +3 -0
  228. package/dist/test/mocks/portfolioProjectMock.d.ts +3 -0
  229. package/dist/test/setupTests.d.ts +1 -0
  230. package/dist/test/storybookMocks/storybookMedia.d.ts +1 -0
  231. package/dist/test/storybookMocks/storybookStrapiMedia.d.ts +8 -0
  232. package/dist/test/strapiMocks/minimalGlobalData.d.ts +4 -0
  233. package/dist/test/strapiMocks/strapiAvatarWithName.d.ts +12 -0
  234. package/dist/test/strapiMocks/strapiBlogPost.d.ts +3 -0
  235. package/dist/test/strapiMocks/strapiContact.d.ts +2 -0
  236. package/dist/test/strapiMocks/strapiCustomerStory.d.ts +3 -0
  237. package/dist/test/strapiMocks/strapiHeroCard.d.ts +2 -0
  238. package/dist/test/strapiMocks/strapiLinkPage.d.ts +3 -0
  239. package/dist/test/strapiMocks/strapiMedia.d.ts +3 -0
  240. package/dist/test/strapiMocks/strapiMetadata.d.ts +2 -0
  241. package/dist/test/strapiMocks/strapiPage.d.ts +3 -0
  242. package/dist/test/strapiMocks/strapiPortfolioCard.d.ts +2 -0
  243. package/dist/test/strapiMocks/strapiPortfolioMock.d.ts +3 -0
  244. package/dist/test/strapiMocks/strapiProject.d.ts +3 -0
  245. package/dist/test/strapiMocks/strapiProjectCard.d.ts +2 -0
  246. package/dist/test/strapiMocks/strapiQuoteCard.d.ts +2 -0
  247. package/dist/test/testUtils.d.ts +6 -0
  248. package/dist/unit.messages.de.d.ts +5 -0
  249. package/dist/unit.messages.en.d.ts +5 -0
  250. package/dist/utils/convertAreaM2ToHa.d.ts +2 -0
  251. package/dist/utils/convertCo2AmountKgToTons.d.ts +2 -0
  252. package/dist/utils/convertToKebabCase.d.ts +2 -0
  253. package/dist/utils/getTimeSpanInYears.d.ts +2 -0
  254. package/dist/utils/mergeBoundingBoxes.d.ts +3 -0
  255. package/dist/utils/mergeDeep.d.ts +12 -0
  256. package/dist/utils/openHubSpotChat.d.ts +2 -0
  257. package/dist/utils/strapiLinkUrl.d.ts +3 -0
  258. package/dist/utils/strapiMediaUrl.d.ts +5 -0
  259. package/package.json +132 -0
  260. package/src/components/CreditsAvailableBadge/CreditsAvailableBadge.test.tsx +65 -0
  261. package/src/components/CreditsAvailableBadge/CreditsAvailableBadge.tsx +55 -0
  262. package/src/components/CreditsAvailableBadge/index.ts +3 -0
  263. package/src/components/CreditsAvailableBadge/messages.de.ts +7 -0
  264. package/src/components/CreditsAvailableBadge/messages.en.ts +6 -0
  265. package/src/components/FullScreenImage/FullScreenImage.test.tsx +45 -0
  266. package/src/components/FullScreenImage/FullScreenImage.tsx +119 -0
  267. package/src/components/FullScreenImage/ZoomableImage.tsx +84 -0
  268. package/src/components/FullScreenImage/index.ts +3 -0
  269. package/src/components/MinimalProviders/MinimalProviders.tsx +25 -0
  270. package/src/components/MinimalProviders/index.ts +3 -0
  271. package/src/components/SliceRenderer/SliceRenderer.test.tsx +35 -0
  272. package/src/components/SliceRenderer/SliceRenderer.tsx +294 -0
  273. package/src/components/SliceRenderer/index.ts +3 -0
  274. package/src/components/StrapiLinkButton/StrapiLinkButton.test.tsx +58 -0
  275. package/src/components/StrapiLinkButton/StrapiLinkButton.tsx +55 -0
  276. package/src/components/StrapiLinkButton/index.ts +3 -0
  277. package/src/components/StrapiLinkButtonWithIcon/StrapiLinkButtonWithIcon.test.tsx +57 -0
  278. package/src/components/StrapiLinkButtonWithIcon/StrapiLinkButtonWithIcon.tsx +36 -0
  279. package/src/components/StrapiLinkButtonWithIcon/index.ts +3 -0
  280. package/src/components/portfolio/Contact/Contact.test.tsx +51 -0
  281. package/src/components/portfolio/Contact/Contact.tsx +73 -0
  282. package/src/components/portfolio/Contact/index.ts +3 -0
  283. package/src/components/portfolio/DocumentsDownloadList/DocumentsDownloadList.test.tsx +49 -0
  284. package/src/components/portfolio/DocumentsDownloadList/DocumentsDownloadList.tsx +76 -0
  285. package/src/components/portfolio/DocumentsDownloadList/index.ts +3 -0
  286. package/src/components/portfolio/DocumentsDownloadList/messages.de.ts +6 -0
  287. package/src/components/portfolio/DocumentsDownloadList/messages.en.ts +6 -0
  288. package/src/components/portfolio/ProjectInfo/ProjectInfo.test.tsx +81 -0
  289. package/src/components/portfolio/ProjectInfo/ProjectInfo.tsx +252 -0
  290. package/src/components/portfolio/ProjectInfo/index.ts +3 -0
  291. package/src/components/portfolio/ProjectInfo/messages.de.ts +19 -0
  292. package/src/components/portfolio/ProjectInfo/messages.en.ts +19 -0
  293. package/src/components/portfolio/SmallCheckout/SmallCheckout.test.tsx +166 -0
  294. package/src/components/portfolio/SmallCheckout/SmallCheckout.tsx +265 -0
  295. package/src/components/portfolio/SmallCheckout/index.ts +3 -0
  296. package/src/components/portfolio/SmallCheckout/messages.de.ts +26 -0
  297. package/src/components/portfolio/SmallCheckout/messages.en.ts +26 -0
  298. package/src/constants/animations.ts +1 -0
  299. package/src/constants/api.ts +5 -0
  300. package/src/constants/breakpoints.ts +9 -0
  301. package/src/constants/domain.ts +3 -0
  302. package/src/constants/fontCustomizations.ts +6 -0
  303. package/src/constants/formatter.ts +29 -0
  304. package/src/constants/globalStyle.ts +55 -0
  305. package/src/constants/mapbox.ts +24 -0
  306. package/src/constants/strapi.ts +2 -0
  307. package/src/icons/LinkedInIcon.tsx +23 -0
  308. package/src/index.tsx +1 -0
  309. package/src/models/BBox.ts +3 -0
  310. package/src/models/CreditsAvailableState.ts +8 -0
  311. package/src/models/Locale.ts +3 -0
  312. package/src/models/PortfolioProject.ts +9 -0
  313. package/src/models/forms/CheckoutForm.ts +5 -0
  314. package/src/models/fpm/FPMProject.ts +41 -0
  315. package/src/models/fpm/Issuer.ts +7 -0
  316. package/src/models/strapi/IStrapi.ts +5 -0
  317. package/src/models/strapi/IStrapiData.ts +6 -0
  318. package/src/models/strapi/IStrapiResponse.ts +15 -0
  319. package/src/models/strapi/StrapiAuthor.ts +12 -0
  320. package/src/models/strapi/StrapiAvatarWithName.ts +10 -0
  321. package/src/models/strapi/StrapiBanner.ts +11 -0
  322. package/src/models/strapi/StrapiBlogPost.ts +27 -0
  323. package/src/models/strapi/StrapiButtonWithVariant.ts +8 -0
  324. package/src/models/strapi/StrapiCategory.ts +10 -0
  325. package/src/models/strapi/StrapiContactArea.ts +12 -0
  326. package/src/models/strapi/StrapiCustomerStory.ts +23 -0
  327. package/src/models/strapi/StrapiDefaultHeader.ts +7 -0
  328. package/src/models/strapi/StrapiGlobal.ts +28 -0
  329. package/src/models/strapi/StrapiGlossaryItem.ts +7 -0
  330. package/src/models/strapi/StrapiHeroCard.ts +15 -0
  331. package/src/models/strapi/StrapiImage.ts +12 -0
  332. package/src/models/strapi/StrapiImageFormat.ts +13 -0
  333. package/src/models/strapi/StrapiImageWithLink.ts +8 -0
  334. package/src/models/strapi/StrapiLink.ts +13 -0
  335. package/src/models/strapi/StrapiLinkList.ts +9 -0
  336. package/src/models/strapi/StrapiLinkPage.ts +12 -0
  337. package/src/models/strapi/StrapiLinkWithIcon.ts +9 -0
  338. package/src/models/strapi/StrapiLocalization.ts +9 -0
  339. package/src/models/strapi/StrapiMedia.ts +29 -0
  340. package/src/models/strapi/StrapiMetadata.ts +15 -0
  341. package/src/models/strapi/StrapiNavMenu.ts +16 -0
  342. package/src/models/strapi/StrapiPage.ts +19 -0
  343. package/src/models/strapi/StrapiPortfolio.ts +12 -0
  344. package/src/models/strapi/StrapiPortfolioCard.ts +17 -0
  345. package/src/models/strapi/StrapiProject.ts +25 -0
  346. package/src/models/strapi/StrapiProjectCard.ts +20 -0
  347. package/src/models/strapi/StrapiQuoteCard.ts +9 -0
  348. package/src/models/strapi/StrapiShapesCard.ts +13 -0
  349. package/src/models/strapi/StrapiTextCardWithIcons.ts +10 -0
  350. package/src/models/strapi/StrapiTopBanner.ts +9 -0
  351. package/src/rootMessages.de.ts +41 -0
  352. package/src/rootMessages.en.ts +41 -0
  353. package/src/slices/Blog/Blog.test.tsx +146 -0
  354. package/src/slices/Blog/Blog.tsx +114 -0
  355. package/src/slices/Blog/index.ts +3 -0
  356. package/src/slices/Blog/styles.ts +34 -0
  357. package/src/slices/BlogCards/BlogCards.stories.tsx +148 -0
  358. package/src/slices/BlogCards/BlogCards.test.tsx +277 -0
  359. package/src/slices/BlogCards/BlogCards.tsx +210 -0
  360. package/src/slices/BlogCards/index.ts +3 -0
  361. package/src/slices/Comparison/Comparison.stories.tsx +123 -0
  362. package/src/slices/Comparison/Comparison.test.tsx +173 -0
  363. package/src/slices/Comparison/Comparison.tsx +265 -0
  364. package/src/slices/Comparison/Icon.test.tsx +43 -0
  365. package/src/slices/Comparison/Icon.tsx +34 -0
  366. package/src/slices/Comparison/index.ts +3 -0
  367. package/src/slices/Comparison/messages.de.ts +3 -0
  368. package/src/slices/Comparison/messages.en.ts +3 -0
  369. package/src/slices/Cta/Cta.stories.tsx +149 -0
  370. package/src/slices/Cta/Cta.test.tsx +249 -0
  371. package/src/slices/Cta/Cta.tsx +412 -0
  372. package/src/slices/Cta/index.ts +3 -0
  373. package/src/slices/Cta/messages.de.ts +4 -0
  374. package/src/slices/Cta/messages.en.ts +4 -0
  375. package/src/slices/CtaOnly/CtaOnly.stories.tsx +47 -0
  376. package/src/slices/CtaOnly/CtaOnly.test.tsx +26 -0
  377. package/src/slices/CtaOnly/CtaOnly.tsx +17 -0
  378. package/src/slices/CtaOnly/index.ts +3 -0
  379. package/src/slices/CustomerStories/CustomerStories.stories.tsx +20 -0
  380. package/src/slices/CustomerStories/CustomerStories.test.tsx +43 -0
  381. package/src/slices/CustomerStories/CustomerStories.tsx +84 -0
  382. package/src/slices/CustomerStories/index.ts +3 -0
  383. package/src/slices/CustomerStories/messages.de.ts +3 -0
  384. package/src/slices/CustomerStories/messages.en.ts +3 -0
  385. package/src/slices/Facts/Facts.stories.tsx +97 -0
  386. package/src/slices/Facts/Facts.test.tsx +99 -0
  387. package/src/slices/Facts/Facts.tsx +140 -0
  388. package/src/slices/Facts/index.ts +3 -0
  389. package/src/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.stories.tsx +41 -0
  390. package/src/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.test.tsx +39 -0
  391. package/src/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.tsx +57 -0
  392. package/src/slices/FullWidthHighlightQuote/index.ts +3 -0
  393. package/src/slices/FullWidthImage/FullWidthImage.stories.tsx +40 -0
  394. package/src/slices/FullWidthImage/FullWidthImage.test.tsx +33 -0
  395. package/src/slices/FullWidthImage/FullWidthImage.tsx +63 -0
  396. package/src/slices/FullWidthImage/index.ts +3 -0
  397. package/src/slices/FullWidthImage/styles.ts +17 -0
  398. package/src/slices/FullWidthImageSlider/FullWidthImageSlider.stories.tsx +75 -0
  399. package/src/slices/FullWidthImageSlider/FullWidthImageSlider.test.tsx +49 -0
  400. package/src/slices/FullWidthImageSlider/FullWidthImageSlider.tsx +149 -0
  401. package/src/slices/FullWidthImageSlider/index.ts +3 -0
  402. package/src/slices/FullWidthImageSlider/styles.ts +96 -0
  403. package/src/slices/FullWidthImageSlider/utils.test.ts +10 -0
  404. package/src/slices/FullWidthImageSlider/utils.ts +17 -0
  405. package/src/slices/Glossary/Glossary.stories.tsx +42 -0
  406. package/src/slices/Glossary/Glossary.test.tsx +102 -0
  407. package/src/slices/Glossary/Glossary.tsx +107 -0
  408. package/src/slices/Glossary/index.ts +3 -0
  409. package/src/slices/Glossary/messages.de.ts +7 -0
  410. package/src/slices/Glossary/messages.en.ts +6 -0
  411. package/src/slices/Hero/Hero.stories.tsx +129 -0
  412. package/src/slices/Hero/Hero.test.tsx +89 -0
  413. package/src/slices/Hero/Hero.tsx +95 -0
  414. package/src/slices/Hero/index.ts +3 -0
  415. package/src/slices/Hero/styles.ts +52 -0
  416. package/src/slices/IconGrid/IconGrid.stories.tsx +178 -0
  417. package/src/slices/IconGrid/IconGrid.test.tsx +81 -0
  418. package/src/slices/IconGrid/IconGrid.tsx +97 -0
  419. package/src/slices/IconGrid/index.ts +3 -0
  420. package/src/slices/IconGrid/styles.ts +21 -0
  421. package/src/slices/ImageGrid/ImageGrid.stories.tsx +92 -0
  422. package/src/slices/ImageGrid/ImageGrid.test.tsx +82 -0
  423. package/src/slices/ImageGrid/ImageGrid.tsx +89 -0
  424. package/src/slices/ImageGrid/index.ts +3 -0
  425. package/src/slices/ImageGrid/styles.ts +12 -0
  426. package/src/slices/ImageTextSequence/ImageTextSequence.stories.tsx +124 -0
  427. package/src/slices/ImageTextSequence/ImageTextSequence.test.tsx +91 -0
  428. package/src/slices/ImageTextSequence/ImageTextSequence.tsx +143 -0
  429. package/src/slices/ImageTextSequence/index.ts +3 -0
  430. package/src/slices/ImageTextSequence/styles.ts +33 -0
  431. package/src/slices/LeftTextRightCard/LeftTextRightCard.stories.tsx +93 -0
  432. package/src/slices/LeftTextRightCard/LeftTextRightCard.test.tsx +72 -0
  433. package/src/slices/LeftTextRightCard/LeftTextRightCard.tsx +108 -0
  434. package/src/slices/LeftTextRightCard/index.ts +3 -0
  435. package/src/slices/LinkCardsGrid/LinkCardsGrid.stories.tsx +60 -0
  436. package/src/slices/LinkCardsGrid/LinkCardsGrid.test.tsx +36 -0
  437. package/src/slices/LinkCardsGrid/LinkCardsGrid.tsx +95 -0
  438. package/src/slices/LinkCardsGrid/index.ts +3 -0
  439. package/src/slices/LogoGridWithText/LogoGridWithText.stories.tsx +73 -0
  440. package/src/slices/LogoGridWithText/LogoGridWithText.test.tsx +55 -0
  441. package/src/slices/LogoGridWithText/LogoGridWithText.tsx +95 -0
  442. package/src/slices/LogoGridWithText/index.ts +3 -0
  443. package/src/slices/LogoGridWithText/styles.ts +13 -0
  444. package/src/slices/MapHero/MapHero.stories.tsx +112 -0
  445. package/src/slices/MapHero/MapHero.test.tsx +85 -0
  446. package/src/slices/MapHero/MapHero.tsx +89 -0
  447. package/src/slices/MapHero/index.ts +3 -0
  448. package/src/slices/MapHero/styles.ts +105 -0
  449. package/src/slices/ProjectFacts/ProjectFacts.stories.tsx +91 -0
  450. package/src/slices/ProjectFacts/ProjectFacts.test.tsx +34 -0
  451. package/src/slices/ProjectFacts/ProjectFacts.tsx +95 -0
  452. package/src/slices/ProjectFacts/index.ts +3 -0
  453. package/src/slices/ProjectFacts/messages.de.ts +4 -0
  454. package/src/slices/ProjectFacts/messages.en.ts +4 -0
  455. package/src/slices/ProjectsGrid/ProjectsGrid.stories.tsx +72 -0
  456. package/src/slices/ProjectsGrid/ProjectsGrid.test.tsx +31 -0
  457. package/src/slices/ProjectsGrid/ProjectsGrid.tsx +80 -0
  458. package/src/slices/ProjectsGrid/index.ts +3 -0
  459. package/src/slices/ProjectsMap/MapMarker.test.tsx +79 -0
  460. package/src/slices/ProjectsMap/MapMarker.tsx +99 -0
  461. package/src/slices/ProjectsMap/ProjectsMap.stories.tsx +101 -0
  462. package/src/slices/ProjectsMap/ProjectsMap.test.tsx +95 -0
  463. package/src/slices/ProjectsMap/ProjectsMap.tsx +150 -0
  464. package/src/slices/ProjectsMap/index.ts +3 -0
  465. package/src/slices/ProjectsMap/messages.de.ts +3 -0
  466. package/src/slices/ProjectsMap/messages.en.ts +3 -0
  467. package/src/slices/QAndA/QAndA.stories.tsx +103 -0
  468. package/src/slices/QAndA/QAndA.test.tsx +67 -0
  469. package/src/slices/QAndA/QAndA.tsx +157 -0
  470. package/src/slices/QAndA/index.ts +3 -0
  471. package/src/slices/QuoteCards/QuoteCards.stories.tsx +118 -0
  472. package/src/slices/QuoteCards/QuoteCards.test.tsx +52 -0
  473. package/src/slices/QuoteCards/QuoteCards.tsx +135 -0
  474. package/src/slices/QuoteCards/index.ts +3 -0
  475. package/src/slices/QuoteCards/styles.ts +17 -0
  476. package/src/slices/RichTextSection/RichTextSection.stories.tsx +27 -0
  477. package/src/slices/RichTextSection/RichTextSection.test.tsx +20 -0
  478. package/src/slices/RichTextSection/RichTextSection.tsx +27 -0
  479. package/src/slices/RichTextSection/index.ts +3 -0
  480. package/src/slices/ShopCheckout/ShopCheckout.stories.tsx +76 -0
  481. package/src/slices/ShopCheckout/ShopCheckout.test.tsx +186 -0
  482. package/src/slices/ShopCheckout/ShopCheckout.tsx +228 -0
  483. package/src/slices/ShopCheckout/index.ts +3 -0
  484. package/src/slices/ShopCheckout/messages.de.ts +23 -0
  485. package/src/slices/ShopCheckout/messages.en.ts +23 -0
  486. package/src/slices/SideBySideImages/SideBySideImages.stories.tsx +39 -0
  487. package/src/slices/SideBySideImages/SideBySideImages.test.tsx +52 -0
  488. package/src/slices/SideBySideImages/SideBySideImages.tsx +57 -0
  489. package/src/slices/SideBySideImages/index.ts +3 -0
  490. package/src/slices/SmallHero/SmallHero.stories.tsx +138 -0
  491. package/src/slices/SmallHero/SmallHero.test.tsx +70 -0
  492. package/src/slices/SmallHero/SmallHero.tsx +116 -0
  493. package/src/slices/SmallHero/index.ts +3 -0
  494. package/src/slices/SmallHero/styles.ts +39 -0
  495. package/src/slices/Steps/Steps.stories.tsx +95 -0
  496. package/src/slices/Steps/Steps.test.tsx +68 -0
  497. package/src/slices/Steps/Steps.tsx +178 -0
  498. package/src/slices/Steps/index.ts +3 -0
  499. package/src/slices/Steps/styles.ts +64 -0
  500. package/src/slices/TextCardGrid/TextCardGrid.stories.tsx +156 -0
  501. package/src/slices/TextCardGrid/TextCardGrid.test.tsx +103 -0
  502. package/src/slices/TextCardGrid/TextCardGrid.tsx +285 -0
  503. package/src/slices/TextCardGrid/index.ts +3 -0
  504. package/src/slices/TextCarousel/TextCarousel.stories.tsx +104 -0
  505. package/src/slices/TextCarousel/TextCarousel.test.tsx +90 -0
  506. package/src/slices/TextCarousel/TextCarousel.tsx +91 -0
  507. package/src/slices/TextCarousel/index.ts +3 -0
  508. package/src/slices/TextCarousel/styles.ts +65 -0
  509. package/src/slices/TextWithCard/TextWithCard.stories.tsx +113 -0
  510. package/src/slices/TextWithCard/TextWithCard.test.tsx +87 -0
  511. package/src/slices/TextWithCard/TextWithCard.tsx +115 -0
  512. package/src/slices/TextWithCard/index.ts +3 -0
  513. package/src/slices/TextWithTextCards/TextWithTextCards.stories.tsx +121 -0
  514. package/src/slices/TextWithTextCards/TextWithTextCards.test.tsx +57 -0
  515. package/src/slices/TextWithTextCards/TextWithTextCards.tsx +167 -0
  516. package/src/slices/TextWithTextCards/index.ts +3 -0
  517. package/src/slices/TextWithTextCards/styles.ts +26 -0
  518. package/src/slices/Video/Video.stories.tsx +18 -0
  519. package/src/slices/Video/Video.test.tsx +26 -0
  520. package/src/slices/Video/Video.tsx +35 -0
  521. package/src/slices/Video/index.ts +3 -0
  522. package/src/test/defaultMocks/next.ts +29 -0
  523. package/src/test/integrationMocks/fpmProjectMock.ts +37 -0
  524. package/src/test/mocks/portfolioProjectMock.ts +11 -0
  525. package/src/test/setupTests.ts +5 -0
  526. package/src/test/storybookMocks/storybookMedia.ts +2 -0
  527. package/src/test/storybookMocks/storybookStrapiMedia.ts +58 -0
  528. package/src/test/strapiMocks/minimalGlobalData.ts +24 -0
  529. package/src/test/strapiMocks/strapiAvatarWithName.ts +12 -0
  530. package/src/test/strapiMocks/strapiBlogPost.ts +216 -0
  531. package/src/test/strapiMocks/strapiContact.ts +15 -0
  532. package/src/test/strapiMocks/strapiCustomerStory.ts +195 -0
  533. package/src/test/strapiMocks/strapiHeroCard.ts +7 -0
  534. package/src/test/strapiMocks/strapiLinkPage.ts +14 -0
  535. package/src/test/strapiMocks/strapiMedia.ts +91 -0
  536. package/src/test/strapiMocks/strapiMetadata.ts +12 -0
  537. package/src/test/strapiMocks/strapiPage.ts +683 -0
  538. package/src/test/strapiMocks/strapiPortfolioCard.ts +40 -0
  539. package/src/test/strapiMocks/strapiPortfolioMock.ts +20 -0
  540. package/src/test/strapiMocks/strapiProject.ts +34 -0
  541. package/src/test/strapiMocks/strapiProjectCard.ts +20 -0
  542. package/src/test/strapiMocks/strapiQuoteCard.ts +8 -0
  543. package/src/test/testUtils.tsx +25 -0
  544. package/src/unit.messages.de.ts +4 -0
  545. package/src/unit.messages.en.ts +4 -0
  546. package/src/utils/convertAreaM2ToHa.test.ts +9 -0
  547. package/src/utils/convertAreaM2ToHa.ts +4 -0
  548. package/src/utils/convertCo2AmountKgToTons.ts +4 -0
  549. package/src/utils/convertToKebabCase.test.ts +9 -0
  550. package/src/utils/convertToKebabCase.ts +10 -0
  551. package/src/utils/getTimeSpanInYears.test.ts +35 -0
  552. package/src/utils/getTimeSpanInYears.ts +14 -0
  553. package/src/utils/mergeBoundingBoxes.test.ts +13 -0
  554. package/src/utils/mergeBoundingBoxes.ts +19 -0
  555. package/src/utils/mergeDeep.ts +31 -0
  556. package/src/utils/openHubSpotChat.ts +15 -0
  557. package/src/utils/strapiLinkUrl.test.ts +26 -0
  558. package/src/utils/strapiLinkUrl.ts +13 -0
  559. package/src/utils/strapiMediaUrl.test.ts +54 -0
  560. package/src/utils/strapiMediaUrl.ts +32 -0
@@ -0,0 +1,47 @@
1
+ import { Meta, StoryFn } from '@storybook/react';
2
+ import CtaOnly from '.';
3
+ import RichTextSection from '../RichTextSection';
4
+ import { RichTextSectionProps } from '../RichTextSection/RichTextSection';
5
+
6
+ export default {
7
+ title: 'sections/CTAOnly',
8
+ component: CtaOnly,
9
+ subcomponents: { RichTextSection },
10
+ } as Meta<typeof CtaOnly>;
11
+
12
+ const richTextWithTitleArgs: RichTextSectionProps = {
13
+ slice: {
14
+ content: `
15
+ # Heading 1
16
+ This is some rich text that is not part of the CtaOnly section.
17
+ The actual CtaOnly section is only the button below.
18
+ `,
19
+ },
20
+ };
21
+
22
+ const richTextArgs: RichTextSectionProps = {
23
+ slice: {
24
+ content: `
25
+ This is some rich text that is also not part of the CtaOnly section.
26
+ `,
27
+ },
28
+ };
29
+
30
+ const Template: StoryFn<typeof CtaOnly> = (args) => (
31
+ <>
32
+ <RichTextSection {...richTextWithTitleArgs} />
33
+ <CtaOnly {...args} />
34
+ <RichTextSection {...richTextArgs} />
35
+ </>
36
+ );
37
+
38
+ export const WithRichText = Template.bind({});
39
+ WithRichText.args = {
40
+ slice: {
41
+ button: {
42
+ id: 1,
43
+ text: 'Button',
44
+ url: 'https://tree.ly',
45
+ },
46
+ },
47
+ };
@@ -0,0 +1,26 @@
1
+ import { render, screen } from '@/test/testUtils';
2
+ import { CtaOnlyProps } from './CtaOnly';
3
+ import CtaOnly from '.';
4
+
5
+ const defaultProps: CtaOnlyProps = {
6
+ slice: {
7
+ button: {
8
+ id: 1,
9
+ text: 'Link',
10
+ url: 'url',
11
+ },
12
+ },
13
+ };
14
+
15
+ const setup = () => {
16
+ render(<CtaOnly {...defaultProps} />);
17
+ };
18
+
19
+ describe('The CTAOnly component', () => {
20
+ it('displays a link', () => {
21
+ setup();
22
+
23
+ expect(screen.getByRole('link')).toBeInTheDocument();
24
+ expect(screen.getByText('Link')).toBeInTheDocument();
25
+ });
26
+ });
@@ -0,0 +1,17 @@
1
+ import { Box, Wrapper } from 'boemly';
2
+ import StrapiLinkButton from '@/components/StrapiLinkButton';
3
+ import StrapiLink from '@/models/strapi/StrapiLink';
4
+
5
+ export interface CtaOnlyProps {
6
+ slice: {
7
+ button: StrapiLink;
8
+ };
9
+ }
10
+
11
+ export const CtaOnly: React.FC<CtaOnlyProps> = ({ slice }: CtaOnlyProps) => (
12
+ <Wrapper>
13
+ <Box position="absolute" top="-28" transform="translateY(50%)">
14
+ <StrapiLinkButton size="md" link={slice.button} />
15
+ </Box>
16
+ </Wrapper>
17
+ );
@@ -0,0 +1,3 @@
1
+ import { CtaOnly } from './CtaOnly';
2
+
3
+ export default CtaOnly;
@@ -0,0 +1,20 @@
1
+ import { strapiCustomerStoryMock } from '@/test/strapiMocks/strapiCustomerStory';
2
+ import { Meta, StoryFn } from '@storybook/react';
3
+ import CustomerStories from '.';
4
+
5
+ export default {
6
+ title: 'sections/CustomerStories',
7
+ component: CustomerStories,
8
+ } as Meta<typeof CustomerStories>;
9
+
10
+ const Template: StoryFn<typeof CustomerStories> = (args) => (
11
+ <CustomerStories {...args} />
12
+ );
13
+
14
+ export const Minimal = Template.bind({});
15
+ Minimal.args = {
16
+ slice: {
17
+ customer_stories: [strapiCustomerStoryMock],
18
+ },
19
+ customerStories: [strapiCustomerStoryMock],
20
+ };
@@ -0,0 +1,43 @@
1
+ import { render, screen } from '@/test/testUtils';
2
+ import { mergeDeep } from '@/utils/mergeDeep';
3
+ import { strapiCustomerStoryMock } from '@/test/strapiMocks/strapiCustomerStory';
4
+ import { CustomerStoriesProps } from './CustomerStories';
5
+ import CustomerStories from '.';
6
+
7
+ const defaultProps: CustomerStoriesProps = {
8
+ slice: {
9
+ customer_stories: [
10
+ {
11
+ ...strapiCustomerStoryMock,
12
+ attributes: {
13
+ ...strapiCustomerStoryMock.attributes,
14
+ createdAt: '2022-01-10T15:04:32.897Z',
15
+ },
16
+ },
17
+ ],
18
+ },
19
+ customerStories: [strapiCustomerStoryMock],
20
+ };
21
+
22
+ const setup = (props = {}) => {
23
+ const combinedProps = mergeDeep(defaultProps, props);
24
+ render(<CustomerStories {...combinedProps} />);
25
+ };
26
+
27
+ describe('The CustomerStories component', () => {
28
+ it('displays all the customer story titles', () => {
29
+ setup();
30
+
31
+ expect(
32
+ screen.getByText(strapiCustomerStoryMock.attributes.title)
33
+ ).toBeInTheDocument();
34
+ });
35
+
36
+ it('displays nothing if the customer story that should be displayed does not exists in the delivered customer stories', () => {
37
+ setup({ customerStories: [] });
38
+
39
+ expect(
40
+ screen.queryByText(strapiCustomerStoryMock.attributes.title)
41
+ ).not.toBeInTheDocument();
42
+ });
43
+ });
@@ -0,0 +1,84 @@
1
+ import IStrapiData from '@/models/strapi/IStrapiData';
2
+ import StrapiCustomerStory from '@/models/strapi/StrapiCustomerStory';
3
+ import strapiMediaUrl from '@/utils/strapiMediaUrl';
4
+ import {
5
+ Box,
6
+ Button,
7
+ Center,
8
+ Container,
9
+ DefaultSectionContainer,
10
+ Heading,
11
+ SimpleGrid,
12
+ Text,
13
+ Wrapper,
14
+ } from 'boemly';
15
+ import Image from 'next/image';
16
+ import Link from 'next/link';
17
+ import { FormattedMessage } from 'react-intl';
18
+
19
+ export interface CustomerStoriesProps {
20
+ slice: {
21
+ customer_stories: IStrapiData<StrapiCustomerStory>[];
22
+ };
23
+ customerStories: IStrapiData<StrapiCustomerStory>[];
24
+ }
25
+
26
+ export const CustomerStories = ({
27
+ slice,
28
+ customerStories,
29
+ }: CustomerStoriesProps): JSX.Element => (
30
+ <DefaultSectionContainer>
31
+ <Wrapper>
32
+ <SimpleGrid columns={[1, null, null, 2]} spacingX={56} spacingY={24}>
33
+ {slice.customer_stories.map(({ attributes }) => {
34
+ const customerStory: IStrapiData<StrapiCustomerStory> | undefined =
35
+ customerStories.find(
36
+ (cs) => cs.attributes.slug === attributes.slug
37
+ );
38
+ if (!customerStory) {
39
+ return null;
40
+ }
41
+ return (
42
+ <Container padding="none" key={customerStory.id}>
43
+ <Center
44
+ height="24"
45
+ backgroundColor="primary.50"
46
+ borderTopRadius="xl"
47
+ >
48
+ <Box position="relative" height="12" width="12">
49
+ <Image
50
+ src={strapiMediaUrl(
51
+ customerStory.attributes.customerLogo.img,
52
+ 'medium'
53
+ )}
54
+ alt={customerStory.attributes.customerLogo.alt}
55
+ fill
56
+ style={{
57
+ objectFit:
58
+ customerStory.attributes.customerLogo.objectFit,
59
+ }}
60
+ />
61
+ </Box>
62
+ </Center>
63
+ <Box px="6" pt="12" pb="6">
64
+ <Text size="xsMonoUppercase" color="gray.500" mb="2">
65
+ {customerStory.attributes.customerIndustry}
66
+ </Text>
67
+ <Heading size="xl">{customerStory.attributes.title}</Heading>
68
+ <Button
69
+ as={Link}
70
+ href={`/customer-stories/${customerStory.attributes.slug}`}
71
+ variant="outline"
72
+ size="sm"
73
+ mt="12"
74
+ >
75
+ <FormattedMessage id="sections.customerStories.more" />
76
+ </Button>
77
+ </Box>
78
+ </Container>
79
+ );
80
+ })}
81
+ </SimpleGrid>
82
+ </Wrapper>
83
+ </DefaultSectionContainer>
84
+ );
@@ -0,0 +1,3 @@
1
+ import { CustomerStories } from './CustomerStories';
2
+
3
+ export default CustomerStories;
@@ -0,0 +1,3 @@
1
+ export default {
2
+ 'sections.customerStories.more': 'Weiterlesen',
3
+ };
@@ -0,0 +1,3 @@
1
+ export default {
2
+ 'sections.customerStories.more': 'Read more',
3
+ };
@@ -0,0 +1,97 @@
1
+ import { Meta, StoryFn } from '@storybook/react';
2
+ import Facts from '.';
3
+
4
+ export default {
5
+ title: 'sections/Facts',
6
+ component: Facts,
7
+ } as Meta<typeof Facts>;
8
+
9
+ const Template: StoryFn<typeof Facts> = (args) => <Facts {...args} />;
10
+
11
+ export const Minimal = Template.bind({});
12
+ Minimal.args = {
13
+ slice: {
14
+ variant: 'gray',
15
+ facts: [
16
+ { key: 'Key 1', value: 'Value 1' },
17
+ { key: 'Key 2', value: 'Value 2' },
18
+ { key: 'Key 3', value: 'Value 3' },
19
+ ],
20
+ },
21
+ };
22
+
23
+ export const WithTitle = Template.bind({});
24
+ WithTitle.args = {
25
+ slice: {
26
+ tagline: 'Tagline',
27
+ title: 'Title',
28
+ subTitle: 'Sub title',
29
+ variant: 'gray',
30
+ facts: [
31
+ { key: 'Key 1', value: 'Value 1' },
32
+ { key: 'Key 2', value: 'Value 2' },
33
+ { key: 'Key 3', value: 'Value 3' },
34
+ ],
35
+ },
36
+ };
37
+
38
+ export const WithButton = Template.bind({});
39
+ WithButton.args = {
40
+ slice: {
41
+ button: {
42
+ id: 1,
43
+ text: 'Button',
44
+ url: 'https://tree.ly',
45
+ },
46
+ variant: 'gray',
47
+ facts: [
48
+ { key: 'Key 1', value: 'Value 1' },
49
+ { key: 'Key 2', value: 'Value 2' },
50
+ { key: 'Key 3', value: 'Value 3' },
51
+ { key: 'Key 4', value: 'Value 4' },
52
+ ],
53
+ },
54
+ };
55
+
56
+ export const Green = Template.bind({});
57
+ Green.args = {
58
+ slice: {
59
+ tagline: 'Tagline',
60
+ title: 'Title',
61
+ subTitle: 'Sub title',
62
+ button: {
63
+ id: 1,
64
+ text: 'Button',
65
+ url: 'https://tree.ly',
66
+ },
67
+ variant: 'green',
68
+ facts: [
69
+ { key: 'Key 1', value: 'Value 1' },
70
+ { key: 'Key 2', value: 'Value 2' },
71
+ { key: 'Key 3', value: 'Value 3' },
72
+ { key: 'Key 4', value: 'Value 4' },
73
+ ],
74
+ },
75
+ };
76
+
77
+ export const White = Template.bind({});
78
+ White.args = {
79
+ slice: {
80
+ tagline: 'Tagline',
81
+ title: 'Title',
82
+ subTitle: 'Sub title',
83
+ variant: 'white',
84
+ button: {
85
+ id: 1,
86
+ text: 'Button',
87
+ url: 'https://tree.ly',
88
+ },
89
+ facts: [
90
+ { key: 'Key 1', value: 'Value 1' },
91
+ { key: 'Key 2', value: 'Value 2' },
92
+ { key: 'Key 3', value: 'Value 3' },
93
+ { key: 'Key 4', value: 'Value 4' },
94
+ { key: 'Key 5', value: 'Value 5' },
95
+ ],
96
+ },
97
+ };
@@ -0,0 +1,99 @@
1
+ import { render, screen } from '@/test/testUtils';
2
+ import Facts from '.';
3
+ import { FactsProps } from './Facts';
4
+
5
+ const defaultProps: FactsProps = {
6
+ slice: {
7
+ variant: 'gray',
8
+ facts: [
9
+ { key: 'Fact 1', value: 'Value 1' },
10
+ { key: 'Fact 2', value: 'Value 2' },
11
+ { key: 'Fact 3', value: 'Value 3' },
12
+ ],
13
+ },
14
+ };
15
+
16
+ const setup = (props = {}) => {
17
+ const combinedProps = { ...defaultProps, ...props };
18
+ render(<Facts {...combinedProps} />);
19
+ };
20
+
21
+ describe('The Facts component', () => {
22
+ it('displays a link if there is a button in the slice', () => {
23
+ setup({
24
+ slice: { ...defaultProps.slice, button: { url: 'url', text: 'Link' } },
25
+ });
26
+
27
+ expect(screen.getByRole('link')).toBeInTheDocument();
28
+ expect(screen.getByText('Link')).toBeInTheDocument();
29
+ });
30
+
31
+ it('displays the chakra-button with css-e5zvm4 class if the slice.variant is gray', () => {
32
+ setup({
33
+ slice: { ...defaultProps.slice, button: { url: 'url', text: 'Link' } },
34
+ });
35
+
36
+ expect(screen.getByRole('link')).toHaveClass('chakra-button css-e5zvm4');
37
+ });
38
+
39
+ it('displays the chakra-button with css-y35h5g class if the slice.variant is green', () => {
40
+ setup({
41
+ slice: {
42
+ ...defaultProps.slice,
43
+ variant: 'green',
44
+ button: { url: 'url', text: 'Link' },
45
+ },
46
+ });
47
+
48
+ expect(screen.getByRole('link')).toHaveClass('chakra-button css-y35h5g');
49
+ });
50
+
51
+ it('displays the title header when slice.title is defined', () => {
52
+ setup({
53
+ slice: {
54
+ ...defaultProps.slice,
55
+ title: 'Test Title',
56
+ tagline: 'Test Tagline',
57
+ subTitle: 'Test Subtitle',
58
+ },
59
+ });
60
+
61
+ expect(screen.getByText('Test Title')).toBeInTheDocument();
62
+ expect(screen.getByText('Test Tagline')).toBeInTheDocument();
63
+ expect(screen.getByText('Test Subtitle')).toBeInTheDocument();
64
+ });
65
+
66
+ it('does not display the title header when slice.title is undefined', () => {
67
+ setup({
68
+ slice: {
69
+ ...defaultProps.slice,
70
+ tagline: 'Test Tagline',
71
+ subTitle: 'Test Subtitle',
72
+ },
73
+ });
74
+
75
+ expect(screen.queryByText('Test Tagline')).toBeNull();
76
+ });
77
+
78
+ it('displays the facts', () => {
79
+ setup({
80
+ slice: {
81
+ ...defaultProps.slice,
82
+ },
83
+ });
84
+
85
+ expect(screen.getByText('Fact 1')).toBeInTheDocument();
86
+ expect(screen.getByText('Fact 2')).toBeInTheDocument();
87
+ expect(screen.getByText('Fact 3')).toBeInTheDocument();
88
+ });
89
+
90
+ it('does not display a link if the button in the slice is undefined', () => {
91
+ setup({
92
+ slice: {
93
+ ...defaultProps.slice,
94
+ },
95
+ });
96
+
97
+ expect(screen.queryByRole('button')).not.toBeInTheDocument();
98
+ });
99
+ });
@@ -0,0 +1,140 @@
1
+ import {
2
+ DefaultSectionContainer,
3
+ DefaultSectionHeader,
4
+ Flex,
5
+ Heading,
6
+ Spacer,
7
+ Text,
8
+ } from 'boemly';
9
+ import StrapiLinkButton from '@/components/StrapiLinkButton';
10
+ import StrapiLink from '@/models/strapi/StrapiLink';
11
+
12
+ export interface FactsProps {
13
+ slice: {
14
+ tagline?: string;
15
+ title?: string;
16
+ subTitle?: string;
17
+ button?: StrapiLink;
18
+ variant: 'gray' | 'green' | 'white';
19
+ facts: { key: string; value: string }[];
20
+ };
21
+ }
22
+
23
+ const VARIANTS = {
24
+ gray: {
25
+ backgroundColor: 'primary.50',
26
+ tagLineColor: 'primary.500',
27
+ titleColor: 'black',
28
+ subTitleColor: 'black',
29
+ factKeyColor: 'gray.700',
30
+ factValueColor: 'gray.700',
31
+ },
32
+ green: {
33
+ backgroundColor: 'primary.800',
34
+ tagLineColor: 'white',
35
+ titleColor: 'white',
36
+ subTitleColor: 'white',
37
+ factKeyColor: 'whiteAlpha.900',
38
+ factValueColor: 'white',
39
+ },
40
+ white: {
41
+ backgroundColor: 'white',
42
+ tagLineColor: 'primary.500',
43
+ titleColor: 'black',
44
+ subTitleColor: 'black',
45
+ factKeyColor: 'gray.700',
46
+ factValueColor: 'gray.700',
47
+ },
48
+ };
49
+
50
+ export const Facts: React.FC<FactsProps> = ({ slice }: FactsProps) => (
51
+ <DefaultSectionContainer
52
+ backgroundColor={VARIANTS[slice.variant].backgroundColor}
53
+ flexDir="column"
54
+ textAlign="center"
55
+ justifyContent="space-between"
56
+ paddingX={['6', null, '8']}
57
+ title={slice.title}
58
+ >
59
+ <>
60
+ {slice.title && (
61
+ <>
62
+ <DefaultSectionHeader
63
+ tagline={slice.tagline}
64
+ text={slice.subTitle}
65
+ title={slice.title}
66
+ taglineProps={{
67
+ color: VARIANTS[slice.variant].tagLineColor,
68
+ textAlign: 'center',
69
+ }}
70
+ titleProps={{
71
+ color: VARIANTS[slice.variant].titleColor,
72
+ textAlign: 'center',
73
+ maxW: '6xl',
74
+ marginX: 'auto',
75
+ }}
76
+ textProps={{
77
+ color: VARIANTS[slice.variant].subTitleColor,
78
+ textAlign: 'center',
79
+ maxW: '3xl',
80
+ marginX: 'auto',
81
+ }}
82
+ />
83
+ <Spacer height={['0', null, '12']} />
84
+ </>
85
+ )}
86
+ <Flex
87
+ justifyContent={slice.facts.length < 3 ? 'center' : 'flex-start'}
88
+ alignItems="center"
89
+ flexWrap="wrap"
90
+ mx={[null, null, null, '22', '28']}
91
+ flexDir={['column', null, null, 'row']}
92
+ gap={[null, null, null, '12']}
93
+ >
94
+ {slice.facts.map((fact) => (
95
+ <Flex
96
+ key={fact.key}
97
+ flexDir="column"
98
+ width={[
99
+ 'var(--boemly-sizes-full)',
100
+ null,
101
+ null,
102
+ 'calc((var(--boemly-sizes-full) - var(--boemly-space-24))/ 3 )',
103
+ ]}
104
+ mt={['8', '8', '8', slice.facts.length > 3 ? '16' : '0']}
105
+ >
106
+ <Heading
107
+ fontSize="6xl"
108
+ fontFamily="GintoNord"
109
+ lineHeight="10"
110
+ fontWeight="700"
111
+ color={VARIANTS[slice.variant].factValueColor}
112
+ mb="2"
113
+ as="p"
114
+ >
115
+ {fact.value}
116
+ </Heading>
117
+
118
+ <Text
119
+ size="mdLowNormal"
120
+ color={VARIANTS[slice.variant].factKeyColor}
121
+ >
122
+ {fact.key}
123
+ </Text>
124
+ </Flex>
125
+ ))}
126
+ </Flex>
127
+
128
+ {slice.button && (
129
+ <>
130
+ <Spacer height={['0', null, '20']} />
131
+ <StrapiLinkButton
132
+ link={slice.button}
133
+ size="md"
134
+ variant={slice.variant === 'green' ? 'outline' : 'solid'}
135
+ />
136
+ </>
137
+ )}
138
+ </>
139
+ </DefaultSectionContainer>
140
+ );
@@ -0,0 +1,3 @@
1
+ import { Facts } from './Facts';
2
+
3
+ export default Facts;
@@ -0,0 +1,41 @@
1
+ import { StoryFn, Meta } from '@storybook/react';
2
+
3
+ import { storybookStrapiAvatarMock } from '@/test/storybookMocks/storybookStrapiMedia';
4
+ import FullWidthHighlightQuote from '.';
5
+
6
+ export default {
7
+ title: 'sections/FullWidthHighlightQuote',
8
+ component: FullWidthHighlightQuote,
9
+ } as Meta<typeof FullWidthHighlightQuote>;
10
+
11
+ const Template: StoryFn<typeof FullWidthHighlightQuote> = (args) => (
12
+ <FullWidthHighlightQuote {...args} />
13
+ );
14
+
15
+ const avatar = {
16
+ id: 1,
17
+ name: 'Avatar name',
18
+ description: 'Avatar description',
19
+ image: {
20
+ id: 1,
21
+ alt: 'Avatar image alt text',
22
+ img: { data: storybookStrapiAvatarMock },
23
+ },
24
+ };
25
+
26
+ export const Minimal = Template.bind({});
27
+ Minimal.args = {
28
+ slice: {
29
+ quote: '"Quote"',
30
+ avatarWithName: avatar,
31
+ },
32
+ };
33
+
34
+ export const WithTagline = Template.bind({});
35
+ WithTagline.args = {
36
+ slice: {
37
+ tagline: 'Tagline',
38
+ quote: '"Quote"',
39
+ avatarWithName: avatar,
40
+ },
41
+ };
@@ -0,0 +1,39 @@
1
+ import { render, screen } from '@/test/testUtils';
2
+ import { strapiAvatarWithNameMock } from '@/test/strapiMocks/strapiAvatarWithName';
3
+ import FullWidthHighlightQuote from '.';
4
+ import { FullWidthHighlightQuoteProps } from './FullWidthHighlightQuote';
5
+
6
+ const defaultProps: FullWidthHighlightQuoteProps = {
7
+ slice: {
8
+ quote: 'Quote',
9
+ avatarWithName: strapiAvatarWithNameMock,
10
+ },
11
+ };
12
+
13
+ const setup = (props = {}) => {
14
+ const combinedProps = { ...defaultProps, ...props };
15
+ render(<FullWidthHighlightQuote {...combinedProps} />);
16
+ };
17
+
18
+ describe('The FullWidthHighlightQuote component', () => {
19
+ it('displays a tagline if there is a tagline in the slice', () => {
20
+ setup({ slice: { ...defaultProps.slice, tagline: 'Tagline' } });
21
+
22
+ expect(screen.getByText('Tagline')).toBeInTheDocument();
23
+ });
24
+
25
+ it('displays the quote', () => {
26
+ setup();
27
+
28
+ expect(screen.getByText(defaultProps.slice.quote)).toBeInTheDocument();
29
+ });
30
+
31
+ it('displays the avatar with name', () => {
32
+ setup();
33
+
34
+ expect(screen.getByRole('img')).toHaveAttribute(
35
+ 'alt',
36
+ strapiAvatarWithNameMock.image.alt
37
+ );
38
+ });
39
+ });