@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,424 @@
|
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
|
+
import configJSON from "./config.json";
|
|
3
|
+
import { dummyStory, dummyPhotoStory, dummyLiveBlogStory, dummyListicleStory } from "./dummyStory";
|
|
4
|
+
import get from "lodash.get";
|
|
5
|
+
import { createStore } from "redux";
|
|
6
|
+
|
|
7
|
+
export const generateConfig = () => configJSON;
|
|
8
|
+
|
|
9
|
+
export const generateStory = (storyType, data = {}) => {
|
|
10
|
+
switch (storyType) {
|
|
11
|
+
case "photo-story":
|
|
12
|
+
return Object.assign(dummyPhotoStory, data);
|
|
13
|
+
case "live-blog":
|
|
14
|
+
return Object.assign(dummyLiveBlogStory, data);
|
|
15
|
+
case "listicle-story":
|
|
16
|
+
return Object.assign(dummyListicleStory, data);
|
|
17
|
+
default:
|
|
18
|
+
return Object.assign(dummyStory, data);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const generateCollection = ({ stories = 0, subCollections = [], itemMeta = {} } = {}) => {
|
|
23
|
+
let items = subCollections;
|
|
24
|
+
Array(stories)
|
|
25
|
+
.fill({ type: "story", ...itemMeta })
|
|
26
|
+
.forEach((item, index) => {
|
|
27
|
+
const story = generateStory();
|
|
28
|
+
let itm = Object.assign({}, item, { id: story.id, story });
|
|
29
|
+
items.push(itm);
|
|
30
|
+
});
|
|
31
|
+
return {
|
|
32
|
+
type: "collection",
|
|
33
|
+
name: "Politics",
|
|
34
|
+
id: parseInt(Math.random() * 10 ** 10),
|
|
35
|
+
slug: "collection-slug",
|
|
36
|
+
template: "section",
|
|
37
|
+
"created-at": 1597163351395,
|
|
38
|
+
metadata: {
|
|
39
|
+
"cover-image": {
|
|
40
|
+
"cover-image-url":
|
|
41
|
+
"https://thumbor-stg.assettype.com/ace/2020-08/f71dd527-cbc6-4cc9-94c2-8feee917f7e9/fortune.jpg",
|
|
42
|
+
metadata: {
|
|
43
|
+
width: 914,
|
|
44
|
+
height: 1200,
|
|
45
|
+
"mime-type": "image/jpeg",
|
|
46
|
+
"file-size": 179037,
|
|
47
|
+
"file-name": "fortune.jpg"
|
|
48
|
+
},
|
|
49
|
+
"cover-image-s3-key": "ace/2020-08/f71dd527-cbc6-4cc9-94c2-8feee917f7e9/fortune.jpg",
|
|
50
|
+
caption: "Some Politician"
|
|
51
|
+
},
|
|
52
|
+
section: [{ id: 11181, name: "Health", "parent-id": null, "tree-ids": [11181] }]
|
|
53
|
+
},
|
|
54
|
+
summary:
|
|
55
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer aliquam felis sed tellus mattis ultricies. Maecenas accumsan hendrerit turpis, a sollicitudin velit viverra nec. Praesent pretium, orci ac sodales volutpat, tellus orci rutrum metus.",
|
|
56
|
+
items: items
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const generateCollections = (count = 0) => {
|
|
61
|
+
let collections = [];
|
|
62
|
+
Array(count)
|
|
63
|
+
.fill(0)
|
|
64
|
+
.forEach(() => {
|
|
65
|
+
collections.push(generateCollection({ stories: 10 }));
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
type: "collection",
|
|
70
|
+
name: "News",
|
|
71
|
+
id: parseInt(Math.random() * 10 ** 10),
|
|
72
|
+
slug: "collection-slug",
|
|
73
|
+
template: "section",
|
|
74
|
+
metadata: {
|
|
75
|
+
"cover-image": {
|
|
76
|
+
"cover-image-url":
|
|
77
|
+
"http://d9zv4zsfqrm9s.cloudfront.net/ace/2017-12/c811b029-962f-4364-b376-ec1548d67494/earth.jpg",
|
|
78
|
+
"cover-image-metadata": {
|
|
79
|
+
width: 600,
|
|
80
|
+
height: 600,
|
|
81
|
+
"mime-type": "image/jpeg",
|
|
82
|
+
"focus-point": [355, 204]
|
|
83
|
+
},
|
|
84
|
+
"cover-image-s3-key": "vikatan/2019-01/f0b702ac-bfd1-4dd6-8e33-52cbb0bb3153/143203_thumb.jpg",
|
|
85
|
+
caption: "Some Politician"
|
|
86
|
+
},
|
|
87
|
+
section: [{ id: 11181, name: "Health", "parent-id": null, "tree-ids": [11181] }]
|
|
88
|
+
},
|
|
89
|
+
summary: "This is a collection concerned with politics",
|
|
90
|
+
items: collections
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const generateCollectionsWithStories = (count = 0) => {
|
|
95
|
+
let items = generateCollection({ stories: 12 });
|
|
96
|
+
let collec = generateCollections(2);
|
|
97
|
+
let collections = [];
|
|
98
|
+
let merged = items.items.concat(collec.items);
|
|
99
|
+
|
|
100
|
+
Array(count)
|
|
101
|
+
.fill(0)
|
|
102
|
+
.forEach(() => {
|
|
103
|
+
collections.push(generateCollection({ stories: 12 }));
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
type: "collection",
|
|
108
|
+
name: "News",
|
|
109
|
+
id: parseInt(Math.random() * 10 ** 10),
|
|
110
|
+
slug: "collection-slug",
|
|
111
|
+
template: "section",
|
|
112
|
+
metadata: {
|
|
113
|
+
"cover-image": {
|
|
114
|
+
"cover-image-url":
|
|
115
|
+
"http://d9zv4zsfqrm9s.cloudfront.net/ace/2017-12/c811b029-962f-4364-b376-ec1548d67494/earth.jpg",
|
|
116
|
+
"cover-image-metadata": {
|
|
117
|
+
width: 600,
|
|
118
|
+
height: 600,
|
|
119
|
+
"mime-type": "image/jpeg",
|
|
120
|
+
"focus-point": [355, 204]
|
|
121
|
+
},
|
|
122
|
+
"cover-image-s3-key": "vikatan/2019-01/f0b702ac-bfd1-4dd6-8e33-52cbb0bb3153/143203_thumb.jpg",
|
|
123
|
+
caption: "Some Politician"
|
|
124
|
+
},
|
|
125
|
+
section: [{ id: 11181, name: "Health", "parent-id": null, "tree-ids": [11181] }]
|
|
126
|
+
},
|
|
127
|
+
summary: "This is a collection concerned with politics",
|
|
128
|
+
items: merged
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export const generateSubMenu = () => {
|
|
133
|
+
return {
|
|
134
|
+
items: [
|
|
135
|
+
{
|
|
136
|
+
"tag-name": null,
|
|
137
|
+
"item-id": 22564,
|
|
138
|
+
rank: 5493,
|
|
139
|
+
title: "Link 1",
|
|
140
|
+
"item-type": "section",
|
|
141
|
+
"section-slug": "gurupeyarchi",
|
|
142
|
+
"tag-slug": null,
|
|
143
|
+
id: 5493,
|
|
144
|
+
"parent-id": null,
|
|
145
|
+
url: "https://vikatan-web.qtstage.io/section/gurupeyarchi",
|
|
146
|
+
"section-name": "அமெரிக்காவில்",
|
|
147
|
+
data: {
|
|
148
|
+
color: "#c7c7c7"
|
|
149
|
+
},
|
|
150
|
+
items: [
|
|
151
|
+
{
|
|
152
|
+
"tag-name": null,
|
|
153
|
+
"item-id": 22384,
|
|
154
|
+
rank: 5494,
|
|
155
|
+
title: "Link 2",
|
|
156
|
+
"item-type": "section",
|
|
157
|
+
"section-slug": "cinema",
|
|
158
|
+
"tag-slug": null,
|
|
159
|
+
id: 5494,
|
|
160
|
+
"parent-id": 5493,
|
|
161
|
+
url: "https://vikatan-web.qtstage.io/section/cinema",
|
|
162
|
+
"section-name": "அமெரிக்காவில்",
|
|
163
|
+
data: {
|
|
164
|
+
color: "#f7f7f7"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"tag-name": null,
|
|
169
|
+
"item-id": 23089,
|
|
170
|
+
rank: 5504,
|
|
171
|
+
title: "Child 1",
|
|
172
|
+
"item-type": "section",
|
|
173
|
+
"section-slug": "dry6feb2019",
|
|
174
|
+
"tag-slug": null,
|
|
175
|
+
id: 5504,
|
|
176
|
+
"parent-id": 5493,
|
|
177
|
+
url: "https://vikatan-web.qtstage.io/section/dry6feb2019",
|
|
178
|
+
"section-name": "அமெரிக்காவில்",
|
|
179
|
+
data: {
|
|
180
|
+
color: "#000000"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
export const authorData = {
|
|
189
|
+
slug: "parvathi-mohan-2",
|
|
190
|
+
name: "Lucy Douglas",
|
|
191
|
+
social: {
|
|
192
|
+
twitter: {
|
|
193
|
+
url: "https://twitter.com/Reena00659364",
|
|
194
|
+
handle: "Twitter"
|
|
195
|
+
},
|
|
196
|
+
youtube: {
|
|
197
|
+
url: "https://www.facebook.com/people/Reena-Singh/100005438855189",
|
|
198
|
+
handle: "Youtube"
|
|
199
|
+
},
|
|
200
|
+
facebook: {
|
|
201
|
+
url: "https://www.facebook.com/people/Reena-Singh/100005438855189",
|
|
202
|
+
handle: "Facebook"
|
|
203
|
+
},
|
|
204
|
+
linkedin: {
|
|
205
|
+
url: "https://www.facebook.com/people/Reena-Singh/100005438855189",
|
|
206
|
+
handle: "LinkedIn"
|
|
207
|
+
},
|
|
208
|
+
whatsapp: {
|
|
209
|
+
url: "https://www.facebook.com/people/Reena-Singh/100005438855189",
|
|
210
|
+
handle: "Whatsapp"
|
|
211
|
+
},
|
|
212
|
+
instagram: {
|
|
213
|
+
url: "https://www.facebook.com/people/Reena-Singh/100005438855189",
|
|
214
|
+
handle: "Instagram"
|
|
215
|
+
},
|
|
216
|
+
pinterest: {
|
|
217
|
+
url: "https://www.facebook.com/people/Reena-Singh/100005438855189",
|
|
218
|
+
handle: "Pinterest"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
bio:
|
|
222
|
+
"Lucy Douglas is a freelance journalist based in London. She has a particular interest in small business, startups and the founders behind them and, in a previous life, was an assistant-editor at Professional Beauty magazine, where she road-tested spas up and down the country and checked out the latest advances.",
|
|
223
|
+
id: 94985,
|
|
224
|
+
"avatar-url": "https://thumbor-stg.assettype.com/ace/2019-08/145ab200-429f-44ac-8618-00c6e4643e31/cat.jpeg",
|
|
225
|
+
"avatar-s3-key": "ace/2019-08/145ab200-429f-44ac-8618-00c6e4643e31/cat.jpeg",
|
|
226
|
+
"twitter-handle": "quintype_inc",
|
|
227
|
+
stats: {
|
|
228
|
+
contributions: null
|
|
229
|
+
},
|
|
230
|
+
metadata: {}
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
export const generateStoryElementData = (elementType) => {
|
|
234
|
+
const story = generateStory();
|
|
235
|
+
const storyElements = get(story, ["cards", "0", "story-elements"]);
|
|
236
|
+
return storyElements.find((element) => {
|
|
237
|
+
const { subtype, type } = element;
|
|
238
|
+
if (subtype) return subtype === elementType;
|
|
239
|
+
return type === elementType;
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
export const generateMagazineIssues = () => {
|
|
244
|
+
return [
|
|
245
|
+
{
|
|
246
|
+
collection: {
|
|
247
|
+
id: 106138,
|
|
248
|
+
name: "Manifique",
|
|
249
|
+
metadata: {
|
|
250
|
+
"cover-image": {
|
|
251
|
+
success: true,
|
|
252
|
+
url:
|
|
253
|
+
"https://stg-quintype-dropbox.s3-accelerate.amazonaws.com/ace.staging.quintype.com/2020-09-09/874/aleksandra_tanasienko_oQi_UdQDkzw_unsplash.jpg",
|
|
254
|
+
metadata: {
|
|
255
|
+
width: 4000,
|
|
256
|
+
height: 6000,
|
|
257
|
+
"mime-type": "image/jpeg",
|
|
258
|
+
"file-size": 2574353,
|
|
259
|
+
"file-name": "aleksandra-tanasienko-oQi_UdQDkzw-unsplash.jpg"
|
|
260
|
+
},
|
|
261
|
+
"extracted-data": {
|
|
262
|
+
artist: ""
|
|
263
|
+
},
|
|
264
|
+
attribution: "",
|
|
265
|
+
"cover-image-url":
|
|
266
|
+
"https://thumbor-stg.assettype.com/ace/2020-09/f20cecc2-2466-4e3d-8b04-f013d880a9d0/aleksandra_tanasienko_oQi_UdQDkzw_unsplash.jpg",
|
|
267
|
+
"cover-image-s3-key":
|
|
268
|
+
"ace/2020-09/f20cecc2-2466-4e3d-8b04-f013d880a9d0/aleksandra_tanasienko_oQi_UdQDkzw_unsplash.jpg"
|
|
269
|
+
},
|
|
270
|
+
entities: {
|
|
271
|
+
collectionEntities: {
|
|
272
|
+
magazine: [
|
|
273
|
+
{
|
|
274
|
+
id: 199563,
|
|
275
|
+
name: "New Magazine",
|
|
276
|
+
type: "magazine",
|
|
277
|
+
"entity-type-id": 382
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"collection-date": null,
|
|
284
|
+
slug: "manifique",
|
|
285
|
+
template: "collection",
|
|
286
|
+
"data-source": "manual",
|
|
287
|
+
"created-at": 1599639879798
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
collection: {
|
|
292
|
+
id: 106137,
|
|
293
|
+
name: "High Times",
|
|
294
|
+
metadata: {
|
|
295
|
+
"cover-image": {
|
|
296
|
+
success: true,
|
|
297
|
+
url:
|
|
298
|
+
"https://stg-quintype-dropbox.s3-accelerate.amazonaws.com/ace.staging.quintype.com/2020-09-28/294/da90b29ce035b5a3a134da39e94d654c.jpg",
|
|
299
|
+
metadata: {
|
|
300
|
+
width: 474,
|
|
301
|
+
height: 581,
|
|
302
|
+
"mime-type": "image/jpeg",
|
|
303
|
+
"file-size": 49921,
|
|
304
|
+
"file-name": "da90b29ce035b5a3a134da39e94d654c.jpg"
|
|
305
|
+
},
|
|
306
|
+
"extracted-data": {
|
|
307
|
+
artist: ""
|
|
308
|
+
},
|
|
309
|
+
attribution: "",
|
|
310
|
+
"cover-image-url":
|
|
311
|
+
"https://thumbor-stg.assettype.com/ace/2020-09/92f5453c-4477-40d3-9a44-3cf0c245b268/da90b29ce035b5a3a134da39e94d654c.jpg",
|
|
312
|
+
"cover-image-s3-key":
|
|
313
|
+
"ace/2020-09/92f5453c-4477-40d3-9a44-3cf0c245b268/da90b29ce035b5a3a134da39e94d654c.jpg"
|
|
314
|
+
},
|
|
315
|
+
entities: {
|
|
316
|
+
collectionEntities: {
|
|
317
|
+
magazine: [
|
|
318
|
+
{
|
|
319
|
+
id: 199563,
|
|
320
|
+
name: "New Magazine",
|
|
321
|
+
type: "magazine",
|
|
322
|
+
"entity-type-id": 382
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"collection-date": null,
|
|
329
|
+
slug: "high-times",
|
|
330
|
+
template: "collection",
|
|
331
|
+
"data-source": "manual",
|
|
332
|
+
"created-at": 1599639711992
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
collection: {
|
|
337
|
+
id: 106131,
|
|
338
|
+
name: "New Magazine Issue",
|
|
339
|
+
metadata: {
|
|
340
|
+
"cover-image": {
|
|
341
|
+
success: true,
|
|
342
|
+
url:
|
|
343
|
+
"https://stg-quintype-dropbox.s3-accelerate.amazonaws.com/ace.staging.quintype.com/2020-09-09/1200/alexis_zacharko_07rXq3YroVM_unsplash.jpg",
|
|
344
|
+
metadata: {
|
|
345
|
+
width: 3456,
|
|
346
|
+
height: 5184,
|
|
347
|
+
"mime-type": "image/jpeg",
|
|
348
|
+
"file-size": 3084612,
|
|
349
|
+
"file-name": "alexis-zacharko-07rXq3YroVM-unsplash.jpg",
|
|
350
|
+
"focus-point": [2154, 2269]
|
|
351
|
+
},
|
|
352
|
+
"extracted-data": {
|
|
353
|
+
artist: ""
|
|
354
|
+
},
|
|
355
|
+
attribution: "",
|
|
356
|
+
"cover-image-url":
|
|
357
|
+
"https://thumbor-stg.assettype.com/ace/2020-09/ed79b1ed-5d63-4ec1-8a4b-da87d8ed7edc/alexis_zacharko_07rXq3YroVM_unsplash.jpg",
|
|
358
|
+
"cover-image-s3-key":
|
|
359
|
+
"ace/2020-09/ed79b1ed-5d63-4ec1-8a4b-da87d8ed7edc/alexis_zacharko_07rXq3YroVM_unsplash.jpg"
|
|
360
|
+
},
|
|
361
|
+
entities: {
|
|
362
|
+
collectionEntities: {
|
|
363
|
+
magazine: [
|
|
364
|
+
{
|
|
365
|
+
id: 199563,
|
|
366
|
+
name: "New Magazine",
|
|
367
|
+
type: "magazine",
|
|
368
|
+
"entity-type-id": 382
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"collection-date": null,
|
|
375
|
+
slug: "new-magazine-issue",
|
|
376
|
+
template: "collection",
|
|
377
|
+
"data-source": "manual",
|
|
378
|
+
"created-at": 1599616208142
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
collection: {
|
|
383
|
+
id: 106089,
|
|
384
|
+
name: "First Magazine Collection",
|
|
385
|
+
metadata: {
|
|
386
|
+
"cover-image": {
|
|
387
|
+
"cover-image-s3-key": "ace/2020-07/3e3dc7df-8a1c-462d-a236-265d45c28651/evil_caat.jpg",
|
|
388
|
+
"cover-image-metadata": {
|
|
389
|
+
"mime-type": "image/jpeg",
|
|
390
|
+
"focus-point": [3444, 3222],
|
|
391
|
+
width: 6000,
|
|
392
|
+
"file-size": 10319729,
|
|
393
|
+
"file-name": "evil caat.jpg",
|
|
394
|
+
height: 4000
|
|
395
|
+
},
|
|
396
|
+
caption: null,
|
|
397
|
+
"cover-image-url":
|
|
398
|
+
"https://thumbor-stg.assettype.com/ace/2020-07/3e3dc7df-8a1c-462d-a236-265d45c28651/evil_caat.jpg"
|
|
399
|
+
},
|
|
400
|
+
entities: {
|
|
401
|
+
collectionEntities: {
|
|
402
|
+
magazine: [
|
|
403
|
+
{
|
|
404
|
+
id: 199563,
|
|
405
|
+
name: "New Magazine",
|
|
406
|
+
type: "magazine",
|
|
407
|
+
"entity-type-id": 382
|
|
408
|
+
}
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"collection-date": null,
|
|
414
|
+
slug: "first-magazine-collection",
|
|
415
|
+
template: "collection",
|
|
416
|
+
"data-source": "automated",
|
|
417
|
+
"created-at": 1599571645414
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
];
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
const reducer = () => ({ qt: { config: { "cdn-image": "thumbor-stg.assettype.com" } } });
|
|
424
|
+
export const generateStore = createStore(reducer);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const slotConfig = [{ type: "ad" }];
|
|
2
|
+
|
|
3
|
+
export const slotData = [
|
|
4
|
+
{
|
|
5
|
+
type: "widget",
|
|
6
|
+
layout: "widget",
|
|
7
|
+
layoutLabel: "Custom Widget",
|
|
8
|
+
pageType: "story",
|
|
9
|
+
widgetCode: "V2lkZ2V0JTIwMQ==",
|
|
10
|
+
config: {
|
|
11
|
+
customCode: "V2lkZ2V0JTIwMQ=="
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: "collection",
|
|
16
|
+
collectionSlug: "",
|
|
17
|
+
title: ""
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "widget",
|
|
21
|
+
layout: "widget",
|
|
22
|
+
layoutLabel: "Custom Widget",
|
|
23
|
+
pageType: "story",
|
|
24
|
+
widgetCode: "V2lkZ2V0JTIwMg==",
|
|
25
|
+
config: {
|
|
26
|
+
customCode: "V2lkZ2V0JTIwMg=="
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@import "../../../../node_modules/react-image-lightbox/style.css";
|
|
2
|
+
|
|
3
|
+
.arr--image-lightbox {
|
|
4
|
+
.icon.loader {
|
|
5
|
+
color: var(--arrow-c-brand1);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ril__toolbarRightSide {
|
|
9
|
+
flex-grow: 1;
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: flex-end;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ril__toolbar {
|
|
15
|
+
bottom: 0;
|
|
16
|
+
top: auto;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
img.ril__image {
|
|
20
|
+
width: unset;
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ril__zoomInButton {
|
|
25
|
+
position: relative;
|
|
26
|
+
border-right: 1px solid var(--arrow-c-mono7);
|
|
27
|
+
background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNyIgaGVpZ2h0PSIxNyIgdmlld0JveD0iMCAwIDE3IDE3Ij4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPHBhdGggZD0iTS0zLTRoMjR2MjRILTN6IiBvcGFjaXR5PSIuMzg0Ii8+CiAgICAgICAgPGcgZmlsbD0iI0ZGRiI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik04IDBoMXYxN0g4eiIvPgogICAgICAgICAgICA8cGF0aCBkPSJNMTcgOHYxSDBWOHoiLz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo=")
|
|
28
|
+
no-repeat center;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ril__zoomOutButton {
|
|
32
|
+
position: relative;
|
|
33
|
+
border-right: 1px solid var(--arrow-c-mono7);
|
|
34
|
+
background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNyIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMTcgMSI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9Im5vbnplcm8iPgogICAgICAgIDxwYXRoIGQ9Ik0tMy0xMmgyNHYyNEgtM3oiIG9wYWNpdHk9Ii4zODQiLz4KICAgICAgICA8cGF0aCBmaWxsPSIjRkZGIiBkPSJNMTcgMHYxSDBWMHoiLz4KICAgIDwvZz4KPC9zdmc+Cg==")
|
|
35
|
+
no-repeat center;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ril__zoomInButton,
|
|
39
|
+
.ril__zoomOutButton,
|
|
40
|
+
.ril__closeButton {
|
|
41
|
+
width: 48px;
|
|
42
|
+
height: 48px;
|
|
43
|
+
}
|
|
44
|
+
.ril__navButtons {
|
|
45
|
+
outline: none;
|
|
46
|
+
border-radius: 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React, { useState, Suspense, lazy } from "react";
|
|
2
|
+
import { useSelector } from "react-redux";
|
|
3
|
+
import get from "lodash.get";
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
|
+
import "./fullscreenimages.scss";
|
|
6
|
+
import { Loading } from "../../Svgs/Loading/loading";
|
|
7
|
+
|
|
8
|
+
const Lightbox = lazy(() => import("react-image-lightbox"));
|
|
9
|
+
|
|
10
|
+
export const FullScreenImages = ({ imageSlug = "", template, element = {}, props }) => {
|
|
11
|
+
const cdnImage = useSelector((state) => get(state, ["qt", "config", "cdn-image"]));
|
|
12
|
+
let [photoIndex, handleImage] = useState(0);
|
|
13
|
+
let [isOpen, handleOpen] = useState(false);
|
|
14
|
+
const deviceWidth = get(global, ["innerWidth"], 0);
|
|
15
|
+
|
|
16
|
+
let imageUrlList = [];
|
|
17
|
+
if (!imageSlug) {
|
|
18
|
+
imageUrlList = get(element, ["story-elements"], []).map(
|
|
19
|
+
(image) => `//${cdnImage}/${image["image-s3-key"]}?w=${deviceWidth}`
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const onClickHandler = (index) => {
|
|
24
|
+
handleOpen(true);
|
|
25
|
+
handleImage(index);
|
|
26
|
+
};
|
|
27
|
+
const onClickKey = imageSlug ? "onClick" : "onClickHandler";
|
|
28
|
+
|
|
29
|
+
const imageUrlListLength = imageUrlList.length;
|
|
30
|
+
const onMoveNext = (imageUrlListLength) => {
|
|
31
|
+
const next = (photoIndex + 1) % imageUrlListLength;
|
|
32
|
+
handleImage(next);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const onMovePrev = (imageUrlListLength) => {
|
|
36
|
+
const prev = (photoIndex + imageUrlListLength - 1) % imageUrlListLength;
|
|
37
|
+
handleImage(prev);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const onClose = () => {
|
|
41
|
+
handleImage(0);
|
|
42
|
+
handleOpen(false);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const lightboxProps = imageSlug
|
|
46
|
+
? {
|
|
47
|
+
mainSrc: `//${cdnImage}/${imageSlug}?w=${deviceWidth}`
|
|
48
|
+
}
|
|
49
|
+
: {
|
|
50
|
+
mainSrc: imageUrlList[photoIndex],
|
|
51
|
+
nextSrc: imageUrlList[(photoIndex + 1) % imageUrlListLength],
|
|
52
|
+
prevSrc: imageUrlList[(photoIndex + imageUrlListLength - 1) % imageUrlListLength],
|
|
53
|
+
onMoveNextRequest: () => onMoveNext(imageUrlListLength),
|
|
54
|
+
onMovePrevRequest: () => onMovePrev(imageUrlListLength)
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const LoadingScreen = () => {
|
|
58
|
+
return (
|
|
59
|
+
<div>
|
|
60
|
+
<Loading />
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div>
|
|
67
|
+
{React.createElement(template, {
|
|
68
|
+
[onClickKey]: onClickHandler,
|
|
69
|
+
...props
|
|
70
|
+
})}
|
|
71
|
+
{isOpen ? (
|
|
72
|
+
<Suspense fallback={<LoadingScreen />}>
|
|
73
|
+
<Lightbox wrapperClassName="arr--image-lightbox" onCloseRequest={onClose} {...lightboxProps} />
|
|
74
|
+
</Suspense>
|
|
75
|
+
) : null}
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
FullScreenImages.propTypes = {
|
|
80
|
+
imageSlug: PropTypes.string,
|
|
81
|
+
template: PropTypes.func,
|
|
82
|
+
element: PropTypes.shape({
|
|
83
|
+
"story-elements": PropTypes.array
|
|
84
|
+
}),
|
|
85
|
+
props: PropTypes.object
|
|
86
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Key Events
|
|
2
|
+
|
|
3
|
+
Key events is used to represent the event templates for a live blog story.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```jsx
|
|
8
|
+
import { KeyEvents } from "@quintype/arrow";
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Use as a component
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
|
|
15
|
+
const config = {
|
|
16
|
+
theme: #333333;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
<KeyEvents config={config} />
|
|
20
|
+
|
|
21
|
+
```
|