@treely/strapi-slices 1.0.0 → 1.0.2
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.
- package/dist/components/ContextProvider/ContextProvider.d.ts +8 -0
- package/dist/components/ContextProvider/index.d.ts +1 -0
- package/dist/components/CreditsAvailableBadge/CreditsAvailableBadge.d.ts +3 -2
- package/dist/components/FullScreenImage/FullScreenImage.d.ts +3 -2
- package/dist/components/FullScreenImage/ZoomableImage.d.ts +3 -2
- package/dist/components/MinimalProviders/MinimalProviders.d.ts +2 -2
- package/dist/components/SliceRenderer/SliceRenderer.d.ts +7 -5
- package/dist/components/SliceRenderer/index.d.ts +1 -2
- package/dist/components/StrapiLinkButton/StrapiLinkButton.d.ts +2 -2
- package/dist/components/StrapiLinkButtonWithIcon/StrapiLinkButtonWithIcon.d.ts +2 -2
- package/dist/components/portfolio/Contact/Contact.d.ts +3 -3
- package/dist/components/portfolio/DocumentsDownloadList/DocumentsDownloadList.d.ts +2 -2
- package/dist/components/portfolio/ProjectInfo/ProjectInfo.d.ts +2 -2
- package/dist/components/portfolio/SmallCheckout/SmallCheckout.d.ts +3 -2
- package/dist/icons/LinkedInIcon.d.ts +2 -1
- package/dist/slices/Blog/Blog.d.ts +3 -3
- package/dist/slices/Blog/styles.d.ts +4 -6
- package/dist/slices/BlogCards/BlogCards.d.ts +6 -6
- package/dist/slices/Comparison/Comparison.d.ts +3 -3
- package/dist/slices/Cta/Cta.d.ts +3 -3
- package/dist/slices/CtaOnly/CtaOnly.d.ts +2 -2
- package/dist/slices/CustomerStories/CustomerStories.d.ts +2 -2
- package/dist/slices/Facts/Facts.d.ts +2 -2
- package/dist/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.d.ts +2 -2
- package/dist/slices/FullWidthImage/FullWidthImage.d.ts +3 -3
- package/dist/slices/FullWidthImageSlider/FullWidthImageSlider.d.ts +2 -2
- package/dist/slices/FullWidthImageSlider/styles.d.ts +10 -15
- package/dist/slices/FullWidthImageSlider/utils.test.d.ts +1 -0
- package/dist/slices/Glossary/Glossary.d.ts +3 -3
- package/dist/slices/Hero/Hero.d.ts +4 -4
- package/dist/slices/IconGrid/IconGrid.d.ts +3 -3
- package/dist/slices/ImageGrid/ImageGrid.d.ts +4 -4
- package/dist/slices/ImageTextSequence/ImageTextSequence.d.ts +4 -4
- package/dist/slices/LeftTextRightCard/LeftTextRightCard.d.ts +4 -4
- package/dist/slices/LinkCardsGrid/LinkCardsGrid.d.ts +2 -2
- package/dist/slices/LogoGridWithText/LogoGridWithText.d.ts +3 -3
- package/dist/slices/MapHero/MapHero.d.ts +3 -3
- package/dist/slices/MapHero/styles.d.ts +10 -15
- package/dist/slices/ProjectFacts/ProjectFacts.d.ts +4 -4
- package/dist/slices/ProjectsGrid/ProjectsGrid.d.ts +2 -2
- package/dist/slices/ProjectsMap/MapMarker.d.ts +3 -2
- package/dist/slices/ProjectsMap/ProjectsMap.d.ts +2 -3
- package/dist/slices/ProjectsMap/mapboxStyle.d.ts +2 -0
- package/dist/slices/QAndA/QAndA.d.ts +3 -3
- package/dist/slices/QuoteCards/QuoteCards.d.ts +5 -5
- package/dist/slices/RichTextSection/RichTextSection.d.ts +1 -1
- package/dist/slices/SideBySideImages/SideBySideImages.d.ts +2 -2
- package/dist/slices/SmallHero/SmallHero.d.ts +3 -3
- package/dist/slices/Steps/Steps.d.ts +4 -4
- package/dist/slices/TextCardGrid/TextCardGrid.d.ts +4 -4
- package/dist/slices/TextCarousel/TextCarousel.d.ts +4 -4
- package/dist/slices/TextCarousel/styles.d.ts +6 -9
- package/dist/slices/TextWithCard/TextWithCard.d.ts +3 -3
- package/dist/slices/TextWithTextCards/TextWithTextCards.d.ts +5 -5
- package/dist/slices/Video/Video.d.ts +1 -1
- package/dist/strapi-slices.cjs.development.js +4639 -35
- package/dist/strapi-slices.cjs.development.js.map +1 -1
- package/dist/strapi-slices.cjs.production.min.js +1 -1
- package/dist/strapi-slices.cjs.production.min.js.map +1 -1
- package/dist/strapi-slices.esm.js +4629 -35
- package/dist/strapi-slices.esm.js.map +1 -1
- package/dist/test/integrationMocks/fpmProjectMock.d.ts +1 -1
- package/dist/test/mocks/portfolioProjectMock.d.ts +1 -1
- package/dist/test/storybookMocks/storybookStrapiMedia.d.ts +2 -2
- package/dist/test/strapiMocks/minimalGlobalData.d.ts +2 -2
- package/dist/test/strapiMocks/strapiBlogPost.d.ts +2 -2
- package/dist/test/strapiMocks/strapiContact.d.ts +1 -1
- package/dist/test/strapiMocks/strapiCustomerStory.d.ts +2 -2
- package/dist/test/strapiMocks/strapiHeroCard.d.ts +1 -1
- package/dist/test/strapiMocks/strapiLinkPage.d.ts +2 -2
- package/dist/test/strapiMocks/strapiMedia.d.ts +2 -2
- package/dist/test/strapiMocks/strapiMetadata.d.ts +1 -1
- package/dist/test/strapiMocks/strapiPage.d.ts +2 -2
- package/dist/test/strapiMocks/strapiPortfolioCard.d.ts +1 -1
- package/dist/test/strapiMocks/strapiPortfolioMock.d.ts +2 -2
- package/dist/test/strapiMocks/strapiProject.d.ts +2 -2
- package/dist/test/strapiMocks/strapiProjectCard.d.ts +1 -1
- package/dist/test/strapiMocks/strapiQuoteCard.d.ts +1 -1
- package/dist/utils/convertAreaM2ToHa.test.d.ts +1 -0
- package/dist/utils/convertToKebabCase.test.d.ts +1 -0
- package/dist/utils/getTimeSpanInYears.test.d.ts +1 -0
- package/dist/utils/mergeBoundingBoxes.d.ts +1 -1
- package/dist/utils/mergeBoundingBoxes.test.d.ts +1 -0
- package/dist/utils/strapiLinkUrl.d.ts +1 -1
- package/dist/utils/strapiLinkUrl.test.d.ts +1 -0
- package/dist/utils/strapiMediaUrl.d.ts +3 -3
- package/dist/utils/strapiMediaUrl.test.d.ts +1 -0
- package/package.json +7 -4
- package/src/components/ContextProvider/ContextProvider.tsx +40 -0
- package/src/components/ContextProvider/index.ts +1 -0
- package/src/components/CreditsAvailableBadge/CreditsAvailableBadge.test.tsx +3 -2
- package/src/components/CreditsAvailableBadge/CreditsAvailableBadge.tsx +4 -3
- package/src/components/FullScreenImage/FullScreenImage.test.tsx +3 -2
- package/src/components/FullScreenImage/FullScreenImage.tsx +2 -2
- package/src/components/FullScreenImage/ZoomableImage.tsx +2 -2
- package/src/components/MinimalProviders/MinimalProviders.tsx +4 -3
- package/src/components/SliceRenderer/SliceRenderer.test.tsx +3 -2
- package/src/components/SliceRenderer/SliceRenderer.tsx +45 -40
- package/src/components/SliceRenderer/index.ts +1 -3
- package/src/components/StrapiLinkButton/StrapiLinkButton.test.tsx +2 -1
- package/src/components/StrapiLinkButton/StrapiLinkButton.tsx +10 -13
- package/src/components/StrapiLinkButtonWithIcon/StrapiLinkButtonWithIcon.test.tsx +2 -1
- package/src/components/StrapiLinkButtonWithIcon/StrapiLinkButtonWithIcon.tsx +3 -2
- package/src/components/portfolio/Contact/Contact.test.tsx +4 -3
- package/src/components/portfolio/Contact/Contact.tsx +5 -4
- package/src/components/portfolio/DocumentsDownloadList/DocumentsDownloadList.test.tsx +2 -1
- package/src/components/portfolio/DocumentsDownloadList/DocumentsDownloadList.tsx +7 -4
- package/src/components/portfolio/ProjectInfo/ProjectInfo.test.tsx +3 -2
- package/src/components/portfolio/ProjectInfo/ProjectInfo.tsx +10 -9
- package/src/components/portfolio/SmallCheckout/SmallCheckout.test.tsx +2 -1
- package/src/components/portfolio/SmallCheckout/SmallCheckout.tsx +35 -32
- package/src/constants/globalStyle.ts +4 -0
- package/src/icons/LinkedInIcon.tsx +2 -0
- package/src/rootMessages.de.ts +12 -12
- package/src/rootMessages.en.ts +12 -12
- package/src/slices/Blog/Blog.test.tsx +5 -4
- package/src/slices/Blog/Blog.tsx +63 -65
- package/src/slices/Blog/styles.ts +8 -4
- package/src/slices/BlogCards/BlogCards.stories.tsx +5 -4
- package/src/slices/BlogCards/BlogCards.test.tsx +5 -4
- package/src/slices/BlogCards/BlogCards.tsx +67 -70
- package/src/slices/Comparison/Comparison.stories.tsx +3 -2
- package/src/slices/Comparison/Comparison.test.tsx +4 -3
- package/src/slices/Comparison/Comparison.tsx +8 -7
- package/src/slices/Comparison/Icon.test.tsx +3 -2
- package/src/slices/Comparison/Icon.tsx +1 -0
- package/src/slices/Cta/Cta.stories.tsx +3 -2
- package/src/slices/Cta/Cta.test.tsx +4 -3
- package/src/slices/Cta/Cta.tsx +8 -7
- package/src/slices/CtaOnly/CtaOnly.stories.tsx +2 -1
- package/src/slices/CtaOnly/CtaOnly.test.tsx +2 -1
- package/src/slices/CtaOnly/CtaOnly.tsx +3 -2
- package/src/slices/CustomerStories/CustomerStories.stories.tsx +3 -2
- package/src/slices/CustomerStories/CustomerStories.test.tsx +4 -3
- package/src/slices/CustomerStories/CustomerStories.tsx +64 -59
- package/src/slices/Facts/Facts.stories.tsx +2 -1
- package/src/slices/Facts/Facts.test.tsx +2 -1
- package/src/slices/Facts/Facts.tsx +3 -2
- package/src/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.stories.tsx +3 -2
- package/src/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.test.tsx +3 -2
- package/src/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.tsx +3 -2
- package/src/slices/FullWidthImage/FullWidthImage.stories.tsx +3 -2
- package/src/slices/FullWidthImage/FullWidthImage.test.tsx +3 -2
- package/src/slices/FullWidthImage/FullWidthImage.tsx +10 -9
- package/src/slices/FullWidthImageSlider/FullWidthImageSlider.stories.tsx +3 -2
- package/src/slices/FullWidthImageSlider/FullWidthImageSlider.test.tsx +3 -2
- package/src/slices/FullWidthImageSlider/FullWidthImageSlider.tsx +5 -5
- package/src/slices/FullWidthImageSlider/styles.ts +11 -8
- package/src/slices/Glossary/Glossary.stories.tsx +2 -1
- package/src/slices/Glossary/Glossary.test.tsx +2 -2
- package/src/slices/Glossary/Glossary.tsx +6 -6
- package/src/slices/Hero/Hero.stories.tsx +3 -2
- package/src/slices/Hero/Hero.test.tsx +3 -2
- package/src/slices/Hero/Hero.tsx +38 -14
- package/src/slices/IconGrid/IconGrid.stories.tsx +3 -2
- package/src/slices/IconGrid/IconGrid.test.tsx +3 -2
- package/src/slices/IconGrid/IconGrid.tsx +18 -9
- package/src/slices/ImageGrid/ImageGrid.stories.tsx +4 -3
- package/src/slices/ImageGrid/ImageGrid.test.tsx +3 -2
- package/src/slices/ImageGrid/ImageGrid.tsx +12 -9
- package/src/slices/ImageTextSequence/ImageTextSequence.stories.tsx +3 -2
- package/src/slices/ImageTextSequence/ImageTextSequence.test.tsx +3 -2
- package/src/slices/ImageTextSequence/ImageTextSequence.tsx +28 -19
- package/src/slices/LeftTextRightCard/LeftTextRightCard.stories.tsx +3 -2
- package/src/slices/LeftTextRightCard/LeftTextRightCard.test.tsx +3 -2
- package/src/slices/LeftTextRightCard/LeftTextRightCard.tsx +7 -6
- package/src/slices/LinkCardsGrid/LinkCardsGrid.stories.tsx +2 -1
- package/src/slices/LinkCardsGrid/LinkCardsGrid.test.tsx +2 -1
- package/src/slices/LinkCardsGrid/LinkCardsGrid.tsx +45 -43
- package/src/slices/LogoGridWithText/LogoGridWithText.stories.tsx +3 -2
- package/src/slices/LogoGridWithText/LogoGridWithText.test.tsx +3 -2
- package/src/slices/LogoGridWithText/LogoGridWithText.tsx +8 -8
- package/src/slices/MapHero/MapHero.stories.tsx +3 -2
- package/src/slices/MapHero/MapHero.test.tsx +3 -2
- package/src/slices/MapHero/MapHero.tsx +6 -5
- package/src/slices/MapHero/styles.ts +7 -6
- package/src/slices/ProjectFacts/ProjectFacts.stories.tsx +4 -3
- package/src/slices/ProjectFacts/ProjectFacts.test.tsx +3 -2
- package/src/slices/ProjectFacts/ProjectFacts.tsx +8 -7
- package/src/slices/ProjectsGrid/ProjectsGrid.stories.tsx +4 -3
- package/src/slices/ProjectsGrid/ProjectsGrid.test.tsx +3 -2
- package/src/slices/ProjectsGrid/ProjectsGrid.tsx +4 -3
- package/src/slices/ProjectsMap/MapMarker.test.tsx +3 -2
- package/src/slices/ProjectsMap/MapMarker.tsx +6 -4
- package/src/slices/ProjectsMap/ProjectsMap.stories.tsx +4 -3
- package/src/slices/ProjectsMap/ProjectsMap.test.tsx +4 -3
- package/src/slices/ProjectsMap/ProjectsMap.tsx +49 -38
- package/src/slices/ProjectsMap/mapboxStyle.ts +670 -0
- package/src/slices/QAndA/QAndA.stories.tsx +3 -2
- package/src/slices/QAndA/QAndA.test.tsx +3 -2
- package/src/slices/QAndA/QAndA.tsx +7 -6
- package/src/slices/QuoteCards/QuoteCards.stories.tsx +3 -2
- package/src/slices/QuoteCards/QuoteCards.test.tsx +5 -4
- package/src/slices/QuoteCards/QuoteCards.tsx +15 -13
- package/src/slices/RichTextSection/RichTextSection.stories.tsx +2 -1
- package/src/slices/RichTextSection/RichTextSection.test.tsx +2 -1
- package/src/slices/RichTextSection/RichTextSection.tsx +1 -0
- package/src/slices/ShopCheckout/ShopCheckout.stories.tsx +1 -0
- package/src/slices/ShopCheckout/ShopCheckout.test.tsx +3 -2
- package/src/slices/ShopCheckout/ShopCheckout.tsx +36 -29
- package/src/slices/SideBySideImages/SideBySideImages.stories.tsx +3 -2
- package/src/slices/SideBySideImages/SideBySideImages.test.tsx +3 -2
- package/src/slices/SideBySideImages/SideBySideImages.tsx +3 -2
- package/src/slices/SmallHero/SmallHero.stories.tsx +3 -2
- package/src/slices/SmallHero/SmallHero.test.tsx +3 -2
- package/src/slices/SmallHero/SmallHero.tsx +14 -7
- package/src/slices/Steps/Steps.stories.tsx +3 -2
- package/src/slices/Steps/Steps.test.tsx +3 -2
- package/src/slices/Steps/Steps.tsx +46 -26
- package/src/slices/TextCardGrid/TextCardGrid.stories.tsx +3 -2
- package/src/slices/TextCardGrid/TextCardGrid.test.tsx +3 -2
- package/src/slices/TextCardGrid/TextCardGrid.tsx +6 -5
- package/src/slices/TextCarousel/TextCarousel.stories.tsx +3 -2
- package/src/slices/TextCarousel/TextCarousel.test.tsx +4 -3
- package/src/slices/TextCarousel/TextCarousel.tsx +6 -6
- package/src/slices/TextCarousel/styles.ts +9 -6
- package/src/slices/TextWithCard/TextWithCard.stories.tsx +3 -2
- package/src/slices/TextWithCard/TextWithCard.test.tsx +3 -2
- package/src/slices/TextWithCard/TextWithCard.tsx +5 -4
- package/src/slices/TextWithTextCards/TextWithTextCards.stories.tsx +3 -2
- package/src/slices/TextWithTextCards/TextWithTextCards.test.tsx +4 -3
- package/src/slices/TextWithTextCards/TextWithTextCards.tsx +22 -11
- package/src/slices/Video/Video.stories.tsx +2 -1
- package/src/slices/Video/Video.test.tsx +2 -1
- package/src/slices/Video/Video.tsx +1 -0
- package/src/test/integrationMocks/fpmProjectMock.ts +1 -1
- package/src/test/mocks/portfolioProjectMock.ts +3 -3
- package/src/test/storybookMocks/storybookStrapiMedia.ts +2 -2
- package/src/test/strapiMocks/minimalGlobalData.ts +2 -2
- package/src/test/strapiMocks/strapiBlogPost.ts +2 -2
- package/src/test/strapiMocks/strapiContact.ts +1 -1
- package/src/test/strapiMocks/strapiCustomerStory.ts +2 -2
- package/src/test/strapiMocks/strapiHeroCard.ts +1 -1
- package/src/test/strapiMocks/strapiLinkPage.ts +2 -2
- package/src/test/strapiMocks/strapiMedia.ts +2 -2
- package/src/test/strapiMocks/strapiMetadata.ts +1 -1
- package/src/test/strapiMocks/strapiPage.ts +2 -2
- package/src/test/strapiMocks/strapiPortfolioCard.ts +1 -1
- package/src/test/strapiMocks/strapiPortfolioMock.ts +2 -2
- package/src/test/strapiMocks/strapiProject.ts +3 -3
- package/src/test/strapiMocks/strapiProjectCard.ts +1 -1
- package/src/test/strapiMocks/strapiQuoteCard.ts +1 -1
- package/src/test/testUtils.tsx +3 -3
- package/src/utils/mergeBoundingBoxes.ts +1 -1
- package/src/utils/strapiLinkUrl.test.ts +1 -1
- package/src/utils/strapiLinkUrl.ts +1 -1
- package/src/utils/strapiMediaUrl.test.ts +2 -2
- package/src/utils/strapiMediaUrl.ts +4 -4
- package/dist/slices/BlogCards/BlogCards.stories.d.ts +0 -5
- package/dist/slices/Comparison/Comparison.stories.d.ts +0 -6
- package/dist/slices/Cta/Cta.stories.d.ts +0 -9
- package/dist/slices/CtaOnly/CtaOnly.stories.d.ts +0 -3
- package/dist/slices/CustomerStories/CustomerStories.stories.d.ts +0 -3
- package/dist/slices/Facts/Facts.stories.d.ts +0 -7
- package/dist/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.stories.d.ts +0 -4
- package/dist/slices/FullWidthImage/FullWidthImage.stories.d.ts +0 -5
- package/dist/slices/FullWidthImage/styles.d.ts +0 -5
- package/dist/slices/FullWidthImageSlider/FullWidthImageSlider.stories.d.ts +0 -3
- package/dist/slices/Glossary/Glossary.stories.d.ts +0 -3
- package/dist/slices/Hero/Hero.stories.d.ts +0 -9
- package/dist/slices/Hero/styles.d.ts +0 -17
- package/dist/slices/IconGrid/IconGrid.stories.d.ts +0 -5
- package/dist/slices/IconGrid/styles.d.ts +0 -9
- package/dist/slices/ImageGrid/ImageGrid.stories.d.ts +0 -5
- package/dist/slices/ImageGrid/styles.d.ts +0 -5
- package/dist/slices/ImageTextSequence/ImageTextSequence.stories.d.ts +0 -7
- package/dist/slices/ImageTextSequence/styles.d.ts +0 -13
- package/dist/slices/LeftTextRightCard/LeftTextRightCard.stories.d.ts +0 -8
- package/dist/slices/LinkCardsGrid/LinkCardsGrid.stories.d.ts +0 -5
- package/dist/slices/LogoGridWithText/LogoGridWithText.stories.d.ts +0 -6
- package/dist/slices/LogoGridWithText/styles.d.ts +0 -5
- package/dist/slices/MapHero/MapHero.stories.d.ts +0 -8
- package/dist/slices/ProjectFacts/ProjectFacts.stories.d.ts +0 -6
- package/dist/slices/ProjectsGrid/ProjectsGrid.stories.d.ts +0 -3
- package/dist/slices/ProjectsMap/ProjectsMap.stories.d.ts +0 -6
- package/dist/slices/QAndA/QAndA.stories.d.ts +0 -7
- package/dist/slices/QuoteCards/QuoteCards.stories.d.ts +0 -8
- package/dist/slices/QuoteCards/styles.d.ts +0 -13
- package/dist/slices/RichTextSection/RichTextSection.stories.d.ts +0 -3
- package/dist/slices/ShopCheckout/ShopCheckout.stories.d.ts +0 -7
- package/dist/slices/SideBySideImages/SideBySideImages.stories.d.ts +0 -3
- package/dist/slices/SmallHero/SmallHero.stories.d.ts +0 -11
- package/dist/slices/SmallHero/styles.d.ts +0 -9
- package/dist/slices/Steps/Steps.stories.d.ts +0 -7
- package/dist/slices/Steps/styles.d.ts +0 -25
- package/dist/slices/TextCardGrid/TextCardGrid.stories.d.ts +0 -8
- package/dist/slices/TextCarousel/TextCarousel.stories.d.ts +0 -6
- package/dist/slices/TextWithCard/TextWithCard.stories.d.ts +0 -9
- package/dist/slices/TextWithTextCards/TextWithTextCards.stories.d.ts +0 -7
- package/dist/slices/TextWithTextCards/styles.d.ts +0 -5
- package/dist/slices/Video/Video.stories.d.ts +0 -3
- package/src/slices/FullWidthImage/styles.ts +0 -17
- package/src/slices/Hero/styles.ts +0 -52
- package/src/slices/IconGrid/styles.ts +0 -21
- package/src/slices/ImageGrid/styles.ts +0 -12
- package/src/slices/ImageTextSequence/styles.ts +0 -33
- package/src/slices/LogoGridWithText/styles.ts +0 -13
- package/src/slices/QuoteCards/styles.ts +0 -17
- package/src/slices/SmallHero/styles.ts +0 -39
- package/src/slices/Steps/styles.ts +0 -64
- package/src/slices/TextWithTextCards/styles.ts +0 -26
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { StoryFn, Meta } from '@storybook/react';
|
|
2
3
|
|
|
3
|
-
import { storybookStrapiCoverMock } from '
|
|
4
|
+
import { storybookStrapiCoverMock } from '../../test/storybookMocks/storybookStrapiMedia';
|
|
4
5
|
import QAndA from '.';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
|
-
title: '
|
|
8
|
+
title: 'slices/QAndA',
|
|
8
9
|
component: QAndA,
|
|
9
10
|
} as Meta<typeof QAndA>;
|
|
10
11
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '../../test/testUtils';
|
|
3
|
+
import { strapiHeroCardMock } from '../../test/strapiMocks/strapiHeroCard';
|
|
3
4
|
import QAndA from '.';
|
|
4
5
|
import { QAndAProps } from './QAndA';
|
|
5
6
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import {
|
|
2
3
|
Box,
|
|
3
4
|
Heading,
|
|
@@ -12,12 +13,12 @@ import {
|
|
|
12
13
|
import { ArrowRight } from '@phosphor-icons/react';
|
|
13
14
|
import { useRouter } from 'next/router';
|
|
14
15
|
import Image from 'next/image';
|
|
15
|
-
import StrapiLink from '
|
|
16
|
-
import strapiLinkUrl from '
|
|
17
|
-
import StrapiHeroCard from '
|
|
18
|
-
import strapiMediaUrl from '
|
|
19
|
-
import StrapiLinkButton from '
|
|
20
|
-
import convertToKebabCase from '
|
|
16
|
+
import StrapiLink from '../../models/strapi/StrapiLink';
|
|
17
|
+
import strapiLinkUrl from '../../utils/strapiLinkUrl';
|
|
18
|
+
import StrapiHeroCard from '../../models/strapi/StrapiHeroCard';
|
|
19
|
+
import strapiMediaUrl from '../../utils/strapiMediaUrl';
|
|
20
|
+
import StrapiLinkButton from '../../components/StrapiLinkButton';
|
|
21
|
+
import convertToKebabCase from '../../utils/convertToKebabCase';
|
|
21
22
|
|
|
22
23
|
const VARIANTS = {
|
|
23
24
|
gray: {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { StoryFn, Meta } from '@storybook/react';
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
storybookStrapiAvatarMock,
|
|
5
6
|
storybookStrapiCoverMock,
|
|
6
7
|
storybookStrapiGradientTopDownMock,
|
|
7
|
-
} from '
|
|
8
|
+
} from '../../test/storybookMocks/storybookStrapiMedia';
|
|
8
9
|
import QuoteCards from '.';
|
|
9
10
|
|
|
10
11
|
export default {
|
|
11
|
-
title: '
|
|
12
|
+
title: 'slices/QuoteCards',
|
|
12
13
|
component: QuoteCards,
|
|
13
14
|
} as Meta<typeof QuoteCards>;
|
|
14
15
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '../../test/testUtils';
|
|
3
|
+
import { strapiQuoteCardMock } from '../../test/strapiMocks/strapiQuoteCard';
|
|
4
|
+
import { strapiMediaMock } from '../../test/strapiMocks/strapiMedia';
|
|
5
|
+
import { strapiHeroCardMock } from '../../test/strapiMocks/strapiHeroCard';
|
|
5
6
|
import QuoteCards from '.';
|
|
6
7
|
import { QuoteCardsProps } from './QuoteCards';
|
|
7
8
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import Image from 'next/image';
|
|
2
3
|
import {
|
|
3
4
|
Box,
|
|
@@ -8,14 +9,13 @@ import {
|
|
|
8
9
|
SimpleGrid,
|
|
9
10
|
Wrapper,
|
|
10
11
|
} from 'boemly';
|
|
11
|
-
import StrapiDefaultHeader from '
|
|
12
|
-
import strapiMediaUrl from '
|
|
13
|
-
import StrapiQuoteCard from '
|
|
14
|
-
import StrapiHeroCard from '
|
|
15
|
-
import strapiLinkUrl from '
|
|
16
|
-
import StrapiImage from '
|
|
17
|
-
import convertToKebabCase from '
|
|
18
|
-
import { QuoteCardHeroContainer, QuoteCardsContainer } from './styles';
|
|
12
|
+
import StrapiDefaultHeader from '../../models/strapi/StrapiDefaultHeader';
|
|
13
|
+
import strapiMediaUrl from '../../utils/strapiMediaUrl';
|
|
14
|
+
import StrapiQuoteCard from '../../models/strapi/StrapiQuoteCard';
|
|
15
|
+
import StrapiHeroCard from '../../models/strapi/StrapiHeroCard';
|
|
16
|
+
import strapiLinkUrl from '../../utils/strapiLinkUrl';
|
|
17
|
+
import StrapiImage from '../../models/strapi/StrapiImage';
|
|
18
|
+
import convertToKebabCase from '../../utils/convertToKebabCase';
|
|
19
19
|
|
|
20
20
|
interface QuoteCardsSlice extends StrapiDefaultHeader {
|
|
21
21
|
cards: StrapiQuoteCard[];
|
|
@@ -30,9 +30,11 @@ export const QuoteCards: React.FC<QuoteCardsProps> = ({
|
|
|
30
30
|
slice,
|
|
31
31
|
}: QuoteCardsProps) => (
|
|
32
32
|
<>
|
|
33
|
-
<
|
|
34
|
-
withHero={!!slice.hero}
|
|
33
|
+
<Box
|
|
35
34
|
id={convertToKebabCase(slice.title)}
|
|
35
|
+
position="relative"
|
|
36
|
+
paddingTop="28"
|
|
37
|
+
paddingBottom={!!slice.hero ? '80' : '28'}
|
|
36
38
|
>
|
|
37
39
|
{slice.shapes && slice.shapes.length === 2 && (
|
|
38
40
|
<>
|
|
@@ -104,9 +106,9 @@ export const QuoteCards: React.FC<QuoteCardsProps> = ({
|
|
|
104
106
|
))}
|
|
105
107
|
</SimpleGrid>
|
|
106
108
|
</Wrapper>
|
|
107
|
-
</
|
|
109
|
+
</Box>
|
|
108
110
|
{slice.hero && (
|
|
109
|
-
<
|
|
111
|
+
<Box marginTop="-40" paddingBottom="28">
|
|
110
112
|
<Wrapper>
|
|
111
113
|
<HeroCard
|
|
112
114
|
title={slice.hero.title}
|
|
@@ -129,7 +131,7 @@ export const QuoteCards: React.FC<QuoteCardsProps> = ({
|
|
|
129
131
|
}
|
|
130
132
|
/>
|
|
131
133
|
</Wrapper>
|
|
132
|
-
</
|
|
134
|
+
</Box>
|
|
133
135
|
)}
|
|
134
136
|
</>
|
|
135
137
|
);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { StoryFn, Meta } from '@storybook/react';
|
|
2
3
|
|
|
3
4
|
import RichTextSection from '.';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
|
-
title: '
|
|
7
|
+
title: 'slices/RichTextSection',
|
|
7
8
|
component: RichTextSection,
|
|
8
9
|
} as Meta<typeof RichTextSection>;
|
|
9
10
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen, userEvent, waitFor } from '../../test/testUtils';
|
|
3
|
+
import { DEFAULT_USE_ROUTER_RETURN_VALUE } from '../../test/defaultMocks/next';
|
|
3
4
|
import { ShopCheckoutProps } from './ShopCheckout';
|
|
4
5
|
import ShopCheckout from '.';
|
|
5
6
|
import { useRouter } from '../../../__mocks__/next/router';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React, { useContext, useCallback } from 'react';
|
|
1
2
|
import {
|
|
2
3
|
Badge,
|
|
3
4
|
BoemlyFormControl,
|
|
@@ -18,14 +19,13 @@ import {
|
|
|
18
19
|
} from 'boemly';
|
|
19
20
|
import { Field, FieldProps, Form, Formik, FormikProps } from 'formik';
|
|
20
21
|
import { useRouter } from 'next/router';
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import { FPM_API_URI } from '@/constants/api';
|
|
24
|
-
import CheckoutForm from '@/models/forms/CheckoutForm';
|
|
22
|
+
import { FPM_API_URI } from '../../constants/api';
|
|
23
|
+
import CheckoutForm from '../../models/forms/CheckoutForm';
|
|
25
24
|
import {
|
|
26
25
|
MAXIMUM_CONTRIBUTION_VALUE_IN_MONEY,
|
|
27
26
|
MINIMUM_CONTRIBUTION_VALUE_IN_MONEY,
|
|
28
|
-
} from '
|
|
27
|
+
} from '../../constants/domain';
|
|
28
|
+
import { IntlContext } from '../../components/ContextProvider';
|
|
29
29
|
|
|
30
30
|
export interface ShopCheckoutProps {
|
|
31
31
|
slice: {
|
|
@@ -44,28 +44,35 @@ export interface ShopCheckoutProps {
|
|
|
44
44
|
|
|
45
45
|
export const ShopCheckout = ({ slice }: ShopCheckoutProps): JSX.Element => {
|
|
46
46
|
const [primary50] = useToken('colors', ['primary.50']);
|
|
47
|
-
const { formatMessage, formatNumber } =
|
|
47
|
+
const { formatMessage, formatNumber, locale } = useContext(IntlContext);
|
|
48
48
|
const { push } = useRouter();
|
|
49
49
|
|
|
50
|
-
const validateForm = useCallback(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
50
|
+
const validateForm = useCallback(
|
|
51
|
+
(values: CheckoutForm) => {
|
|
52
|
+
const errors: Partial<{ contributionValue: string }> = {};
|
|
53
|
+
|
|
54
|
+
if (!values.contributionValue) {
|
|
55
|
+
errors.contributionValue = formatMessage({
|
|
56
|
+
id: 'sections.shopCheckout.contributionValue.validation.empty',
|
|
57
|
+
});
|
|
58
|
+
} else if (
|
|
59
|
+
values.contributionValue < MINIMUM_CONTRIBUTION_VALUE_IN_MONEY
|
|
60
|
+
) {
|
|
61
|
+
errors.contributionValue = formatMessage({
|
|
62
|
+
id: `sections.shopCheckout.contributionValue.validation.tooLow.${slice.currency}`,
|
|
63
|
+
});
|
|
64
|
+
} else if (
|
|
65
|
+
values.contributionValue > MAXIMUM_CONTRIBUTION_VALUE_IN_MONEY
|
|
66
|
+
) {
|
|
67
|
+
errors.contributionValue = formatMessage({
|
|
68
|
+
id: 'sections.shopCheckout.contributionValue.validation.tooHigh',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return errors;
|
|
73
|
+
},
|
|
74
|
+
[locale]
|
|
75
|
+
);
|
|
69
76
|
|
|
70
77
|
const onSubmit = ({ contributionValue }: CheckoutForm) => {
|
|
71
78
|
const url = new URL(`${FPM_API_URI}/v1/webhooks/shop/checkout`);
|
|
@@ -163,9 +170,9 @@ export const ShopCheckout = ({ slice }: ShopCheckoutProps): JSX.Element => {
|
|
|
163
170
|
})}
|
|
164
171
|
rightAddonsOrElements={[
|
|
165
172
|
<InputRightAddon key="1">
|
|
166
|
-
|
|
167
|
-
id
|
|
168
|
-
|
|
173
|
+
{formatMessage({
|
|
174
|
+
id: `sections.shopCheckout.contributionValue.unit.${slice.currency}`,
|
|
175
|
+
})}
|
|
169
176
|
</InputRightAddon>,
|
|
170
177
|
]}
|
|
171
178
|
isInvalid={
|
|
@@ -215,7 +222,7 @@ export const ShopCheckout = ({ slice }: ShopCheckoutProps): JSX.Element => {
|
|
|
215
222
|
<Spacer height="6" />
|
|
216
223
|
|
|
217
224
|
<Button type="submit" width="full">
|
|
218
|
-
|
|
225
|
+
{formatMessage({ id: 'sections.shopCheckout.submit' })}
|
|
219
226
|
</Button>
|
|
220
227
|
</Form>
|
|
221
228
|
)}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { StoryFn, Meta } from '@storybook/react';
|
|
2
3
|
|
|
3
|
-
import { storybookStrapiCoverMock } from '
|
|
4
|
+
import { storybookStrapiCoverMock } from '../../test/storybookMocks/storybookStrapiMedia';
|
|
4
5
|
import SideBySideImages from '.';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
|
-
title: '
|
|
8
|
+
title: 'slices/SideBySideImages',
|
|
8
9
|
component: SideBySideImages,
|
|
9
10
|
} as Meta<typeof SideBySideImages>;
|
|
10
11
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '../../test/testUtils';
|
|
3
|
+
import { strapiMediaMock } from '../../test/strapiMocks/strapiMedia';
|
|
3
4
|
import { SideBySideImagesProps } from './SideBySideImages';
|
|
4
5
|
import SideBySideImages from '.';
|
|
5
6
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import {
|
|
2
3
|
Box,
|
|
3
4
|
DefaultSectionContainer,
|
|
@@ -8,8 +9,8 @@ import {
|
|
|
8
9
|
Wrapper,
|
|
9
10
|
} from 'boemly';
|
|
10
11
|
import Image from 'next/image';
|
|
11
|
-
import StrapiImage from '
|
|
12
|
-
import strapiMediaUrl from '
|
|
12
|
+
import StrapiImage from '../../models/strapi/StrapiImage';
|
|
13
|
+
import strapiMediaUrl from '../../utils/strapiMediaUrl';
|
|
13
14
|
|
|
14
15
|
export interface SideBySideImagesProps {
|
|
15
16
|
slice: {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { StoryFn, Meta } from '@storybook/react';
|
|
2
3
|
|
|
3
|
-
import { storybookStrapiCoverMock } from '
|
|
4
|
+
import { storybookStrapiCoverMock } from '../../test/storybookMocks/storybookStrapiMedia';
|
|
4
5
|
import SmallHero from '.';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
|
-
title: '
|
|
8
|
+
title: 'slices/SmallHero',
|
|
8
9
|
component: SmallHero,
|
|
9
10
|
} as Meta<typeof SmallHero>;
|
|
10
11
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '../../test/testUtils';
|
|
3
|
+
import { strapiMediaMock } from '../../test/strapiMocks/strapiMedia';
|
|
3
4
|
import SmallHero from '.';
|
|
4
5
|
import { SmallHeroProps } from './SmallHero';
|
|
5
6
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import {
|
|
2
3
|
Box,
|
|
3
4
|
DefaultSectionHeader,
|
|
@@ -7,11 +8,10 @@ import {
|
|
|
7
8
|
Wrapper,
|
|
8
9
|
} from 'boemly';
|
|
9
10
|
import Image from 'next/image';
|
|
10
|
-
import StrapiLinkButton from '
|
|
11
|
-
import StrapiImage from '
|
|
12
|
-
import StrapiLink from '
|
|
13
|
-
import strapiMediaUrl from '
|
|
14
|
-
import { HeadingContainer } from './styles';
|
|
11
|
+
import StrapiLinkButton from '../../components/StrapiLinkButton';
|
|
12
|
+
import StrapiImage from '../../models/strapi/StrapiImage';
|
|
13
|
+
import StrapiLink from '../../models/strapi/StrapiLink';
|
|
14
|
+
import strapiMediaUrl from '../../utils/strapiMediaUrl';
|
|
15
15
|
|
|
16
16
|
export interface SmallHeroProps {
|
|
17
17
|
slice: {
|
|
@@ -66,7 +66,14 @@ export const SmallHero: React.FC<SmallHeroProps> = ({
|
|
|
66
66
|
{slice.gradient && <Gradient />}
|
|
67
67
|
</>
|
|
68
68
|
)}
|
|
69
|
-
<
|
|
69
|
+
<Box
|
|
70
|
+
position="absolute"
|
|
71
|
+
left="0"
|
|
72
|
+
top="60%"
|
|
73
|
+
width="full"
|
|
74
|
+
textAlign="center"
|
|
75
|
+
transform="translateY(-50%)"
|
|
76
|
+
>
|
|
70
77
|
<Wrapper>
|
|
71
78
|
<>
|
|
72
79
|
{slice.tags && (
|
|
@@ -111,6 +118,6 @@ export const SmallHero: React.FC<SmallHeroProps> = ({
|
|
|
111
118
|
)}
|
|
112
119
|
</>
|
|
113
120
|
</Wrapper>
|
|
114
|
-
</
|
|
121
|
+
</Box>
|
|
115
122
|
</Box>
|
|
116
123
|
);
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { StoryFn, Meta } from '@storybook/react';
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
storybookStrapiCoverMock,
|
|
5
6
|
storybookStrapiGradientBottomUpMock,
|
|
6
7
|
storybookStrapiGradientTopDownMock,
|
|
7
|
-
} from '
|
|
8
|
+
} from '../../test/storybookMocks/storybookStrapiMedia';
|
|
8
9
|
import Steps from '.';
|
|
9
10
|
|
|
10
11
|
export default {
|
|
11
|
-
title: '
|
|
12
|
+
title: 'slices/Steps',
|
|
12
13
|
component: Steps,
|
|
13
14
|
} as Meta<typeof Steps>;
|
|
14
15
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '../../test/testUtils';
|
|
3
|
+
import { strapiMediaMock } from '../../test/strapiMocks/strapiMedia';
|
|
3
4
|
import Steps from '.';
|
|
4
5
|
import { StepsProps } from './Steps';
|
|
5
6
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import React, { createRef, useEffect, useRef, useState } from 'react';
|
|
1
2
|
import {
|
|
2
3
|
Box,
|
|
4
|
+
Center,
|
|
3
5
|
DefaultSectionContainer,
|
|
4
6
|
DefaultSectionHeader,
|
|
7
|
+
Flex,
|
|
5
8
|
Gradient,
|
|
6
9
|
Heading,
|
|
7
10
|
RichText,
|
|
@@ -11,21 +14,13 @@ import {
|
|
|
11
14
|
Wrapper,
|
|
12
15
|
} from 'boemly';
|
|
13
16
|
import Image from 'next/image';
|
|
14
|
-
import { createRef, useEffect, useRef, useState } from 'react';
|
|
15
17
|
import { useWindowScroll, useWindowSize } from 'react-use';
|
|
16
18
|
import { useRouter } from 'next/router';
|
|
17
|
-
import StrapiShapesCard from '
|
|
18
|
-
import StrapiDefaultHeader from '
|
|
19
|
-
import strapiMediaUrl from '
|
|
20
|
-
import strapiLinkUrl from '
|
|
21
|
-
import StrapiImage from '
|
|
22
|
-
import {
|
|
23
|
-
ImageContainer,
|
|
24
|
-
ProgressDivider,
|
|
25
|
-
StepContainer,
|
|
26
|
-
StepNumber,
|
|
27
|
-
StepsContainer,
|
|
28
|
-
} from './styles';
|
|
19
|
+
import StrapiShapesCard from '../../models/strapi/StrapiShapesCard';
|
|
20
|
+
import StrapiDefaultHeader from '../../models/strapi/StrapiDefaultHeader';
|
|
21
|
+
import strapiMediaUrl from '../../utils/strapiMediaUrl';
|
|
22
|
+
import strapiLinkUrl from '../../utils/strapiLinkUrl';
|
|
23
|
+
import StrapiImage from '../../models/strapi/StrapiImage';
|
|
29
24
|
|
|
30
25
|
interface StepsSlice extends StrapiDefaultHeader {
|
|
31
26
|
steps: {
|
|
@@ -77,7 +72,13 @@ export const Steps: React.FC<StepsProps> = ({ slice }: StepsProps) => {
|
|
|
77
72
|
<DefaultSectionContainer backgroundColor={gray900} title={slice.title}>
|
|
78
73
|
<>
|
|
79
74
|
{slice.image && (
|
|
80
|
-
<
|
|
75
|
+
<Box
|
|
76
|
+
position="absolute"
|
|
77
|
+
top="0"
|
|
78
|
+
left="0"
|
|
79
|
+
width="full"
|
|
80
|
+
height="full"
|
|
81
|
+
>
|
|
81
82
|
<Image
|
|
82
83
|
src={strapiMediaUrl(slice.image.img, 'xLarge')}
|
|
83
84
|
alt={slice.image.alt}
|
|
@@ -85,7 +86,7 @@ export const Steps: React.FC<StepsProps> = ({ slice }: StepsProps) => {
|
|
|
85
86
|
style={{ objectFit: slice.image.objectFit || 'cover' }}
|
|
86
87
|
/>
|
|
87
88
|
<Gradient />
|
|
88
|
-
</
|
|
89
|
+
</Box>
|
|
89
90
|
)}
|
|
90
91
|
</>
|
|
91
92
|
<Wrapper>
|
|
@@ -109,14 +110,19 @@ export const Steps: React.FC<StepsProps> = ({ slice }: StepsProps) => {
|
|
|
109
110
|
}}
|
|
110
111
|
/>
|
|
111
112
|
|
|
112
|
-
<
|
|
113
|
+
<Box marginTop={['16', null, '24']}>
|
|
113
114
|
{slice.steps.map(({ id, step, title, text }, index) => (
|
|
114
|
-
<
|
|
115
|
-
<
|
|
115
|
+
<Flex flexDir="column" alignItems="center" key={id}>
|
|
116
|
+
<Center
|
|
117
|
+
width="10"
|
|
118
|
+
height="10"
|
|
119
|
+
borderRadius="full"
|
|
120
|
+
backgroundColor="white"
|
|
121
|
+
>
|
|
116
122
|
<Text size="smRegularNormal" color="black">
|
|
117
123
|
{step}
|
|
118
124
|
</Text>
|
|
119
|
-
</
|
|
125
|
+
</Center>
|
|
120
126
|
<Heading size="lg" color="white" mt="4" textAlign="center">
|
|
121
127
|
{title}
|
|
122
128
|
</Heading>
|
|
@@ -134,17 +140,31 @@ export const Steps: React.FC<StepsProps> = ({ slice }: StepsProps) => {
|
|
|
134
140
|
</Box>
|
|
135
141
|
)}
|
|
136
142
|
{(index + 1 < slice.steps.length || slice.card) && (
|
|
137
|
-
<
|
|
143
|
+
<Box
|
|
138
144
|
ref={stepRefs[index]}
|
|
139
|
-
|
|
145
|
+
position="relative"
|
|
146
|
+
marginTop="4"
|
|
147
|
+
marginBottom="6"
|
|
148
|
+
height="12"
|
|
140
149
|
>
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
150
|
+
<Box
|
|
151
|
+
position="absolute"
|
|
152
|
+
height="full"
|
|
153
|
+
borderLeft="dashed 1px white"
|
|
154
|
+
opacity="0.5"
|
|
155
|
+
/>
|
|
156
|
+
<Box
|
|
157
|
+
position="absolute"
|
|
158
|
+
height={`${stepProgress[index]}%`}
|
|
159
|
+
borderRight="solid 1px white"
|
|
160
|
+
opacity="1"
|
|
161
|
+
transition="height ease var(--medium-transition-duration)"
|
|
162
|
+
/>
|
|
163
|
+
</Box>
|
|
144
164
|
)}
|
|
145
|
-
</
|
|
165
|
+
</Flex>
|
|
146
166
|
))}
|
|
147
|
-
</
|
|
167
|
+
</Box>
|
|
148
168
|
|
|
149
169
|
{slice.card && (
|
|
150
170
|
<ShapesCard
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { StoryFn, Meta } from '@storybook/react';
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
storybookStrapiCoverMock,
|
|
5
6
|
storybookStrapiGradientBottomUpMock,
|
|
6
|
-
} from '
|
|
7
|
+
} from '../../test/storybookMocks/storybookStrapiMedia';
|
|
7
8
|
import TextCardGrid from '.';
|
|
8
9
|
|
|
9
10
|
export default {
|
|
10
|
-
title: '
|
|
11
|
+
title: 'slices/TextCardGrid',
|
|
11
12
|
component: TextCardGrid,
|
|
12
13
|
} as Meta<typeof TextCardGrid>;
|
|
13
14
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '../../test/testUtils';
|
|
3
|
+
import { strapiMediaMock } from '../../test/strapiMocks/strapiMedia';
|
|
3
4
|
import TextCardGrid from '.';
|
|
4
5
|
import { TextCardGridProps } from './TextCardGrid';
|
|
5
6
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import {
|
|
3
4
|
Box,
|
|
@@ -13,11 +14,11 @@ import {
|
|
|
13
14
|
} from 'boemly';
|
|
14
15
|
import Image from 'next/image';
|
|
15
16
|
import { CaretRight } from '@phosphor-icons/react';
|
|
16
|
-
import StrapiLinkButton from '
|
|
17
|
-
import StrapiDefaultHeader from '
|
|
18
|
-
import StrapiImage from '
|
|
19
|
-
import StrapiLink from '
|
|
20
|
-
import strapiMediaUrl from '
|
|
17
|
+
import StrapiLinkButton from '../../components/StrapiLinkButton';
|
|
18
|
+
import StrapiDefaultHeader from '../../models/strapi/StrapiDefaultHeader';
|
|
19
|
+
import StrapiImage from '../../models/strapi/StrapiImage';
|
|
20
|
+
import StrapiLink from '../../models/strapi/StrapiLink';
|
|
21
|
+
import strapiMediaUrl from '../../utils/strapiMediaUrl';
|
|
21
22
|
|
|
22
23
|
interface TextCardGridSlice extends StrapiDefaultHeader {
|
|
23
24
|
variant: 'shape' | 'image';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { StoryFn, Meta } from '@storybook/react';
|
|
2
3
|
|
|
3
|
-
import { storybookStrapiTreeIconMock } from '
|
|
4
|
+
import { storybookStrapiTreeIconMock } from '../../test/storybookMocks/storybookStrapiMedia';
|
|
4
5
|
import TextCarousel from '.';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
|
-
title: '
|
|
8
|
+
title: 'slices/TextCarousel',
|
|
8
9
|
component: TextCarousel,
|
|
9
10
|
} as Meta<typeof TextCarousel>;
|
|
10
11
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { strapiLinkPageMock } from '../../test/strapiMocks/strapiLinkPage';
|
|
3
|
+
import { render, screen } from '../../test/testUtils';
|
|
4
|
+
import { strapiMediaMock } from '../../test/strapiMocks/strapiMedia';
|
|
4
5
|
import TextCarousel from '.';
|
|
5
6
|
import { TextCarouselProps } from './TextCarousel';
|
|
6
7
|
|