@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,60 @@
1
+ import { StoryFn, Meta } from '@storybook/react';
2
+
3
+ import LinkCardsGrid from '.';
4
+
5
+ export default {
6
+ title: 'sections/LinkCardsGrid',
7
+ component: LinkCardsGrid,
8
+ } as Meta<typeof LinkCardsGrid>;
9
+
10
+ const Template: StoryFn<typeof LinkCardsGrid> = (args) => (
11
+ <LinkCardsGrid {...args} />
12
+ );
13
+
14
+ export const Minimal = Template.bind({});
15
+ Minimal.args = {
16
+ slice: {
17
+ title: 'Title',
18
+ cards: [
19
+ {
20
+ id: 1,
21
+ title: 'Title',
22
+ text: 'Text',
23
+ link: { id: 1, text: 'Text', url: '/' },
24
+ },
25
+ ],
26
+ },
27
+ };
28
+
29
+ export const WithTagline = Template.bind({});
30
+ WithTagline.args = {
31
+ slice: {
32
+ tagline: 'Tagline',
33
+ title: 'Title',
34
+ cards: [
35
+ {
36
+ id: 1,
37
+ title: 'Title',
38
+ text: 'Text',
39
+ link: { id: 1, text: 'Text', url: '/' },
40
+ },
41
+ ],
42
+ },
43
+ };
44
+
45
+ export const WithTaglineAndText = Template.bind({});
46
+ WithTaglineAndText.args = {
47
+ slice: {
48
+ tagline: 'Tagline',
49
+ title: 'Title',
50
+ text: 'Text',
51
+ cards: [
52
+ {
53
+ id: 1,
54
+ title: 'Title',
55
+ text: 'Text',
56
+ link: { id: 1, text: 'Text', url: '/' },
57
+ },
58
+ ],
59
+ },
60
+ };
@@ -0,0 +1,36 @@
1
+ import { render, screen } from '@/test/testUtils';
2
+ import LinkCardsGrid from '.';
3
+ import { LinkCardsGridProps } from './LinkCardsGrid';
4
+
5
+ const defaultProps: LinkCardsGridProps = {
6
+ slice: {
7
+ title: 'Title',
8
+ cards: [
9
+ {
10
+ id: 1,
11
+ title: 'Title',
12
+ text: 'Text',
13
+ link: { id: 1, text: 'Text', url: '/' },
14
+ },
15
+ ],
16
+ },
17
+ };
18
+
19
+ const setup = (props = {}) => {
20
+ const combinedProps = { ...defaultProps, ...props };
21
+ render(<LinkCardsGrid {...combinedProps} />);
22
+ };
23
+
24
+ describe('The LinkCardsGrid component', () => {
25
+ it('displays the section header', () => {
26
+ setup();
27
+
28
+ expect(screen.getByTestId('default-section-header')).toBeInTheDocument();
29
+ });
30
+
31
+ it('displays the link', () => {
32
+ setup();
33
+
34
+ expect(screen.getByTestId('link')).toHaveAttribute('href', '/');
35
+ });
36
+ });
@@ -0,0 +1,95 @@
1
+ import Link from 'next/link';
2
+ import {
3
+ Box,
4
+ DefaultSectionContainer,
5
+ DefaultSectionHeader,
6
+ Heading,
7
+ SimpleGrid,
8
+ Text,
9
+ Wrapper,
10
+ } from 'boemly';
11
+ import { CaretRight } from '@phosphor-icons/react';
12
+ import { MEDIUM_TRANSITION_DURATION } from '@/constants/animations';
13
+ import strapiLinkUrl from '@/utils/strapiLinkUrl';
14
+ import StrapiLink from '@/models/strapi/StrapiLink';
15
+
16
+ interface LinkCardsGridSlice {
17
+ tagline?: string;
18
+ title: string;
19
+ text?: string;
20
+ cards: {
21
+ id: number;
22
+ title: string;
23
+ text?: string;
24
+ link: StrapiLink;
25
+ }[];
26
+ }
27
+ export interface LinkCardsGridProps {
28
+ slice: LinkCardsGridSlice;
29
+ }
30
+
31
+ export const LinkCardsGrid: React.FC<LinkCardsGridProps> = ({
32
+ slice,
33
+ }: LinkCardsGridProps) => (
34
+ <DefaultSectionContainer title={slice.title}>
35
+ <Wrapper>
36
+ <DefaultSectionHeader
37
+ tagline={slice.tagline}
38
+ title={slice.title}
39
+ text={slice.text}
40
+ />
41
+
42
+ <SimpleGrid mt="16" columns={[1, null, null, null, 2]} gap="4">
43
+ {slice.cards.map(({ id, title, text, link }) => (
44
+ <Link key={id} href={strapiLinkUrl(link)} passHref legacyBehavior>
45
+ <Box
46
+ data-testid="link"
47
+ px="10"
48
+ py="8"
49
+ borderStyle="solid"
50
+ borderWidth="thin"
51
+ borderColor="gray.200"
52
+ borderRadius="2xl"
53
+ display="flex"
54
+ flexDir="row"
55
+ alignItems="center"
56
+ justifyContent="space-between"
57
+ cursor="pointer"
58
+ transitionDuration={`${MEDIUM_TRANSITION_DURATION}s`}
59
+ _hover={{ backgroundColor: 'gray.50' }}
60
+ >
61
+ <div>
62
+ <Heading as="h4" size="lg">
63
+ {title}
64
+ </Heading>
65
+ {text && (
66
+ <Text mt="2" size="smRegularNormal">
67
+ {text}
68
+ </Text>
69
+ )}
70
+ </div>
71
+
72
+ <Box
73
+ display="flex"
74
+ alignItems="center"
75
+ justifyContent="center"
76
+ borderStyle="solid"
77
+ borderWidth="thin"
78
+ borderColor="gray.200"
79
+ borderRadius="2xl"
80
+ height="12"
81
+ width="12"
82
+ minWidth="12"
83
+ minHeight="12"
84
+ ml="6"
85
+ backgroundColor="white"
86
+ >
87
+ <CaretRight />
88
+ </Box>
89
+ </Box>
90
+ </Link>
91
+ ))}
92
+ </SimpleGrid>
93
+ </Wrapper>
94
+ </DefaultSectionContainer>
95
+ );
@@ -0,0 +1,3 @@
1
+ import { LinkCardsGrid } from './LinkCardsGrid';
2
+
3
+ export default LinkCardsGrid;
@@ -0,0 +1,73 @@
1
+ import { StoryFn, Meta } from '@storybook/react';
2
+
3
+ import { storybookStrapiTreeIconMock } from '@/test/storybookMocks/storybookStrapiMedia';
4
+ import LogoGridWithText from '.';
5
+
6
+ export default {
7
+ title: 'sections/LogoGridWithText',
8
+ component: LogoGridWithText,
9
+ } as Meta<typeof LogoGridWithText>;
10
+
11
+ const Template: StoryFn<typeof LogoGridWithText> = (args) => (
12
+ <LogoGridWithText {...args} />
13
+ );
14
+
15
+ const logos = [
16
+ { id: 1, alt: 'Alt text 1', img: { data: storybookStrapiTreeIconMock } },
17
+ { id: 2, alt: 'Alt text 2', img: { data: storybookStrapiTreeIconMock } },
18
+ ];
19
+
20
+ export const Minimal = Template.bind({});
21
+ Minimal.args = {
22
+ slice: {
23
+ title: 'Title',
24
+ text: 'Text',
25
+ logos,
26
+ },
27
+ };
28
+
29
+ export const WithButton = Template.bind({});
30
+ WithButton.args = {
31
+ slice: {
32
+ title: 'Title',
33
+ text: 'Text',
34
+ button: { id: 1, text: 'Button', url: 'https://tree.ly' },
35
+ logos,
36
+ },
37
+ };
38
+
39
+ export const WithMoreThan2Logos = Template.bind({});
40
+ WithMoreThan2Logos.args = {
41
+ slice: {
42
+ title: 'Title',
43
+ text: 'Text',
44
+ button: { id: 1, text: 'Button', url: 'https://tree.ly' },
45
+ logos: [
46
+ ...logos,
47
+ { id: 3, alt: 'Alt text 3', img: { data: storybookStrapiTreeIconMock } },
48
+ { id: 4, alt: 'Alt text 4', img: { data: storybookStrapiTreeIconMock } },
49
+ ],
50
+ },
51
+ };
52
+
53
+ export const WithLogosWithLinks = Template.bind({});
54
+ WithLogosWithLinks.args = {
55
+ slice: {
56
+ title: 'Title',
57
+ text: 'Text',
58
+ logos: [
59
+ {
60
+ id: 1,
61
+ alt: 'Logo with link 1',
62
+ img: { data: storybookStrapiTreeIconMock },
63
+ link: { id: 1, text: 'Link', url: 'https://tree.ly' },
64
+ },
65
+ {
66
+ id: 2,
67
+ alt: 'Logo with link 2',
68
+ img: { data: storybookStrapiTreeIconMock },
69
+ link: { id: 2, text: 'Link', url: 'https://tree.ly' },
70
+ },
71
+ ],
72
+ },
73
+ };
@@ -0,0 +1,55 @@
1
+ import { render, screen } from '@/test/testUtils';
2
+ import { strapiMediaMock } from '@/test/strapiMocks/strapiMedia';
3
+ import LogoGridWithText from '.';
4
+ import { LogoGridWithTextProps } from './LogoGridWithText';
5
+
6
+ const defaultProps: LogoGridWithTextProps = {
7
+ slice: {
8
+ title: 'Title',
9
+ text: 'Text',
10
+ logos: [{ id: 1, alt: 'Alt text 1', img: { data: strapiMediaMock } }],
11
+ },
12
+ };
13
+
14
+ const setup = (props = {}) => {
15
+ const combinedProps = { ...defaultProps, ...props };
16
+ render(<LogoGridWithText {...combinedProps} />);
17
+ };
18
+
19
+ describe('The LogoGridWithText component', () => {
20
+ it('displays the title', () => {
21
+ setup();
22
+
23
+ expect(screen.getByText(defaultProps.slice.title)).toBeInTheDocument();
24
+ });
25
+
26
+ it('displays the text', () => {
27
+ setup();
28
+
29
+ expect(screen.getByText(defaultProps.slice.text)).toBeInTheDocument();
30
+ });
31
+
32
+ it('displays the button if one is defined', () => {
33
+ setup({
34
+ slice: {
35
+ ...defaultProps.slice,
36
+ button: {
37
+ id: 1,
38
+ text: 'Button text',
39
+ url: 'url',
40
+ },
41
+ },
42
+ });
43
+
44
+ expect(screen.getByText('Button text')).toBeInTheDocument();
45
+ });
46
+
47
+ it('displays the logo', () => {
48
+ setup();
49
+
50
+ expect(screen.getByRole('img')).toHaveAttribute(
51
+ 'alt',
52
+ defaultProps.slice.logos[0].alt
53
+ );
54
+ });
55
+ });
@@ -0,0 +1,95 @@
1
+ import {
2
+ Box,
3
+ DefaultSectionContainer,
4
+ Flex,
5
+ Heading,
6
+ RichText,
7
+ SimpleGrid,
8
+ useToken,
9
+ Wrapper,
10
+ } from 'boemly';
11
+ import Image from 'next/image';
12
+ import { ArrowRight } from '@phosphor-icons/react';
13
+ import strapiLinkUrl from '@/utils/strapiLinkUrl';
14
+ import strapiMediaUrl from '@/utils/strapiMediaUrl';
15
+ import StrapiLinkButton from '@/components/StrapiLinkButton';
16
+ import StrapiImageWithLink from '@/models/strapi/StrapiImageWithLink';
17
+ import StrapiLink from '@/models/strapi/StrapiLink';
18
+ import { LogoFlexContainer } from './styles';
19
+
20
+ export interface LogoGridWithTextProps {
21
+ slice: {
22
+ title: string;
23
+ text: string;
24
+ button?: StrapiLink;
25
+ logos: StrapiImageWithLink[];
26
+ };
27
+ }
28
+
29
+ export const LogoGridWithText: React.FC<LogoGridWithTextProps> = ({
30
+ slice,
31
+ }: LogoGridWithTextProps) => {
32
+ const [primary50] = useToken('colors', ['primary.50']);
33
+
34
+ return (
35
+ <DefaultSectionContainer backgroundColor={primary50} title={slice.title}>
36
+ <Wrapper>
37
+ <SimpleGrid columns={2} gap="28" minChildWidth="16rem">
38
+ <Box
39
+ display="flex"
40
+ flexDirection="column"
41
+ justifyContent="center"
42
+ alignItems="flex-start"
43
+ >
44
+ <Heading as="h2" size="3xl" mb="4">
45
+ {slice.title}
46
+ </Heading>
47
+ <RichText content={slice.text} />
48
+ {slice.button && (
49
+ <StrapiLinkButton
50
+ link={slice.button}
51
+ size="md"
52
+ colorScheme="white"
53
+ variant="outline"
54
+ mt="6"
55
+ rightIcon={<ArrowRight />}
56
+ />
57
+ )}
58
+ </Box>
59
+ <LogoFlexContainer>
60
+ {slice.logos.map((logo) => (
61
+ <Flex
62
+ key={logo.id}
63
+ justifyContent="center"
64
+ alignItems="center"
65
+ flexGrow={1}
66
+ flexShrink={0}
67
+ flexBasis={slice.logos.length > 2 ? '34%' : '90%'} // 34% are just enough to not allow three in one row
68
+ >
69
+ <Box position="relative" height="20" width="100%">
70
+ {logo.link ? (
71
+ <a href={strapiLinkUrl(logo.link)}>
72
+ <Image
73
+ src={strapiMediaUrl(logo.img, 'small')}
74
+ alt={logo.alt}
75
+ fill
76
+ style={{ objectFit: logo.objectFit || 'contain' }}
77
+ />
78
+ </a>
79
+ ) : (
80
+ <Image
81
+ src={strapiMediaUrl(logo.img, 'small')}
82
+ alt={logo.alt}
83
+ fill
84
+ style={{ objectFit: logo.objectFit || 'contain' }}
85
+ />
86
+ )}
87
+ </Box>
88
+ </Flex>
89
+ ))}
90
+ </LogoFlexContainer>
91
+ </SimpleGrid>
92
+ </Wrapper>
93
+ </DefaultSectionContainer>
94
+ );
95
+ };
@@ -0,0 +1,3 @@
1
+ import { LogoGridWithText } from './LogoGridWithText';
2
+
3
+ export default LogoGridWithText;
@@ -0,0 +1,13 @@
1
+ import styled from '@emotion/styled';
2
+ import { BREAKPOINT_LG } from '@/constants/breakpoints';
3
+
4
+ export const LogoFlexContainer = styled.div`
5
+ display: flex;
6
+ flex-direction: row;
7
+ flex-wrap: wrap;
8
+ gap: var(--boemly-space-28);
9
+
10
+ @media screen and (max-width: ${BREAKPOINT_LG}) {
11
+ gap: var(--boemly-space-12);
12
+ }
13
+ `;
@@ -0,0 +1,112 @@
1
+ import { StoryFn, Meta } from '@storybook/react';
2
+
3
+ import {
4
+ storybookStrapiGradientBottomUpMock,
5
+ storybookStrapiMapMock,
6
+ } from '@/test/storybookMocks/storybookStrapiMedia';
7
+ import MapHero from '.';
8
+
9
+ export default {
10
+ title: 'sections/MapHero',
11
+ component: MapHero,
12
+ } as Meta<typeof MapHero>;
13
+
14
+ const Template: StoryFn<typeof MapHero> = (args) => <MapHero {...args} />;
15
+
16
+ export const Minimal = Template.bind({});
17
+ Minimal.args = {
18
+ slice: {
19
+ title: 'Title',
20
+ map: { id: 1, alt: 'Map alt text', img: { data: storybookStrapiMapMock } },
21
+ mobileMap: {
22
+ id: 1,
23
+ alt: 'Mobile map alt text',
24
+ img: { data: storybookStrapiMapMock },
25
+ },
26
+ },
27
+ };
28
+
29
+ export const WithTagline = Template.bind({});
30
+ WithTagline.args = {
31
+ slice: {
32
+ tagline: 'Tagline',
33
+ title: 'Title',
34
+ map: { id: 1, alt: 'Map alt text', img: { data: storybookStrapiMapMock } },
35
+ mobileMap: {
36
+ id: 1,
37
+ alt: 'Mobile map alt text',
38
+ img: { data: storybookStrapiMapMock },
39
+ },
40
+ },
41
+ };
42
+
43
+ export const WithTaglineAndSubTitle = Template.bind({});
44
+ WithTaglineAndSubTitle.args = {
45
+ slice: {
46
+ tagline: 'Tagline',
47
+ title: 'Title',
48
+ subTitle: 'Text',
49
+ map: { id: 1, alt: 'Map alt text', img: { data: storybookStrapiMapMock } },
50
+ mobileMap: {
51
+ id: 1,
52
+ alt: 'Mobile map alt text',
53
+ img: { data: storybookStrapiMapMock },
54
+ },
55
+ },
56
+ };
57
+
58
+ export const WithButton = Template.bind({});
59
+ WithButton.args = {
60
+ slice: {
61
+ tagline: 'Tagline',
62
+ title: 'Title',
63
+ subTitle: 'Text',
64
+ buttons: [{ id: 1, text: 'Button', url: 'https://tree.ly' }],
65
+ map: { id: 1, alt: 'Map alt text', img: { data: storybookStrapiMapMock } },
66
+ mobileMap: {
67
+ id: 1,
68
+ alt: 'Mobile map alt text',
69
+ img: { data: storybookStrapiMapMock },
70
+ },
71
+ },
72
+ };
73
+
74
+ export const WithTwoButtons = Template.bind({});
75
+ WithTwoButtons.args = {
76
+ slice: {
77
+ tagline: 'Tagline',
78
+ title: 'Title',
79
+ subTitle: 'Text',
80
+ buttons: [
81
+ { id: 1, text: 'Button 1', url: 'https://tree.ly' },
82
+ { id: 2, text: 'Button 2', url: 'https://tree.ly' },
83
+ ],
84
+ map: { id: 1, alt: 'Map alt text', img: { data: storybookStrapiMapMock } },
85
+ mobileMap: {
86
+ id: 1,
87
+ alt: 'Mobile map alt text',
88
+ img: { data: storybookStrapiMapMock },
89
+ },
90
+ },
91
+ };
92
+
93
+ export const WithShape = Template.bind({});
94
+ WithShape.args = {
95
+ slice: {
96
+ tagline: 'Tagline',
97
+ title: 'Title',
98
+ subTitle: 'Text',
99
+ buttons: [{ id: 1, text: 'Button', url: 'https://tree.ly' }],
100
+ shape: {
101
+ id: 1,
102
+ alt: 'Shape',
103
+ img: { data: storybookStrapiGradientBottomUpMock },
104
+ },
105
+ map: { id: 1, alt: 'Map alt text', img: { data: storybookStrapiMapMock } },
106
+ mobileMap: {
107
+ id: 1,
108
+ alt: 'Mobile map alt text',
109
+ img: { data: storybookStrapiMapMock },
110
+ },
111
+ },
112
+ };
@@ -0,0 +1,85 @@
1
+ import { render, screen } from '@/test/testUtils';
2
+ import { strapiMediaMock } from '@/test/strapiMocks/strapiMedia';
3
+ import MapHero from '.';
4
+ import { MapHeroProps } from './MapHero';
5
+
6
+ const defaultProps: MapHeroProps = {
7
+ slice: {
8
+ title: 'Title',
9
+ map: {
10
+ id: 1,
11
+ alt: 'Map alt text',
12
+ img: { data: strapiMediaMock },
13
+ },
14
+ mobileMap: {
15
+ id: 1,
16
+ alt: 'Map alt text',
17
+ img: { data: strapiMediaMock },
18
+ },
19
+ },
20
+ };
21
+
22
+ const setup = (props = {}) => {
23
+ const combinedProps = { ...defaultProps, ...props };
24
+ render(<MapHero {...combinedProps} />);
25
+ };
26
+
27
+ describe('The MapHero component', () => {
28
+ it('displays the section header', () => {
29
+ setup();
30
+
31
+ expect(screen.getByTestId('default-section-header')).toBeInTheDocument();
32
+ });
33
+
34
+ it('displays a map', () => {
35
+ setup();
36
+
37
+ expect(screen.getByRole('img')).toHaveAttribute(
38
+ 'alt',
39
+ defaultProps.slice.map.alt
40
+ );
41
+ });
42
+
43
+ it('displays no link if there is no button in the slice', async () => {
44
+ setup();
45
+
46
+ expect(screen.queryByRole('link')).not.toBeInTheDocument();
47
+ });
48
+
49
+ it('displays a link if there is a button in the slice', () => {
50
+ setup({
51
+ slice: { ...defaultProps.slice, buttons: [{ url: 'url', text: 'Link' }] },
52
+ });
53
+
54
+ expect(screen.getByRole('link')).toBeInTheDocument();
55
+ expect(screen.getByText('Link')).toBeInTheDocument();
56
+ });
57
+
58
+ it('displays two links if there are two buttons in the slice', () => {
59
+ setup({
60
+ slice: {
61
+ ...defaultProps.slice,
62
+ buttons: [
63
+ { url: 'url', text: 'Link-1' },
64
+ { url: 'url', text: 'Link-2' },
65
+ ],
66
+ },
67
+ });
68
+
69
+ expect(screen.getAllByRole('link')).toHaveLength(2);
70
+ expect(screen.getByText('Link-1')).toBeInTheDocument();
71
+ expect(screen.getByText('Link-2')).toBeInTheDocument();
72
+ });
73
+
74
+ it('displays a shape if there is a shape in the slice', () => {
75
+ setup({
76
+ slice: {
77
+ ...defaultProps.slice,
78
+ textAlign: 'left',
79
+ shape: { id: 1, img: { data: strapiMediaMock }, alt: 'Shape alt text' },
80
+ },
81
+ });
82
+
83
+ expect(screen.getAllByRole('img').length).toBe(2);
84
+ });
85
+ });