@quintype/arrow 3.0.0-spike-skeleton-layout.21 → 3.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.
- package/.babelrc +12 -0
- package/.circleci/config.yml +42 -0
- package/.eslintrc.json +25 -0
- package/.prettierrc +6 -0
- package/.storybook/addons.js +5 -0
- package/.storybook/config.js +13 -0
- package/.storybook/webpack.config.js +8 -0
- package/.stylelintrc +10 -0
- package/.vscode/extensions.json +16 -0
- package/.vscode/settings.json +12 -0
- package/CHANGELOG.md +1362 -0
- package/README.md +10 -0
- package/__mocks__/fileMock.js +1 -0
- package/__mocks__/styleMock.js +1 -0
- package/{app.scss → assets/stylesheets/app.scss} +154 -1
- package/assets/stylesheets/mixins.scss +27 -0
- package/assets/stylesheets/reset.scss +148 -0
- package/assets/stylesheets/viewports.m.css +3 -0
- package/bin-dev-scripts/prepublish.sh +11 -0
- package/bin-dev-scripts/sync-to.sh +13 -0
- package/jest.config.json +14 -0
- package/package.json +131 -1
- package/publish +24 -0
- package/rollup.js +202 -0
- package/setupTests.js +3 -0
- package/src/components/Atoms/AdPlaceholder/ads.m.css +13 -0
- package/src/components/Atoms/AdPlaceholder/index.js +25 -0
- package/src/components/Atoms/Author/README.md +19 -0
- package/src/components/Atoms/Author/author.m.css +65 -0
- package/src/components/Atoms/Author/index.js +98 -0
- package/src/components/Atoms/Author/stories.js +23 -0
- package/src/components/Atoms/AuthorCard/README.md +47 -0
- package/src/components/Atoms/AuthorCard/author-card.m.css +174 -0
- package/src/components/Atoms/AuthorCard/author-card.test.js +72 -0
- package/src/components/Atoms/AuthorCard/index.js +115 -0
- package/src/components/Atoms/AuthorCard/stories.js +69 -0
- package/src/components/Atoms/AuthorImage/README.md +31 -0
- package/src/components/Atoms/AuthorImage/author-image.m.css +53 -0
- package/src/components/Atoms/AuthorImage/index.js +55 -0
- package/src/components/Atoms/AuthorImage/stories.js +20 -0
- package/src/components/Atoms/AuthorWithTimestamp/README.md +11 -0
- package/src/components/Atoms/AuthorWithTimestamp/author-with-timestamp.m.css +42 -0
- package/src/components/Atoms/AuthorWithTimestamp/index.js +79 -0
- package/src/components/Atoms/AuthorWithTimestamp/stories.js +21 -0
- package/src/components/Atoms/BulletPoint/README.md +9 -0
- package/src/components/Atoms/BulletPoint/bullet-point.m.css +14 -0
- package/src/components/Atoms/BulletPoint/index.js +19 -0
- package/src/components/Atoms/BulletPoint/stories.js +6 -0
- package/src/components/Atoms/CaptionAttribution/README.md +15 -0
- package/src/components/Atoms/CaptionAttribution/caption-attribution.m.css +40 -0
- package/src/components/Atoms/CaptionAttribution/caption-attribution.test.js +29 -0
- package/src/components/Atoms/CaptionAttribution/index.js +40 -0
- package/src/components/Atoms/CaptionAttribution/stories.js +40 -0
- package/src/components/Atoms/CollectionName/README.md +11 -0
- package/src/components/Atoms/CollectionName/collection-name.m.css +94 -0
- package/src/components/Atoms/CollectionName/index.js +143 -0
- package/src/components/Atoms/CollectionName/stories.js +52 -0
- package/src/components/Atoms/Divider/__snapshots__/divider.test.js.snap +18 -0
- package/src/components/Atoms/Divider/divider.m.css +6 -0
- package/src/components/Atoms/Divider/divider.test.js +10 -0
- package/src/components/Atoms/Divider/index.js +20 -0
- package/src/components/Atoms/Dot/dot.js +20 -0
- package/src/components/Atoms/Dot/dot.m.css +6 -0
- package/src/components/Atoms/ExtendedLoadMore/README.md +9 -0
- package/src/components/Atoms/ExtendedLoadMore/__snapshots__/extended-load-more.test.js.snap +11 -0
- package/src/components/Atoms/ExtendedLoadMore/extended-load-more.test.js +19 -0
- package/src/components/Atoms/ExtendedLoadMore/index.js +112 -0
- package/src/components/Atoms/FallbackImage/fallback.m.css +33 -0
- package/src/components/Atoms/FallbackImage/index.js +30 -0
- package/src/components/Atoms/Headline/README.md +7 -0
- package/src/components/Atoms/Headline/headline.m.css +26 -0
- package/src/components/Atoms/Headline/index.js +76 -0
- package/src/components/Atoms/Headline/stories.js +52 -0
- package/src/components/Atoms/HeroImage/README.md +13 -0
- package/src/components/Atoms/HeroImage/hero-image.m.css +71 -0
- package/src/components/Atoms/HeroImage/index.js +165 -0
- package/src/components/Atoms/HeroImage/stories.js +22 -0
- package/src/components/Atoms/LoadMoreTarget/index.js +24 -0
- package/src/components/Atoms/Loadmore/README.md +0 -0
- package/src/components/Atoms/Loadmore/__snapshots__/load-more.test.js.snap +25 -0
- package/src/components/Atoms/Loadmore/index.js +41 -0
- package/src/components/Atoms/Loadmore/load-more.m.css +23 -0
- package/src/components/Atoms/Loadmore/load-more.test.js +30 -0
- package/src/components/Atoms/Loadmore/stories.js +17 -0
- package/src/components/Atoms/MagazineCoverImage/README.md +21 -0
- package/src/components/Atoms/MagazineCoverImage/index.js +61 -0
- package/src/components/Atoms/MagazineCoverImage/magazine-cover-image.m.css +24 -0
- package/src/components/Atoms/MagazineCoverImage/stories.js +21 -0
- package/src/components/Atoms/PremiumStoryIcon/index.js +27 -0
- package/src/components/Atoms/PublishDetail/README.md +15 -0
- package/src/components/Atoms/PublishDetail/index.js +63 -0
- package/src/components/Atoms/PublishDetail/publish-details.m.css +47 -0
- package/src/components/Atoms/PublishDetail/publish-details.test.js +22 -0
- package/src/components/Atoms/PublishDetail/stories.js +21 -0
- package/src/components/Atoms/ReadTime/README.md +13 -0
- package/src/components/Atoms/ReadTime/index.js +44 -0
- package/src/components/Atoms/ReadTime/read-time.m.css +25 -0
- package/src/components/Atoms/ReadTime/read-time.test.js +18 -0
- package/src/components/Atoms/ReadTime/stories.js +19 -0
- package/src/components/Atoms/ScrollSnap/SliderArrow/index.js +57 -0
- package/src/components/Atoms/ScrollSnap/SliderArrow/slider-arrow.m.css +45 -0
- package/src/components/Atoms/ScrollSnap/SliderIndicator/index.js +41 -0
- package/src/components/Atoms/ScrollSnap/SliderIndicator/slider-indicator.m.css +71 -0
- package/src/components/Atoms/ScrollSnap/index.js +136 -0
- package/src/components/Atoms/ScrollSnap/scroll-snap.m.css +27 -0
- package/src/components/Atoms/SectionTag/README.md +11 -0
- package/src/components/Atoms/SectionTag/index.js +61 -0
- package/src/components/Atoms/SectionTag/section.m.css +53 -0
- package/src/components/Atoms/SectionTag/stories.js +26 -0
- package/src/components/Atoms/SocialSharePopup/README.md +25 -0
- package/src/components/Atoms/SocialSharePopup/__snapshots__/social-share-popup.test.js.snap +653 -0
- package/src/components/Atoms/SocialSharePopup/index.js +61 -0
- package/src/components/Atoms/SocialSharePopup/social-share-popup.m.css +109 -0
- package/src/components/Atoms/SocialSharePopup/social-share-popup.test.js +93 -0
- package/src/components/Atoms/SocialSharePopup/stories.js +19 -0
- package/src/components/Atoms/StoryElements/AlsoRead/README.md +49 -0
- package/src/components/Atoms/StoryElements/AlsoRead/also-read.m.css +135 -0
- package/src/components/Atoms/StoryElements/AlsoRead/also-read.test.js +83 -0
- package/src/components/Atoms/StoryElements/AlsoRead/index.js +117 -0
- package/src/components/Atoms/StoryElements/AlsoRead/stories.js +40 -0
- package/src/components/Atoms/StoryElements/Attachment/README.md +21 -0
- package/src/components/Atoms/StoryElements/Attachment/__snapshots__/attachment.test.js.snap +47 -0
- package/src/components/Atoms/StoryElements/Attachment/attachment.m.css +125 -0
- package/src/components/Atoms/StoryElements/Attachment/attachment.test.js +39 -0
- package/src/components/Atoms/StoryElements/Attachment/index.js +62 -0
- package/src/components/Atoms/StoryElements/Attachment/stories.js +48 -0
- package/src/components/Atoms/StoryElements/BigFact/README.md +9 -0
- package/src/components/Atoms/StoryElements/BigFact/big-fact.m.css +41 -0
- package/src/components/Atoms/StoryElements/BigFact/big-fact.test.js +21 -0
- package/src/components/Atoms/StoryElements/BigFact/index.js +33 -0
- package/src/components/Atoms/StoryElements/BigFact/stories.js +9 -0
- package/src/components/Atoms/StoryElements/BlockQuote/README.md +49 -0
- package/src/components/Atoms/StoryElements/BlockQuote/Svg/curve.js +26 -0
- package/src/components/Atoms/StoryElements/BlockQuote/Svg/edge.js +26 -0
- package/src/components/Atoms/StoryElements/BlockQuote/Svg/icon.m.css +4 -0
- package/src/components/Atoms/StoryElements/BlockQuote/block-quote.m.css +161 -0
- package/src/components/Atoms/StoryElements/BlockQuote/block-quote.test.js +48 -0
- package/src/components/Atoms/StoryElements/BlockQuote/index.js +82 -0
- package/src/components/Atoms/StoryElements/BlockQuote/stories.js +35 -0
- package/src/components/Atoms/StoryElements/Blurb/README.md +43 -0
- package/src/components/Atoms/StoryElements/Blurb/blurb.m.css +55 -0
- package/src/components/Atoms/StoryElements/Blurb/blurb.test.js +46 -0
- package/src/components/Atoms/StoryElements/Blurb/index.js +53 -0
- package/src/components/Atoms/StoryElements/Blurb/stories.js +28 -0
- package/src/components/Atoms/StoryElements/Image/README.md +13 -0
- package/src/components/Atoms/StoryElements/Image/image.m.css +17 -0
- package/src/components/Atoms/StoryElements/Image/image.test.js +20 -0
- package/src/components/Atoms/StoryElements/Image/index.js +57 -0
- package/src/components/Atoms/StoryElements/Image/stories.js +25 -0
- package/src/components/Atoms/StoryElements/ImageSlideshow/README.md +13 -0
- package/src/components/Atoms/StoryElements/ImageSlideshow/image-slideshow.m.css +49 -0
- package/src/components/Atoms/StoryElements/ImageSlideshow/index.js +63 -0
- package/src/components/Atoms/StoryElements/ImageSlideshow/stories.js +34 -0
- package/src/components/Atoms/StoryElements/QuestionAnswer/README.md +56 -0
- package/src/components/Atoms/StoryElements/QuestionAnswer/index.js +134 -0
- package/src/components/Atoms/StoryElements/QuestionAnswer/question-answer.m.css +106 -0
- package/src/components/Atoms/StoryElements/QuestionAnswer/question-answer.test.js +74 -0
- package/src/components/Atoms/StoryElements/QuestionAnswer/stories.js +79 -0
- package/src/components/Atoms/StoryElements/Quote/README.md +41 -0
- package/src/components/Atoms/StoryElements/Quote/index.js +44 -0
- package/src/components/Atoms/StoryElements/Quote/quote.m.css +111 -0
- package/src/components/Atoms/StoryElements/Quote/quote.test.js +39 -0
- package/src/components/Atoms/StoryElements/Quote/stories.js +28 -0
- package/src/components/Atoms/StoryElements/Reference/README.md +9 -0
- package/src/components/Atoms/StoryElements/Reference/index.js +52 -0
- package/src/components/Atoms/StoryElements/Reference/reference.m.css +42 -0
- package/src/components/Atoms/StoryElements/Reference/reference.test.js +28 -0
- package/src/components/Atoms/StoryElements/Reference/stories.js +18 -0
- package/src/components/Atoms/StoryElements/StoryElement/README.md +10 -0
- package/src/components/Atoms/StoryElements/StoryElement/index.js +21 -0
- package/src/components/Atoms/StoryElements/StoryElement/stories.js +20 -0
- package/src/components/Atoms/StoryElements/StoryElement/storyelement.test.js +13 -0
- package/src/components/Atoms/StoryElements/Summary/README.md +56 -0
- package/src/components/Atoms/StoryElements/Summary/index.js +68 -0
- package/src/components/Atoms/StoryElements/Summary/stories.js +33 -0
- package/src/components/Atoms/StoryElements/Summary/summary.m.css +121 -0
- package/src/components/Atoms/StoryElements/Summary/summary.test.js +50 -0
- package/src/components/Atoms/StoryElements/Text/README.md +32 -0
- package/src/components/Atoms/StoryElements/Text/index.js +41 -0
- package/src/components/Atoms/StoryElements/Text/stories.js +32 -0
- package/src/components/Atoms/StoryElements/Text/text.m.css +48 -0
- package/src/components/Atoms/StoryElements/Text/text.test.js +42 -0
- package/src/components/Atoms/StoryElements/Video/README.md +9 -0
- package/src/components/Atoms/StoryElements/Video/index.js +23 -0
- package/src/components/Atoms/StoryElements/Video/stories.js +24 -0
- package/src/components/Atoms/StoryElements/Video/video.m.css +3 -0
- package/src/components/Atoms/StoryElements/Video/video.test.js +13 -0
- package/src/components/Atoms/StoryElements/imageGallery/README.md +18 -0
- package/src/components/Atoms/StoryElements/imageGallery/image-gallery.m.css +48 -0
- package/src/components/Atoms/StoryElements/imageGallery/image-gallery.test.js +19 -0
- package/src/components/Atoms/StoryElements/imageGallery/index.js +74 -0
- package/src/components/Atoms/StoryElements/imageGallery/stories.js +23 -0
- package/src/components/Atoms/StoryElements/withElementWrapper.js +13 -0
- package/src/components/Atoms/StoryElements/withElementWrapper.test.js +31 -0
- package/src/components/Atoms/StoryHeadline/index.js +36 -0
- package/src/components/Atoms/StoryHeadline/story-headline.m.css +36 -0
- package/src/components/Atoms/StoryTags/README.md +9 -0
- package/src/components/Atoms/StoryTags/index.js +33 -0
- package/src/components/Atoms/StoryTags/stories.js +25 -0
- package/src/components/Atoms/StoryTags/story-tags.test.js +18 -0
- package/src/components/Atoms/StoryTags/tags.m.css +34 -0
- package/src/components/Atoms/Subheadline/README.md +17 -0
- package/src/components/Atoms/Subheadline/index.js +54 -0
- package/src/components/Atoms/Subheadline/stories.js +12 -0
- package/src/components/Atoms/Subheadline/subheadline.m.css +17 -0
- package/src/components/Atoms/TimeStamp/README.md +9 -0
- package/src/components/Atoms/TimeStamp/index.js +37 -0
- package/src/components/Atoms/TimeStamp/stories.js +9 -0
- package/src/components/Atoms/TimeStamp/timestamp.m.css +22 -0
- package/src/components/Fixture/config.json +2703 -0
- package/src/components/Fixture/dummy-collection.js +2787 -0
- package/src/components/Fixture/dummyStory.js +2148 -0
- package/src/components/Fixture/index.js +424 -0
- package/src/components/Fixture/slot-config.js +29 -0
- package/src/components/Molecules/FullScreenImages/fullscreenimages.scss +48 -0
- package/src/components/Molecules/FullScreenImages/index.js +86 -0
- package/src/components/Molecules/KeyEvents/README.md +21 -0
- package/src/components/Molecules/KeyEvents/index.js +109 -0
- package/src/components/Molecules/KeyEvents/key-events.m.css +89 -0
- package/src/components/Molecules/KeyEvents/stories.js +28 -0
- package/src/components/Molecules/PageIntroductionCard/README.md +25 -0
- package/src/components/Molecules/PageIntroductionCard/index.js +50 -0
- package/src/components/Molecules/PageIntroductionCard/page-intro-card.m.css +61 -0
- package/src/components/Molecules/PageIntroductionCard/stories.js +16 -0
- package/src/components/Molecules/SliderHorizontalCard/README.md +14 -0
- package/src/components/Molecules/SliderHorizontalCard/index.js +45 -0
- package/src/components/Molecules/SliderHorizontalCard/slider-horizontal-card.m.css +42 -0
- package/src/components/Molecules/SliderHorizontalCard/stories.js +30 -0
- package/src/components/Molecules/SocialShareTemplate/README.md +118 -0
- package/src/components/Molecules/SocialShareTemplate/__snapshots__/social-share-template.test.js.snap +738 -0
- package/src/components/Molecules/SocialShareTemplate/index.js +119 -0
- package/src/components/Molecules/SocialShareTemplate/social-share-data.js +66 -0
- package/src/components/Molecules/SocialShareTemplate/social-share-template.m.css +174 -0
- package/src/components/Molecules/SocialShareTemplate/social-share-template.test.js +116 -0
- package/src/components/Molecules/SocialShareTemplate/stories.js +40 -0
- package/src/components/Molecules/StoryCard/README.md +75 -0
- package/src/components/Molecules/StoryCard/READMEBGIMAGE.md +25 -0
- package/src/components/Molecules/StoryCard/READMEBORDER.md +61 -0
- package/src/components/Molecules/StoryCard/index.js +173 -0
- package/src/components/Molecules/StoryCard/stories.js +223 -0
- package/src/components/Molecules/StoryCard/storycard.m.css +158 -0
- package/src/components/Molecules/StoryCardWithBulletPoint/README.md +9 -0
- package/src/components/Molecules/StoryCardWithBulletPoint/index.js +32 -0
- package/src/components/Molecules/StoryCardWithBulletPoint/stories.js +31 -0
- package/src/components/Molecules/StoryCardWithBulletPoint/story-card-with-bullet-point.m.css +7 -0
- package/src/components/Molecules/StoryElementCard/README.md +9 -0
- package/src/components/Molecules/StoryElementCard/index.js +358 -0
- package/src/components/Molecules/StoryElementCard/stories.js +27 -0
- package/src/components/Molecules/StoryElementCard/story-element-card.m.css +78 -0
- package/src/components/Molecules/StorycardContent/README.md +34 -0
- package/src/components/Molecules/StorycardContent/index.js +76 -0
- package/src/components/Molecules/StorycardContent/stories.js +39 -0
- package/src/components/Molecules/StorycardContent/storycardContent.m.css +21 -0
- package/src/components/Rows/AlternateCollectionFilter/README.md +38 -0
- package/src/components/Rows/AlternateCollectionFilter/alternate-collection-filter.m.css +254 -0
- package/src/components/Rows/AlternateCollectionFilter/index.js +179 -0
- package/src/components/Rows/AlternateCollectionFilter/stories.js +74 -0
- package/src/components/Rows/AsideCollection/README.md +27 -0
- package/src/components/Rows/AsideCollection/aside-collection.m.css +103 -0
- package/src/components/Rows/AsideCollection/aside-collection.test.js +34 -0
- package/src/components/Rows/AsideCollection/index.js +175 -0
- package/src/components/Rows/AsideCollection/stories.js +52 -0
- package/src/components/Rows/AuthorIntroductionCard/README.md +43 -0
- package/src/components/Rows/AuthorIntroductionCard/author-intro.m.css +278 -0
- package/src/components/Rows/AuthorIntroductionCard/author-intro.test.js +106 -0
- package/src/components/Rows/AuthorIntroductionCard/index.js +120 -0
- package/src/components/Rows/AuthorIntroductionCard/stories.js +43 -0
- package/src/components/Rows/AuthorsList/README.md +24 -0
- package/src/components/Rows/AuthorsList/author-list.test.js +50 -0
- package/src/components/Rows/AuthorsList/authors-list.m.css +22 -0
- package/src/components/Rows/AuthorsList/index.js +50 -0
- package/src/components/Rows/AuthorsList/stories.js +61 -0
- package/src/components/Rows/CollectionFilter/README.md +39 -0
- package/src/components/Rows/CollectionFilter/collection-filter.m.css +213 -0
- package/src/components/Rows/CollectionFilter/index.js +232 -0
- package/src/components/Rows/CollectionFilter/stories.js +77 -0
- package/src/components/Rows/ElevenStories/11-stories.m.css +85 -0
- package/src/components/Rows/ElevenStories/README.md +39 -0
- package/src/components/Rows/ElevenStories/index.js +332 -0
- package/src/components/Rows/ElevenStories/stories.js +70 -0
- package/src/components/Rows/FourColFiveStories/README.md +37 -0
- package/src/components/Rows/FourColFiveStories/four-col-five-stories.m.css +56 -0
- package/src/components/Rows/FourColFiveStories/index.js +159 -0
- package/src/components/Rows/FourColFiveStories/stories.js +67 -0
- package/src/components/Rows/FourColGrid/README.md +38 -0
- package/src/components/Rows/FourColGrid/four-col.m.css +50 -0
- package/src/components/Rows/FourColGrid/index.js +137 -0
- package/src/components/Rows/FourColGrid/stories.js +65 -0
- package/src/components/Rows/FourColSixteenStories/README.md +35 -0
- package/src/components/Rows/FourColSixteenStories/four-col-sixteen-stories.m.css +104 -0
- package/src/components/Rows/FourColSixteenStories/index.js +103 -0
- package/src/components/Rows/FourColSixteenStories/stories.js +46 -0
- package/src/components/Rows/FourColTwelveStory/README.md +39 -0
- package/src/components/Rows/FourColTwelveStory/four-col-twelve-story.m.css +71 -0
- package/src/components/Rows/FourColTwelveStory/index.js +176 -0
- package/src/components/Rows/FourColTwelveStory/stories.js +117 -0
- package/src/components/Rows/FourStorySlider/README.md +45 -0
- package/src/components/Rows/FourStorySlider/four-story-slider.m.css +45 -0
- package/src/components/Rows/FourStorySlider/index.js +127 -0
- package/src/components/Rows/FourStorySlider/stories.js +117 -0
- package/src/components/Rows/FourTabbedBigStorySlider/README.md +39 -0
- package/src/components/Rows/FourTabbedBigStorySlider/four-tabbed-big-story-slider.m.css +221 -0
- package/src/components/Rows/FourTabbedBigStorySlider/index.js +161 -0
- package/src/components/Rows/FourTabbedBigStorySlider/stories.js +63 -0
- package/src/components/Rows/FullScreenSlider/README.md +46 -0
- package/src/components/Rows/FullScreenSlider/full-screen-slider.m.css +110 -0
- package/src/components/Rows/FullScreenSlider/index.js +114 -0
- package/src/components/Rows/FullScreenSlider/stories.js +115 -0
- package/src/components/Rows/HalfScreenSlider/README.md +43 -0
- package/src/components/Rows/HalfScreenSlider/half-screen-slider.m.css +35 -0
- package/src/components/Rows/HalfScreenSlider/index.js +104 -0
- package/src/components/Rows/HalfScreenSlider/stories.js +115 -0
- package/src/components/Rows/ListComponent/README.md +48 -0
- package/src/components/Rows/ListComponent/index.js +150 -0
- package/src/components/Rows/ListComponent/list-component.m.css +65 -0
- package/src/components/Rows/ListComponent/stories.js +63 -0
- package/src/components/Rows/MagazineEditions/README.md +21 -0
- package/src/components/Rows/MagazineEditions/index.js +91 -0
- package/src/components/Rows/MagazineEditions/magazine-editions.m.css +50 -0
- package/src/components/Rows/MagazineEditions/magazine-editions.test.js +33 -0
- package/src/components/Rows/MagazineEditions/stories.js +45 -0
- package/src/components/Rows/MagazineHeaderCard/README.md +21 -0
- package/src/components/Rows/MagazineHeaderCard/index.js +72 -0
- package/src/components/Rows/MagazineHeaderCard/magazine-cards.m.css +106 -0
- package/src/components/Rows/MagazineHeaderCard/stories.js +36 -0
- package/src/components/Rows/MagazineWidget/README.md +21 -0
- package/src/components/Rows/MagazineWidget/index.js +127 -0
- package/src/components/Rows/MagazineWidget/stories.js +43 -0
- package/src/components/Rows/OneColStoryList/README.md +48 -0
- package/src/components/Rows/OneColStoryList/index.js +196 -0
- package/src/components/Rows/OneColStoryList/one-col-story-list.m.css +81 -0
- package/src/components/Rows/OneColStoryList/stories.js +61 -0
- package/src/components/Rows/OpinionCollection/README.md +34 -0
- package/src/components/Rows/OpinionCollection/index.js +124 -0
- package/src/components/Rows/OpinionCollection/opinion-collection.m.css +118 -0
- package/src/components/Rows/OpinionCollection/stories.js +48 -0
- package/src/components/Rows/SixColSixStories/README.md +37 -0
- package/src/components/Rows/SixColSixStories/index.js +134 -0
- package/src/components/Rows/SixColSixStories/six-col-six-stories.m.css +75 -0
- package/src/components/Rows/SixColSixStories/stories.js +73 -0
- package/src/components/Rows/StoryTemplates/ListicleStoryTemplates/README.md +19 -0
- package/src/components/Rows/StoryTemplates/ListicleStoryTemplates/__snapshots__/listicle-story.test.js.snap +837 -0
- package/src/components/Rows/StoryTemplates/ListicleStoryTemplates/index.js +287 -0
- package/src/components/Rows/StoryTemplates/ListicleStoryTemplates/listicle-story.m.css +229 -0
- package/src/components/Rows/StoryTemplates/ListicleStoryTemplates/listicle-story.test.js +47 -0
- package/src/components/Rows/StoryTemplates/ListicleStoryTemplates/stories.js +117 -0
- package/src/components/Rows/StoryTemplates/LiveBlogStoryTemplates/README.md +25 -0
- package/src/components/Rows/StoryTemplates/LiveBlogStoryTemplates/index.js +51 -0
- package/src/components/Rows/StoryTemplates/LiveBlogStoryTemplates/live-blog.m.css +326 -0
- package/src/components/Rows/StoryTemplates/LiveBlogStoryTemplates/stories.js +120 -0
- package/src/components/Rows/StoryTemplates/LiveBlogStoryTemplates/templates.js +376 -0
- package/src/components/Rows/StoryTemplates/PhotoStoryTemplates/index.js +246 -0
- package/src/components/Rows/StoryTemplates/PhotoStoryTemplates/photo-story.test.js +144 -0
- package/src/components/Rows/StoryTemplates/PhotoStoryTemplates/photo.m.css +175 -0
- package/src/components/Rows/StoryTemplates/PhotoStoryTemplates/stories.js +123 -0
- package/src/components/Rows/StoryTemplates/TextStoryTemplates/README.md +49 -0
- package/src/components/Rows/StoryTemplates/TextStoryTemplates/index.js +69 -0
- package/src/components/Rows/StoryTemplates/TextStoryTemplates/stories.js +125 -0
- package/src/components/Rows/StoryTemplates/TextStoryTemplates/templates.js +272 -0
- package/src/components/Rows/StoryTemplates/TextStoryTemplates/text-story.m.css +449 -0
- package/src/components/Rows/StoryTemplates/TextStoryTemplates/text-story.test.js +222 -0
- package/src/components/Rows/StoryTemplates/VideoStoryTemplates/README.md +31 -0
- package/src/components/Rows/StoryTemplates/VideoStoryTemplates/index.js +234 -0
- package/src/components/Rows/StoryTemplates/VideoStoryTemplates/stories.js +204 -0
- package/src/components/Rows/StoryTemplates/VideoStoryTemplates/video-story.m.css +195 -0
- package/src/components/Rows/TagIntroductionCard/README.md +11 -0
- package/src/components/Rows/TagIntroductionCard/index.js +26 -0
- package/src/components/Rows/TagIntroductionCard/stories.js +21 -0
- package/src/components/Rows/TagIntroductionCard/tag-intro-card.module.css +30 -0
- package/src/components/Rows/ThreeColFlexStories/README.md +38 -0
- package/src/components/Rows/ThreeColFlexStories/index.js +180 -0
- package/src/components/Rows/ThreeColFlexStories/stories.js +73 -0
- package/src/components/Rows/ThreeColFlexStories/three-col-flex-stories.m.css +60 -0
- package/src/components/Rows/ThreeColFourteenStory/README.md +28 -0
- package/src/components/Rows/ThreeColFourteenStory/index.js +135 -0
- package/src/components/Rows/ThreeColFourteenStory/stories.js +60 -0
- package/src/components/Rows/ThreeColFourteenStory/three-col-fourteen-story.m.css +51 -0
- package/src/components/Rows/ThreeColGrid/README.md +36 -0
- package/src/components/Rows/ThreeColGrid/index.js +141 -0
- package/src/components/Rows/ThreeColGrid/stories.js +70 -0
- package/src/components/Rows/ThreeColGrid/three-col.m.css +43 -0
- package/src/components/Rows/ThreeColSevenStory/README.md +36 -0
- package/src/components/Rows/ThreeColSevenStory/index.js +172 -0
- package/src/components/Rows/ThreeColSevenStory/stories.js +71 -0
- package/src/components/Rows/ThreeColSevenStory/three-col-seven-story.m.css +44 -0
- package/src/components/Rows/ThreeColSixStories/README.md +40 -0
- package/src/components/Rows/ThreeColSixStories/index.js +161 -0
- package/src/components/Rows/ThreeColSixStories/stories.js +73 -0
- package/src/components/Rows/ThreeColSixStories/three-col-six-stories.m.css +32 -0
- package/src/components/Rows/ThreeColTwelveStories/README.md +41 -0
- package/src/components/Rows/ThreeColTwelveStories/index.js +123 -0
- package/src/components/Rows/ThreeColTwelveStories/stories.js +51 -0
- package/src/components/Rows/ThreeColTwelveStories/three-col-twelve-stories.m.css +83 -0
- package/src/components/Rows/TwoColFourStory/README.md +33 -0
- package/src/components/Rows/TwoColFourStory/index.js +151 -0
- package/src/components/Rows/TwoColFourStory/stories.js +68 -0
- package/src/components/Rows/TwoColFourStory/two-col-four-story.m.css +56 -0
- package/src/components/Rows/TwoColFourStoryHighlight/README.md +35 -0
- package/src/components/Rows/TwoColFourStoryHighlight/index.js +122 -0
- package/src/components/Rows/TwoColFourStoryHighlight/stories.js +48 -0
- package/src/components/Rows/TwoColFourStoryHighlight/two-col-four-story-highlight.m.css +116 -0
- package/src/components/Rows/TwoColSixStories/README.md +36 -0
- package/src/components/Rows/TwoColSixStories/index.js +117 -0
- package/src/components/Rows/TwoColSixStories/stories.js +67 -0
- package/src/components/Rows/TwoColSixStories/two-col-six-stories.m.css +79 -0
- package/src/components/Rows/TwoColTenStoriesSidebar/README.md +34 -0
- package/src/components/Rows/TwoColTenStoriesSidebar/index.js +168 -0
- package/src/components/Rows/TwoColTenStoriesSidebar/stories.js +45 -0
- package/src/components/Rows/TwoColTenStoriesSidebar/two-col-ten-stories-sidebar.m.css +52 -0
- package/src/components/Rows/TwoColThreeStory/README.md +36 -0
- package/src/components/Rows/TwoColThreeStory/index.js +137 -0
- package/src/components/Rows/TwoColThreeStory/stories.js +68 -0
- package/src/components/Rows/TwoColThreeStory/two-col-three-story.m.css +36 -0
- package/src/components/SharedContext.js +13 -0
- package/src/components/Svgs/Loading/loading.js +133 -0
- package/src/components/Svgs/Loading/loading.m.css +5 -0
- package/src/components/Svgs/SocialIcons/facebook.js +15 -0
- package/src/components/Svgs/SocialIcons/instagram.js +24 -0
- package/src/components/Svgs/SocialIcons/linkedin.js +15 -0
- package/src/components/Svgs/SocialIcons/pinterest.js +12 -0
- package/src/components/Svgs/SocialIcons/twitter.js +15 -0
- package/src/components/Svgs/SocialIcons/whatsapp.js +17 -0
- package/src/components/Svgs/SocialIcons/youtube.js +17 -0
- package/src/components/Svgs/caret-right.svg +3 -0
- package/src/components/Svgs/clock-icon.js +17 -0
- package/src/components/Svgs/close-icon.js +15 -0
- package/src/components/Svgs/crown.js +31 -0
- package/src/components/Svgs/fallbackImage.js +42 -0
- package/src/components/Svgs/key.js +33 -0
- package/src/components/Svgs/left-arrow.js +17 -0
- package/src/components/Svgs/liveicon.js +13 -0
- package/src/components/Svgs/lock.js +31 -0
- package/src/components/Svgs/right-arrow.js +17 -0
- package/src/components/Svgs/share-icon.js +17 -0
- package/src/components/Svgs/star.js +28 -0
- package/src/components/Svgs/user-fallback-icon.js +19 -0
- package/src/components/Typography/README.md +7 -0
- package/src/components/Typography/index.js +47 -0
- package/src/components/Typography/stories.js +10 -0
- package/src/components/Typography/style.m.css +11 -0
- package/src/entry-points.js +337 -0
- package/src/guide/stories.js +18 -0
- package/src/hydration-component/index.js +37 -0
- package/src/hydration-component/useNearScreen.js +56 -0
- package/src/index.js +85 -0
- package/src/utils/testing-utils.js +8 -0
- package/src/utils/utils.js +280 -0
- package/src/utils/utils.test.js +55 -0
- package/storybook/index.js +83 -0
- package/AlsoRead/styles.arrow.css +0 -1
- package/AsideCollection/styles.arrow.css +0 -1
- package/Attachment/styles.arrow.css +0 -1
- package/Author/styles.arrow.css +0 -1
- package/AuthorIntroductionCard/styles.arrow.css +0 -1
- package/AuthorPageIntroductionCard/styles.arrow.css +0 -1
- package/AuthorWithTime/styles.arrow.css +0 -1
- package/AuthorsList/styles.arrow.css +0 -1
- package/BigFact/styles.arrow.css +0 -1
- package/BlockQuote/styles.arrow.css +0 -1
- package/Blurb/styles.arrow.css +0 -1
- package/CollectionFilter/styles.arrow.css +0 -1
- package/CollectionName/styles.arrow.css +0 -1
- package/ElevenStories/styles.arrow.css +0 -1
- package/FourColGrid/styles.arrow.css +0 -1
- package/FourColTwelveStories/styles.arrow.css +0 -1
- package/FourStorySlider/styles.arrow.css +0 -1
- package/FullScreenSlider/styles.arrow.css +0 -1
- package/HalfScreenSlider/styles.arrow.css +0 -1
- package/Headline/styles.arrow.css +0 -1
- package/HeroImage/styles.arrow.css +0 -1
- package/Image/styles.arrow.css +0 -1
- package/ImageGallery/styles.arrow.css +0 -1
- package/ImageSlideshow/styles.arrow.css +0 -1
- package/ListComponent/styles.arrow.css +0 -1
- package/ListicleStoryTemplate/styles.arrow.css +0 -1
- package/LiveBlogStoryTemplate/styles.arrow.css +0 -1
- package/LoadmoreButton/styles.arrow.css +0 -1
- package/MagazineEditions/styles.arrow.css +0 -1
- package/MagazineHeaderCard/styles.arrow.css +0 -1
- package/MagazineWidget/styles.arrow.css +0 -1
- package/OneColStoryList/styles.arrow.css +0 -1
- package/PhotoStoryTemplate/styles.arrow.css +0 -1
- package/QuestionAnswer/styles.arrow.css +0 -1
- package/Quote/styles.arrow.css +0 -1
- package/Reference/styles.arrow.css +0 -1
- package/SectionTag/styles.arrow.css +0 -1
- package/StoryCard/styles.arrow.css +0 -1
- package/StoryElementCard/styles.arrow.css +0 -1
- package/StorycardContent/styles.arrow.css +0 -1
- package/Subheadline/styles.arrow.css +0 -1
- package/Summary/styles.arrow.css +0 -1
- package/TagIntroductionCard/styles.arrow.css +0 -1
- package/Text/styles.arrow.css +0 -1
- package/TextStoryTemplate/styles.arrow.css +0 -1
- package/ThreeColFourteenStories/styles.arrow.css +0 -1
- package/ThreeColGrid/styles.arrow.css +0 -1
- package/ThreeColSevenStory/styles.arrow.css +0 -1
- package/ThreeColSixStories/styles.arrow.css +0 -1
- package/TimeStamp/styles.arrow.css +0 -1
- package/TwoColFourStories/styles.arrow.css +0 -1
- package/TwoColThreeStories/styles.arrow.css +0 -1
- package/Video/styles.arrow.css +0 -1
- package/VideoStoryTemplate/styles.arrow.css +0 -1
- package/cjs/index.js +0 -1
- package/esm/index.js +0 -1
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { SocialShare } from "@quintype/components";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import get from "lodash.get";
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
|
+
import { AuthorCard } from "../../../Atoms/AuthorCard";
|
|
6
|
+
import { CaptionAttribution } from "../../../Atoms/CaptionAttribution";
|
|
7
|
+
import { StoryHeadline } from "../../../Atoms/StoryHeadline";
|
|
8
|
+
import { HeroImage } from "../../../Atoms/HeroImage";
|
|
9
|
+
import { PublishDetails } from "../../../Atoms/PublishDetail";
|
|
10
|
+
import { SectionTag } from "../../../Atoms/SectionTag";
|
|
11
|
+
import { Subheadline } from "../../../Atoms/Subheadline";
|
|
12
|
+
import { StateProvider } from "../../../SharedContext";
|
|
13
|
+
import { SocialShareTemplate } from "../../../Molecules/SocialShareTemplate";
|
|
14
|
+
import "./listicle-story.m.css";
|
|
15
|
+
import { StoryElementCard, SlotAfterStory } from "../../../Molecules/StoryElementCard";
|
|
16
|
+
import { StoryTags } from "../../../Atoms/StoryTags";
|
|
17
|
+
import AsideCollection from "../../AsideCollection";
|
|
18
|
+
|
|
19
|
+
const ListicleStoryTemplate = ({
|
|
20
|
+
story = {},
|
|
21
|
+
config = {},
|
|
22
|
+
storyElementsConfig,
|
|
23
|
+
adComponent,
|
|
24
|
+
widgetComp = () => {},
|
|
25
|
+
firstChild,
|
|
26
|
+
secondChild
|
|
27
|
+
}) => {
|
|
28
|
+
const {
|
|
29
|
+
theme = "",
|
|
30
|
+
noOfVisibleCards = -1,
|
|
31
|
+
publishedDetails = {},
|
|
32
|
+
templateType = "",
|
|
33
|
+
authorDetails = {
|
|
34
|
+
template: "default"
|
|
35
|
+
},
|
|
36
|
+
asideCollection = {},
|
|
37
|
+
showSection,
|
|
38
|
+
sectionTagSettings,
|
|
39
|
+
premiumStoryIconConfig = {}
|
|
40
|
+
} = config;
|
|
41
|
+
const visibledCards = noOfVisibleCards < 0 ? story.cards : story.cards.slice(0, noOfVisibleCards);
|
|
42
|
+
const { "bullet-type": storyBulletType = "" } = story;
|
|
43
|
+
const storyId = get(story, ["id"], "");
|
|
44
|
+
|
|
45
|
+
// Content Blocks
|
|
46
|
+
const HeroImageBlock = (settings) => {
|
|
47
|
+
const { widths = [320, 480, 768, 1024, 1140], aspectRatio = [[16, 9]] } = settings;
|
|
48
|
+
return (
|
|
49
|
+
<HeroImage
|
|
50
|
+
defaultWidth={320}
|
|
51
|
+
story={story}
|
|
52
|
+
widths={widths}
|
|
53
|
+
aspectRatio={aspectRatio}
|
|
54
|
+
defaultFallback={false}
|
|
55
|
+
isStoryPageImage
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
const CaptionAttributionBlock = () => (
|
|
60
|
+
<div styleName="caption-attribution-block">
|
|
61
|
+
<CaptionAttribution story={story} />
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
const HeadlineBlock = () => (
|
|
65
|
+
<div styleName="headline-block">
|
|
66
|
+
<div styleName="section-tag">{showSection && <SectionTag story={story} {...sectionTagSettings} />}</div>
|
|
67
|
+
<StoryHeadline story={story} premiumStoryIconConfig={premiumStoryIconConfig} />
|
|
68
|
+
<Subheadline story={story} showFullContent />
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const AuthourBlock = () => (
|
|
73
|
+
<>
|
|
74
|
+
<AuthorCard story={story} {...authorDetails} />
|
|
75
|
+
<div styleName="timestamp-social-share">
|
|
76
|
+
<PublishDetails story={story} opts={publishedDetails} />
|
|
77
|
+
<div id={`story-share-${storyId}`} className="content-style">
|
|
78
|
+
<SocialShare
|
|
79
|
+
template={SocialShareTemplate}
|
|
80
|
+
theme={theme}
|
|
81
|
+
fullUrl={encodeURI(story.url)}
|
|
82
|
+
title={story.headline}
|
|
83
|
+
shareIconId={`share-icon-story-share-${storyId}`}
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</>
|
|
88
|
+
);
|
|
89
|
+
const BodyBlock = () => (
|
|
90
|
+
<div styleName="body-block">
|
|
91
|
+
{visibledCards.map((card, index) => {
|
|
92
|
+
return (
|
|
93
|
+
<React.Fragment key={card.id}>
|
|
94
|
+
{storyBulletType === "bullets" ? (
|
|
95
|
+
<div styleName="bullet-style-dash" />
|
|
96
|
+
) : (
|
|
97
|
+
<div styleName="bullet-style-number">{index + 1}.</div>
|
|
98
|
+
)}
|
|
99
|
+
<StoryElementCard
|
|
100
|
+
story={story}
|
|
101
|
+
card={card}
|
|
102
|
+
key={card.id}
|
|
103
|
+
config={storyElementsConfig}
|
|
104
|
+
adComponent={adComponent}
|
|
105
|
+
widgetComp={widgetComp}
|
|
106
|
+
/>
|
|
107
|
+
</React.Fragment>
|
|
108
|
+
);
|
|
109
|
+
})}
|
|
110
|
+
{firstChild}
|
|
111
|
+
<div styleName="story-tags">
|
|
112
|
+
<StoryTags tags={story.tags} />
|
|
113
|
+
<SlotAfterStory
|
|
114
|
+
id={story.id}
|
|
115
|
+
element={story.customSlotAfterStory}
|
|
116
|
+
AdComponent={adComponent}
|
|
117
|
+
WidgetComp={widgetComp}
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
{secondChild}
|
|
121
|
+
</div>
|
|
122
|
+
);
|
|
123
|
+
const SideColumnBlock = () =>
|
|
124
|
+
asideCollection && (
|
|
125
|
+
<AsideCollection
|
|
126
|
+
{...asideCollection}
|
|
127
|
+
adComponent={adComponent}
|
|
128
|
+
widgetComp={widgetComp}
|
|
129
|
+
sticky={true}
|
|
130
|
+
storyId={storyId}
|
|
131
|
+
opts={publishedDetails}
|
|
132
|
+
/>
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
// Templates
|
|
136
|
+
const DefaultTemplate = () => (
|
|
137
|
+
<>
|
|
138
|
+
<HeroImageBlock aspectRatio={[[16, 9], [16, 6]]} />
|
|
139
|
+
<div styleName="grid-container">
|
|
140
|
+
<div styleName="full-grid">
|
|
141
|
+
<CaptionAttributionBlock />
|
|
142
|
+
</div>
|
|
143
|
+
<div data-type-column="left" styleName="left-column">
|
|
144
|
+
<HeadlineBlock />
|
|
145
|
+
<AuthourBlock />
|
|
146
|
+
<BodyBlock />
|
|
147
|
+
</div>
|
|
148
|
+
<div data-type-column="right" styleName="right-column">
|
|
149
|
+
<SideColumnBlock />
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</>
|
|
153
|
+
);
|
|
154
|
+
const HeroPriority = () => (
|
|
155
|
+
<div styleName="hero-priority-template">
|
|
156
|
+
<div styleName="grid-container">
|
|
157
|
+
<div styleName="full-grid">
|
|
158
|
+
<HeroImageBlock />
|
|
159
|
+
</div>
|
|
160
|
+
<div styleName="center-column">
|
|
161
|
+
<CaptionAttributionBlock />
|
|
162
|
+
<HeadlineBlock />
|
|
163
|
+
<AuthourBlock />
|
|
164
|
+
<BodyBlock />
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
);
|
|
169
|
+
const HeadlinePriority = () => (
|
|
170
|
+
<div styleName="headline-priority-template">
|
|
171
|
+
<div styleName="grid-container">
|
|
172
|
+
<div styleName="headline-priority-grid">
|
|
173
|
+
<HeadlineBlock />
|
|
174
|
+
</div>
|
|
175
|
+
<div styleName="left-column">
|
|
176
|
+
<HeroImageBlock />
|
|
177
|
+
<CaptionAttributionBlock />
|
|
178
|
+
<AuthourBlock />
|
|
179
|
+
<BodyBlock />
|
|
180
|
+
</div>
|
|
181
|
+
<div styleName="right-column">
|
|
182
|
+
<SideColumnBlock />
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
);
|
|
187
|
+
const HeadlineHeroPriority = () => (
|
|
188
|
+
<div styleName="headline-hero-priority-template">
|
|
189
|
+
<div styleName="grid-container">
|
|
190
|
+
<div styleName="center-column">
|
|
191
|
+
<HeadlineBlock />
|
|
192
|
+
</div>
|
|
193
|
+
<div styleName="full-grid">
|
|
194
|
+
<HeroImageBlock />
|
|
195
|
+
</div>
|
|
196
|
+
<div styleName="center-column">
|
|
197
|
+
<CaptionAttributionBlock />
|
|
198
|
+
<AuthourBlock />
|
|
199
|
+
<BodyBlock />
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
);
|
|
204
|
+
const HeroOverlay = () => (
|
|
205
|
+
<div styleName="hero-overlay-template">
|
|
206
|
+
<div styleName="grid-container">
|
|
207
|
+
<div styleName="full-grid hero-faded-relative">
|
|
208
|
+
<div styleName="hero-faded-wrapper">
|
|
209
|
+
<div styleName="headline-content-holder">
|
|
210
|
+
<HeadlineBlock />
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
<HeroImageBlock aspectRatio={[[2, 3], [16, 9]]} />
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
<div styleName="grid-container">
|
|
217
|
+
<div styleName="center-column">
|
|
218
|
+
<CaptionAttributionBlock />
|
|
219
|
+
<AuthourBlock />
|
|
220
|
+
<BodyBlock />
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
);
|
|
225
|
+
const HeadlineSideway = () => (
|
|
226
|
+
<div styleName="headline-sideway-template">
|
|
227
|
+
<div styleName="sideway-grid">
|
|
228
|
+
<div styleName="sideway-headline">
|
|
229
|
+
<HeadlineBlock />
|
|
230
|
+
</div>
|
|
231
|
+
<div styleName="sideway-hero">
|
|
232
|
+
<HeroImageBlock aspectRatio={[[16, 9], [4, 3]]} />
|
|
233
|
+
<CaptionAttributionBlock />
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
<div styleName="grid-container">
|
|
237
|
+
<div styleName="center-column">
|
|
238
|
+
<AuthourBlock />
|
|
239
|
+
<BodyBlock />
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
const renderTemplate = () => {
|
|
246
|
+
switch (templateType) {
|
|
247
|
+
case "hero-priority":
|
|
248
|
+
return <HeroPriority />;
|
|
249
|
+
case "headline-priority":
|
|
250
|
+
return <HeadlinePriority />;
|
|
251
|
+
case "headline-hero-priority":
|
|
252
|
+
return <HeadlineHeroPriority />;
|
|
253
|
+
case "hero-overlay":
|
|
254
|
+
return <HeroOverlay />;
|
|
255
|
+
case "headline-sideway":
|
|
256
|
+
return <HeadlineSideway />;
|
|
257
|
+
default:
|
|
258
|
+
return <DefaultTemplate />;
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
const dataTestId = templateType ? `listicle-story-${templateType}` : "listicle-story";
|
|
262
|
+
return (
|
|
263
|
+
<div
|
|
264
|
+
data-test-id={dataTestId}
|
|
265
|
+
className="arrow-component arr--content-wrapper arr--listicle-story-template-wrapper"
|
|
266
|
+
style={{ backgroundColor: theme }}>
|
|
267
|
+
{renderTemplate()}
|
|
268
|
+
</div>
|
|
269
|
+
);
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
ListicleStoryTemplate.propTypes = {
|
|
273
|
+
story: PropTypes.object,
|
|
274
|
+
config: PropTypes.shape({
|
|
275
|
+
templateType: PropTypes.string,
|
|
276
|
+
authorCard: PropTypes.object,
|
|
277
|
+
asideCollection: PropTypes.object
|
|
278
|
+
}),
|
|
279
|
+
firstChild: PropTypes.node,
|
|
280
|
+
secondChild: PropTypes.node,
|
|
281
|
+
storyElementsConfig: PropTypes.object,
|
|
282
|
+
adComponent: PropTypes.func,
|
|
283
|
+
widgetComp: PropTypes.func,
|
|
284
|
+
premiumStoryIconConfig: PropTypes.object
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
export default StateProvider(ListicleStoryTemplate);
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
@import "../../../../../assets/stylesheets/mixins.scss";
|
|
2
|
+
:root {
|
|
3
|
+
--grid-container-width: 1140px;
|
|
4
|
+
--fluid-grid-container-width: 1440px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* Generinc style */
|
|
8
|
+
.headline-block :global(.arr--story-headline) {
|
|
9
|
+
font-size: var(--arrow-fs-28);
|
|
10
|
+
line-height: normal;
|
|
11
|
+
@include tablet {
|
|
12
|
+
font-size: var(--arrow-fs-big);
|
|
13
|
+
line-height: var(--arrow-lh-2);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.headline-block :global(.arr--sub-headline) {
|
|
18
|
+
font-size: var(--arrow-fs-s);
|
|
19
|
+
font-style: italic;
|
|
20
|
+
margin: var(--arrow-spacing-xs) 0 var(--arrow-spacing-l);
|
|
21
|
+
@include tablet {
|
|
22
|
+
font-size: var(--arrow-fs-m);
|
|
23
|
+
margin-bottom: var(--arrow-spacing-xl);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.section-tag {
|
|
28
|
+
margin-bottom: var(--arrow-spacing-s);
|
|
29
|
+
}
|
|
30
|
+
.caption-attribution-block {
|
|
31
|
+
margin-bottom: var(--arrow-spacing-l);
|
|
32
|
+
@include tablet {
|
|
33
|
+
margin-bottom: var(--arrow-spacing-xl);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.body-block :global(.arr--element-container) {
|
|
38
|
+
margin-top: var(--arrow-spacing-s);
|
|
39
|
+
@include tablet {
|
|
40
|
+
margin-top: var(--arrow-spacing-m);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.body-block :global(.story-element-title) {
|
|
45
|
+
line-height: var(--arrow-lh-2);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.timestamp-social-share {
|
|
49
|
+
display: flex;
|
|
50
|
+
justify-content: space-between;
|
|
51
|
+
align-items: center;
|
|
52
|
+
margin: var(--arrow-spacing-xxs) 0 var(--arrow-spacing-l);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.bullet-style-number {
|
|
56
|
+
font-size: var(--arrow-fs-l);
|
|
57
|
+
font-weight: var(--arrow-fw-semi-bold);
|
|
58
|
+
color: var(--arrow-c-brand1);
|
|
59
|
+
@include tablet {
|
|
60
|
+
font-size: var(--arrow-fs-huge);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.bullet-style-dash {
|
|
65
|
+
content: "";
|
|
66
|
+
width: 24px;
|
|
67
|
+
height: 8px;
|
|
68
|
+
background-color: var(--arrow-c-brand1);
|
|
69
|
+
@include tablet {
|
|
70
|
+
height: 12px;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.story-tags > * {
|
|
75
|
+
margin: var(--arrow-spacing-l) 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Layout */
|
|
79
|
+
.grid-container {
|
|
80
|
+
max-width: var(--grid-container-width);
|
|
81
|
+
padding: 0 var(--arrow-spacing-s);
|
|
82
|
+
margin: 0 auto;
|
|
83
|
+
@include tablet {
|
|
84
|
+
display: grid;
|
|
85
|
+
grid-column-gap: 24px;
|
|
86
|
+
grid-template-columns: repeat(12, 1fr);
|
|
87
|
+
padding: 0 var(--arrow-spacing-l);
|
|
88
|
+
|
|
89
|
+
.full-grid {
|
|
90
|
+
grid-column: 1 / 13;
|
|
91
|
+
@include desktop {
|
|
92
|
+
margin: 0 calc(-1 * var(--arrow-spacing-l));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.left-column {
|
|
99
|
+
@include tablet {
|
|
100
|
+
grid-column: 1 / 8;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@include desktop {
|
|
104
|
+
grid-column: 1 / 9;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.right-column {
|
|
109
|
+
@include tablet {
|
|
110
|
+
grid-column: 8 / 13;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@include desktop {
|
|
114
|
+
grid-column: 9 / 13;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.right-column :global(.aside-collection-ad-slot:first-child) {
|
|
119
|
+
margin-top: 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.center-column {
|
|
123
|
+
@include tablet {
|
|
124
|
+
grid-column: 3 / 11;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Template specific */
|
|
129
|
+
.hero-faded-relative {
|
|
130
|
+
position: relative;
|
|
131
|
+
}
|
|
132
|
+
.hero-faded-wrapper {
|
|
133
|
+
position: absolute;
|
|
134
|
+
left: 0;
|
|
135
|
+
right: 0;
|
|
136
|
+
top: 0;
|
|
137
|
+
bottom: 0;
|
|
138
|
+
z-index: var(--z-index-1);
|
|
139
|
+
background: rgb(0 0 0 / 0.5);
|
|
140
|
+
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
|
|
144
|
+
@include tablet {
|
|
145
|
+
display: grid;
|
|
146
|
+
grid-template-columns: repeat(12, 1fr);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.hero-faded-wrapper .headline-content-holder {
|
|
151
|
+
padding: 0 24px;
|
|
152
|
+
|
|
153
|
+
@include tablet {
|
|
154
|
+
grid-column: 2 / 12;
|
|
155
|
+
}
|
|
156
|
+
@include desktop {
|
|
157
|
+
grid-column: 3 / 11;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.hero-faded-wrapper .headline-content-holder :global(.arr--story-headline),
|
|
162
|
+
.hero-faded-wrapper .headline-content-holder :global(.arr--sub-headline),
|
|
163
|
+
.hero-faded-wrapper .headline-content-holder :global(.arr--section-name .section-tag) {
|
|
164
|
+
color: var(--arrow-c-light);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.sideway-grid {
|
|
168
|
+
padding: 0 var(--arrow-spacing-s);
|
|
169
|
+
@include tablet {
|
|
170
|
+
display: grid;
|
|
171
|
+
max-width: var(--fluid-grid-container-width);
|
|
172
|
+
margin: 0 auto var(--arrow-spacing-l);
|
|
173
|
+
padding: 0 0 0 24px;
|
|
174
|
+
grid-template-columns: repeat(12, 1fr);
|
|
175
|
+
grid-column-gap: 24px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@include desktop {
|
|
179
|
+
padding: 0;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.sideway-headline {
|
|
184
|
+
@include tablet {
|
|
185
|
+
grid-column: 1 / 6;
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
}
|
|
189
|
+
@include desktop {
|
|
190
|
+
grid-column: 2 / 7;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.sideway-hero {
|
|
195
|
+
@include tablet {
|
|
196
|
+
grid-column: 6 / 13;
|
|
197
|
+
|
|
198
|
+
.caption-attribution-block {
|
|
199
|
+
margin-bottom: 0;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
@include desktop {
|
|
203
|
+
grid-column: 7 / 13;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.headline-priority-grid {
|
|
208
|
+
@include tablet {
|
|
209
|
+
grid-column: 1 / 13;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
@include desktop {
|
|
213
|
+
grid-column: 1 / 9;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.hero-priority-template,
|
|
218
|
+
.headline-priority-template,
|
|
219
|
+
.headline-hero-priority-template,
|
|
220
|
+
.hero-overlay-template,
|
|
221
|
+
.headline-sideway-template {
|
|
222
|
+
margin-top: var(--arrow-spacing-s);
|
|
223
|
+
@include tablet {
|
|
224
|
+
margin-top: var(--arrow-spacing-l);
|
|
225
|
+
}
|
|
226
|
+
@include desktop {
|
|
227
|
+
margin-top: var(--arrow-spacing-xl);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { shallow } from "enzyme";
|
|
3
|
+
import { generateStory } from "../../../Fixture";
|
|
4
|
+
import ListicleStoryTemplate from "./index";
|
|
5
|
+
import { mockIntersectionObserver } from "../../../../utils/testing-utils";
|
|
6
|
+
|
|
7
|
+
const story = generateStory("listicle-story");
|
|
8
|
+
|
|
9
|
+
const storyElementsConfig = {
|
|
10
|
+
summary: {},
|
|
11
|
+
blurb: {},
|
|
12
|
+
blockquote: {},
|
|
13
|
+
quote: {},
|
|
14
|
+
"also-read": {},
|
|
15
|
+
"q-and-a": {},
|
|
16
|
+
question: {},
|
|
17
|
+
answer: {},
|
|
18
|
+
references: {}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
mockIntersectionObserver();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
describe("Listicle Story Templates", () => {
|
|
26
|
+
it("Should render listicle story template with section tag", () => {
|
|
27
|
+
const templateConfig = {
|
|
28
|
+
templateType: "default",
|
|
29
|
+
showSection: true
|
|
30
|
+
};
|
|
31
|
+
const wrapper = shallow(
|
|
32
|
+
<ListicleStoryTemplate story={story} config={templateConfig} storyElementsConfig={storyElementsConfig} />
|
|
33
|
+
);
|
|
34
|
+
expect(wrapper).toMatchSnapshot();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("Should render listicle story template without section tag", () => {
|
|
38
|
+
const templateConfig = {
|
|
39
|
+
templateType: "default",
|
|
40
|
+
showSection: false
|
|
41
|
+
};
|
|
42
|
+
const wrapper = shallow(
|
|
43
|
+
<ListicleStoryTemplate story={story} config={templateConfig} storyElementsConfig={storyElementsConfig} />
|
|
44
|
+
);
|
|
45
|
+
expect(wrapper).toMatchSnapshot();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { boolean, color, text } from "@storybook/addon-knobs";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import ListicleStoryTemplate from ".";
|
|
4
|
+
import { optionalSelect, withStore } from "../../../../../storybook";
|
|
5
|
+
import { AdPlaceholder } from "../../../Atoms/AdPlaceholder";
|
|
6
|
+
import { generateCollection, generateStory } from "../../../Fixture";
|
|
7
|
+
import { slotData } from "../../../Fixture/slot-config";
|
|
8
|
+
import Readme from "./README.md";
|
|
9
|
+
|
|
10
|
+
const story = generateStory("listicle-story");
|
|
11
|
+
const collection = generateCollection({ stories: 4 });
|
|
12
|
+
const label = "BG Color";
|
|
13
|
+
const defaultvalue = "#ffffff";
|
|
14
|
+
|
|
15
|
+
const configurableSlot = () => {
|
|
16
|
+
return <AdPlaceholder height="250px" width="300px" />;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const storyTemplates = {
|
|
20
|
+
Default: "default",
|
|
21
|
+
"Hero Priority": "hero-priority",
|
|
22
|
+
"Headline Priority": "headline-priority",
|
|
23
|
+
"Headline Hero Priority": "headline-hero-priority",
|
|
24
|
+
"Hero Overlay": "hero-overlay",
|
|
25
|
+
"Headline Sideway": "headline-sideway"
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const sectionTagTemplates = {
|
|
29
|
+
Default: "",
|
|
30
|
+
"Border Bottom Small": "borderBottomSml",
|
|
31
|
+
Solid: "solid",
|
|
32
|
+
"Border Left": "borderLeft"
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const authorTemplates = {
|
|
36
|
+
default: "default",
|
|
37
|
+
leftAligned: "leftAligned",
|
|
38
|
+
centerAligned: "centerAligned"
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
withStore(
|
|
42
|
+
"Rows/Story Templates/Listicle Story Template",
|
|
43
|
+
{
|
|
44
|
+
qt: {
|
|
45
|
+
config: {
|
|
46
|
+
"cdn-image": "thumbor-stg.assettype.com",
|
|
47
|
+
mountAt: "/sub-directory"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
Readme
|
|
52
|
+
).add("Default", () => {
|
|
53
|
+
const templateConfig = {
|
|
54
|
+
templateType: optionalSelect("Template Options", storyTemplates),
|
|
55
|
+
// templateType: "headline-sideway",
|
|
56
|
+
theme: color(label, defaultvalue),
|
|
57
|
+
noOfVisibleCards: -1,
|
|
58
|
+
showSection: boolean("Show Section Tag", true),
|
|
59
|
+
publishedDetails: {
|
|
60
|
+
showReadTime: boolean("Read time", true),
|
|
61
|
+
enablePublishedTime: boolean("Show Published Time", true),
|
|
62
|
+
enableUpdatedTime: boolean("Show Updated Time", false)
|
|
63
|
+
},
|
|
64
|
+
authorDetails: {
|
|
65
|
+
template: optionalSelect("Author Templates", authorTemplates) || "default",
|
|
66
|
+
opts: {
|
|
67
|
+
showBio: boolean("Author Bio", false),
|
|
68
|
+
showImage: boolean("Author Image", true),
|
|
69
|
+
showName: boolean("Author Name", true)
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
sectionTagSettings: {
|
|
73
|
+
template: optionalSelect("Section Template", sectionTagTemplates) || "borderBottomSml",
|
|
74
|
+
borderColor: color("Section Tag Border Color", "#ff214b")
|
|
75
|
+
},
|
|
76
|
+
premiumStoryIconConfig: {
|
|
77
|
+
iconColor: "#F7B500",
|
|
78
|
+
iconType: "star",
|
|
79
|
+
enablePremiumStoryIcon: true
|
|
80
|
+
},
|
|
81
|
+
asideCollection: {
|
|
82
|
+
data: collection,
|
|
83
|
+
config: {
|
|
84
|
+
collectionNameBorderColor: color("Aside Collection Name Border Color", "#3a9fdd"),
|
|
85
|
+
title: text("Aside Collection Title", "Trending"),
|
|
86
|
+
theme: color(label, defaultvalue),
|
|
87
|
+
adSlot: [{ type: "ad", component: configurableSlot }],
|
|
88
|
+
showAuthor: boolean("Author", true),
|
|
89
|
+
showTime: boolean("Timestamp", true)
|
|
90
|
+
},
|
|
91
|
+
slots: slotData
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const storyElementsConfig = {
|
|
96
|
+
summary: {},
|
|
97
|
+
blurb: {},
|
|
98
|
+
blockquote: {},
|
|
99
|
+
quote: {},
|
|
100
|
+
"also-read": {},
|
|
101
|
+
"q-and-a": {},
|
|
102
|
+
question: {},
|
|
103
|
+
answer: {},
|
|
104
|
+
references: {}
|
|
105
|
+
};
|
|
106
|
+
return (
|
|
107
|
+
<ListicleStoryTemplate
|
|
108
|
+
story={story}
|
|
109
|
+
config={templateConfig}
|
|
110
|
+
storyElementsConfig={storyElementsConfig}
|
|
111
|
+
firstChild={<AdPlaceholder height="250px" width="300px" />}
|
|
112
|
+
secondChild={<AdPlaceholder height="250px" width="300px" />}
|
|
113
|
+
adComponent={configurableSlot}
|
|
114
|
+
widgetComp={configurableSlot}
|
|
115
|
+
/>
|
|
116
|
+
);
|
|
117
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# LiveBlog Story Template
|
|
2
|
+
|
|
3
|
+
LiveBlog story template is a basic component used to represent a LiveBlog story.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
## Default template
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
<LiveBlog story={story} templateConfig={templateConfig} templateType="default" />
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Hero Priority
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<LiveBlog story={story} templateConfig={templateConfig} templateType="hero-priority" />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Template with Children
|
|
20
|
+
|
|
21
|
+
```jsx
|
|
22
|
+
<LiveBlog story={story} templateConfig={templateConfig}>
|
|
23
|
+
<Children />
|
|
24
|
+
</LiveBlog>
|
|
25
|
+
```
|