@quintype/arrow 3.15.1-perf.4 → 3.15.1-perf.8
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/cjs/index.js +14589 -0
- package/esm/components/Atoms/AdPlaceholder/ads.m.css +13 -0
- package/esm/components/Atoms/AdPlaceholder/index.js +28 -0
- package/esm/components/Atoms/Author/README.md +19 -0
- package/esm/components/Atoms/Author/author.m.css +65 -0
- package/esm/components/Atoms/Author/index.js +109 -0
- package/esm/components/Atoms/Author/stories.js +28 -0
- package/esm/components/Atoms/AuthorCard/README.md +47 -0
- package/esm/components/Atoms/AuthorCard/author-card.m.css +174 -0
- package/esm/components/Atoms/AuthorCard/author-card.test.js +93 -0
- package/esm/components/Atoms/AuthorCard/index.js +133 -0
- package/esm/components/Atoms/AuthorCard/stories.js +68 -0
- package/esm/components/Atoms/AuthorImage/README.md +31 -0
- package/esm/components/Atoms/AuthorImage/author-image.m.css +53 -0
- package/esm/components/Atoms/AuthorImage/index.js +69 -0
- package/esm/components/Atoms/AuthorImage/stories.js +26 -0
- package/esm/components/Atoms/AuthorWithTimestamp/README.md +12 -0
- package/esm/components/Atoms/AuthorWithTimestamp/author-with-timestamp.m.css +42 -0
- package/esm/components/Atoms/AuthorWithTimestamp/index.js +95 -0
- package/esm/components/Atoms/AuthorWithTimestamp/stories.js +22 -0
- package/esm/components/Atoms/BulletPoint/README.md +9 -0
- package/esm/components/Atoms/BulletPoint/bullet-point.m.css +14 -0
- package/esm/components/Atoms/BulletPoint/index.js +27 -0
- package/esm/components/Atoms/BulletPoint/stories.js +9 -0
- package/esm/components/Atoms/CaptionAttribution/README.md +15 -0
- package/esm/components/Atoms/CaptionAttribution/caption-attribution.m.css +40 -0
- package/esm/components/Atoms/CaptionAttribution/caption-attribution.test.js +50 -0
- package/esm/components/Atoms/CaptionAttribution/index.js +66 -0
- package/esm/components/Atoms/CaptionAttribution/stories.js +47 -0
- package/esm/components/Atoms/CollectionName/README.md +11 -0
- package/esm/components/Atoms/CollectionName/collection-name.m.css +94 -0
- package/esm/components/Atoms/CollectionName/index.js +152 -0
- package/esm/components/Atoms/CollectionName/stories.js +41 -0
- package/esm/components/Atoms/Divider/__snapshots__/divider.test.js.snap +18 -0
- package/esm/components/Atoms/Divider/divider.m.css +6 -0
- package/esm/components/Atoms/Divider/divider.test.js +9 -0
- package/esm/components/Atoms/Divider/index.js +34 -0
- package/esm/components/Atoms/Dot/dot.js +39 -0
- package/esm/components/Atoms/Dot/dot.m.css +6 -0
- package/esm/components/Atoms/ExtendedLoadMore/README.md +9 -0
- package/esm/components/Atoms/ExtendedLoadMore/__snapshots__/extended-load-more.test.js.snap +11 -0
- package/esm/components/Atoms/ExtendedLoadMore/extended-load-more.test.js +14 -0
- package/esm/components/Atoms/ExtendedLoadMore/index.js +183 -0
- package/esm/components/Atoms/FallbackImage/fallback.m.css +33 -0
- package/esm/components/Atoms/FallbackImage/index.js +29 -0
- package/esm/components/Atoms/Headline/README.md +7 -0
- package/esm/components/Atoms/Headline/headline.m.css +26 -0
- package/esm/components/Atoms/Headline/index.js +97 -0
- package/esm/components/Atoms/Headline/stories.js +39 -0
- package/esm/components/Atoms/HeroImage/README.md +13 -0
- package/esm/components/Atoms/HeroImage/hero-image.m.css +72 -0
- package/esm/components/Atoms/HeroImage/index.js +175 -0
- package/esm/components/Atoms/HeroImage/stories.js +23 -0
- package/esm/components/Atoms/Hyperlink/hyperlink.m.css +10 -0
- package/esm/components/Atoms/Hyperlink/index.js +20 -0
- package/esm/components/Atoms/LoadMoreTarget/index.js +24 -0
- package/esm/components/Atoms/Loadmore/README.md +0 -0
- package/esm/components/Atoms/Loadmore/__snapshots__/load-more.test.js.snap +25 -0
- package/esm/components/Atoms/Loadmore/index.js +61 -0
- package/esm/components/Atoms/Loadmore/load-more.m.css +23 -0
- package/esm/components/Atoms/Loadmore/load-more.test.js +26 -0
- package/esm/components/Atoms/Loadmore/stories.js +17 -0
- package/esm/components/Atoms/MagazineCoverImage/README.md +21 -0
- package/esm/components/Atoms/MagazineCoverImage/index.js +58 -0
- package/esm/components/Atoms/MagazineCoverImage/magazine-cover-image.m.css +24 -0
- package/esm/components/Atoms/MagazineCoverImage/stories.js +22 -0
- package/esm/components/Atoms/PremiumStoryIcon/index.js +54 -0
- package/esm/components/Atoms/PublishDetail/README.md +15 -0
- package/esm/components/Atoms/PublishDetail/index.js +104 -0
- package/esm/components/Atoms/PublishDetail/publish-details.m.css +47 -0
- package/esm/components/Atoms/PublishDetail/publish-details.test.js +38 -0
- package/esm/components/Atoms/PublishDetail/stories.js +20 -0
- package/esm/components/Atoms/ReadTime/README.md +13 -0
- package/esm/components/Atoms/ReadTime/index.js +46 -0
- package/esm/components/Atoms/ReadTime/read-time.m.css +25 -0
- package/esm/components/Atoms/ReadTime/read-time.test.js +29 -0
- package/esm/components/Atoms/ReadTime/stories.js +15 -0
- package/esm/components/Atoms/ScrollSnap/SliderArrow/index.js +64 -0
- package/esm/components/Atoms/ScrollSnap/SliderArrow/slider-arrow.m.css +45 -0
- package/esm/components/Atoms/ScrollSnap/SliderIndicator/index.js +53 -0
- package/esm/components/Atoms/ScrollSnap/SliderIndicator/slider-indicator.m.css +71 -0
- package/esm/components/Atoms/ScrollSnap/index.js +165 -0
- package/esm/components/Atoms/ScrollSnap/scroll-snap.m.css +27 -0
- package/esm/components/Atoms/SectionTag/README.md +11 -0
- package/esm/components/Atoms/SectionTag/index.js +79 -0
- package/esm/components/Atoms/SectionTag/section.m.css +53 -0
- package/esm/components/Atoms/SectionTag/stories.js +22 -0
- package/esm/components/Atoms/SocialSharePopup/README.md +25 -0
- package/esm/components/Atoms/SocialSharePopup/__snapshots__/social-share-popup.test.js.snap +653 -0
- package/esm/components/Atoms/SocialSharePopup/index.js +100 -0
- package/esm/components/Atoms/SocialSharePopup/social-share-popup.m.css +109 -0
- package/esm/components/Atoms/SocialSharePopup/social-share-popup.test.js +87 -0
- package/esm/components/Atoms/SocialSharePopup/stories.js +18 -0
- package/esm/components/Atoms/StoryElements/AlsoRead/README.md +49 -0
- package/esm/components/Atoms/StoryElements/AlsoRead/also-read.m.css +135 -0
- package/esm/components/Atoms/StoryElements/AlsoRead/also-read.test.js +97 -0
- package/esm/components/Atoms/StoryElements/AlsoRead/index.js +156 -0
- package/esm/components/Atoms/StoryElements/AlsoRead/stories.js +47 -0
- package/esm/components/Atoms/StoryElements/Attachment/README.md +21 -0
- package/esm/components/Atoms/StoryElements/Attachment/__snapshots__/attachment.test.js.snap +47 -0
- package/esm/components/Atoms/StoryElements/Attachment/attachment.m.css +125 -0
- package/esm/components/Atoms/StoryElements/Attachment/attachment.test.js +66 -0
- package/esm/components/Atoms/StoryElements/Attachment/index.js +86 -0
- package/esm/components/Atoms/StoryElements/Attachment/stories.js +62 -0
- package/esm/components/Atoms/StoryElements/BigFact/README.md +9 -0
- package/esm/components/Atoms/StoryElements/BigFact/big-fact.m.css +41 -0
- package/esm/components/Atoms/StoryElements/BigFact/big-fact.test.js +28 -0
- package/esm/components/Atoms/StoryElements/BigFact/index.js +56 -0
- package/esm/components/Atoms/StoryElements/BigFact/stories.js +11 -0
- package/esm/components/Atoms/StoryElements/BlockQuote/README.md +49 -0
- package/esm/components/Atoms/StoryElements/BlockQuote/Svg/curve.js +32 -0
- package/esm/components/Atoms/StoryElements/BlockQuote/Svg/edge.js +32 -0
- package/esm/components/Atoms/StoryElements/BlockQuote/Svg/icon.m.css +4 -0
- package/esm/components/Atoms/StoryElements/BlockQuote/block-quote.m.css +161 -0
- package/esm/components/Atoms/StoryElements/BlockQuote/block-quote.test.js +71 -0
- package/esm/components/Atoms/StoryElements/BlockQuote/index.js +154 -0
- package/esm/components/Atoms/StoryElements/BlockQuote/stories.js +42 -0
- package/esm/components/Atoms/StoryElements/Blurb/README.md +43 -0
- package/esm/components/Atoms/StoryElements/Blurb/blurb.m.css +55 -0
- package/esm/components/Atoms/StoryElements/Blurb/blurb.test.js +76 -0
- package/esm/components/Atoms/StoryElements/Blurb/index.js +96 -0
- package/esm/components/Atoms/StoryElements/Blurb/stories.js +38 -0
- package/esm/components/Atoms/StoryElements/Image/README.md +13 -0
- package/esm/components/Atoms/StoryElements/Image/image.m.css +21 -0
- package/esm/components/Atoms/StoryElements/Image/image.test.js +19 -0
- package/esm/components/Atoms/StoryElements/Image/index.js +87 -0
- package/esm/components/Atoms/StoryElements/Image/stories.js +28 -0
- package/esm/components/Atoms/StoryElements/ImageSlideshow/README.md +13 -0
- package/esm/components/Atoms/StoryElements/ImageSlideshow/image-slideshow.m.css +49 -0
- package/esm/components/Atoms/StoryElements/ImageSlideshow/index.js +82 -0
- package/esm/components/Atoms/StoryElements/ImageSlideshow/stories.js +31 -0
- package/esm/components/Atoms/StoryElements/QuestionAnswer/README.md +56 -0
- package/esm/components/Atoms/StoryElements/QuestionAnswer/index.js +176 -0
- package/esm/components/Atoms/StoryElements/QuestionAnswer/question-answer.m.css +106 -0
- package/esm/components/Atoms/StoryElements/QuestionAnswer/question-answer.test.js +130 -0
- package/esm/components/Atoms/StoryElements/QuestionAnswer/stories.js +102 -0
- package/esm/components/Atoms/StoryElements/Quote/README.md +41 -0
- package/esm/components/Atoms/StoryElements/Quote/index.js +87 -0
- package/esm/components/Atoms/StoryElements/Quote/quote.m.css +111 -0
- package/esm/components/Atoms/StoryElements/Quote/quote.test.js +61 -0
- package/esm/components/Atoms/StoryElements/Quote/stories.js +39 -0
- package/esm/components/Atoms/StoryElements/Reference/README.md +9 -0
- package/esm/components/Atoms/StoryElements/Reference/index.js +80 -0
- package/esm/components/Atoms/StoryElements/Reference/reference.m.css +42 -0
- package/esm/components/Atoms/StoryElements/Reference/reference.test.js +38 -0
- package/esm/components/Atoms/StoryElements/Reference/stories.js +16 -0
- package/esm/components/Atoms/StoryElements/StoryElement/README.md +10 -0
- package/esm/components/Atoms/StoryElements/StoryElement/index.js +30 -0
- package/esm/components/Atoms/StoryElements/StoryElement/stories.js +17 -0
- package/esm/components/Atoms/StoryElements/StoryElement/storyelement.test.js +14 -0
- package/esm/components/Atoms/StoryElements/Summary/README.md +56 -0
- package/esm/components/Atoms/StoryElements/Summary/index.js +98 -0
- package/esm/components/Atoms/StoryElements/Summary/stories.js +41 -0
- package/esm/components/Atoms/StoryElements/Summary/summary.m.css +121 -0
- package/esm/components/Atoms/StoryElements/Summary/summary.test.js +83 -0
- package/esm/components/Atoms/StoryElements/Text/README.md +32 -0
- package/esm/components/Atoms/StoryElements/Text/index.js +74 -0
- package/esm/components/Atoms/StoryElements/Text/stories.js +56 -0
- package/esm/components/Atoms/StoryElements/Text/text.m.css +78 -0
- package/esm/components/Atoms/StoryElements/Text/text.test.js +70 -0
- package/esm/components/Atoms/StoryElements/Video/README.md +9 -0
- package/esm/components/Atoms/StoryElements/Video/index.js +37 -0
- package/esm/components/Atoms/StoryElements/Video/stories.js +29 -0
- package/esm/components/Atoms/StoryElements/Video/video.m.css +89 -0
- package/esm/components/Atoms/StoryElements/Video/video.test.js +14 -0
- package/esm/components/Atoms/StoryElements/imageGallery/README.md +18 -0
- package/esm/components/Atoms/StoryElements/imageGallery/image-gallery.m.css +52 -0
- package/esm/components/Atoms/StoryElements/imageGallery/image-gallery.test.js +17 -0
- package/esm/components/Atoms/StoryElements/imageGallery/index.js +112 -0
- package/esm/components/Atoms/StoryElements/imageGallery/stories.js +22 -0
- package/esm/components/Atoms/StoryElements/withElementWrapper.js +21 -0
- package/esm/components/Atoms/StoryElements/withElementWrapper.test.js +49 -0
- package/esm/components/Atoms/StoryHeadline/index.js +57 -0
- package/esm/components/Atoms/StoryHeadline/story-headline.m.css +36 -0
- package/esm/components/Atoms/StoryTags/README.md +9 -0
- package/esm/components/Atoms/StoryTags/index.js +47 -0
- package/esm/components/Atoms/StoryTags/stories.js +23 -0
- package/esm/components/Atoms/StoryTags/story-tags.test.js +16 -0
- package/esm/components/Atoms/StoryTags/tags.m.css +34 -0
- package/esm/components/Atoms/Subheadline/README.md +17 -0
- package/esm/components/Atoms/Subheadline/index.js +52 -0
- package/esm/components/Atoms/Subheadline/stories.js +21 -0
- package/esm/components/Atoms/Subheadline/subheadline.m.css +17 -0
- package/esm/components/Atoms/TimeStamp/README.md +9 -0
- package/esm/components/Atoms/TimeStamp/index.js +39 -0
- package/esm/components/Atoms/TimeStamp/stories.js +11 -0
- package/esm/components/Atoms/TimeStamp/timestamp.m.css +22 -0
- package/esm/components/Fixture/config.json +2703 -0
- package/esm/components/Fixture/dummy-collection.js +2547 -0
- package/esm/components/Fixture/dummyStory.js +2089 -0
- package/esm/components/Fixture/index.js +433 -0
- package/esm/components/Fixture/slot-config.js +26 -0
- package/esm/components/Molecules/FullScreenImages/fullscreenimages.scss +56 -0
- package/esm/components/Molecules/FullScreenImages/index.js +119 -0
- package/esm/components/Molecules/KeyEvents/README.md +21 -0
- package/esm/components/Molecules/KeyEvents/index.js +152 -0
- package/esm/components/Molecules/KeyEvents/key-events.m.css +89 -0
- package/esm/components/Molecules/KeyEvents/stories.js +25 -0
- package/esm/components/Molecules/PageIntroductionCard/README.md +25 -0
- package/esm/components/Molecules/PageIntroductionCard/index.js +77 -0
- package/esm/components/Molecules/PageIntroductionCard/page-intro-card.m.css +61 -0
- package/esm/components/Molecules/PageIntroductionCard/stories.js +17 -0
- package/esm/components/Molecules/PortraitStoryCard/README.md +10 -0
- package/esm/components/Molecules/PortraitStoryCard/index.js +52 -0
- package/esm/components/Molecules/PortraitStoryCard/portrait-story-card.m.css +38 -0
- package/esm/components/Molecules/PortraitStoryCard/stories.js +24 -0
- package/esm/components/Molecules/SliderHorizontalCard/README.md +14 -0
- package/esm/components/Molecules/SliderHorizontalCard/index.js +69 -0
- package/esm/components/Molecules/SliderHorizontalCard/slider-horizontal-card.m.css +42 -0
- package/esm/components/Molecules/SliderHorizontalCard/stories.js +27 -0
- package/esm/components/Molecules/SocialShareTemplate/README.md +118 -0
- package/esm/components/Molecules/SocialShareTemplate/__snapshots__/social-share-template.test.js.snap +738 -0
- package/esm/components/Molecules/SocialShareTemplate/index.js +164 -0
- package/esm/components/Molecules/SocialShareTemplate/social-share-data.js +90 -0
- package/esm/components/Molecules/SocialShareTemplate/social-share-template.m.css +174 -0
- package/esm/components/Molecules/SocialShareTemplate/social-share-template.test.js +108 -0
- package/esm/components/Molecules/SocialShareTemplate/stories.js +38 -0
- package/esm/components/Molecules/StoryCard/README.md +75 -0
- package/esm/components/Molecules/StoryCard/READMEBGIMAGE.md +25 -0
- package/esm/components/Molecules/StoryCard/READMEBORDER.md +61 -0
- package/esm/components/Molecules/StoryCard/index.js +200 -0
- package/esm/components/Molecules/StoryCard/stories.js +274 -0
- package/esm/components/Molecules/StoryCard/storycard.m.css +158 -0
- package/esm/components/Molecules/StoryCardWithBulletPoint/README.md +9 -0
- package/esm/components/Molecules/StoryCardWithBulletPoint/index.js +43 -0
- package/esm/components/Molecules/StoryCardWithBulletPoint/stories.js +28 -0
- package/esm/components/Molecules/StoryCardWithBulletPoint/story-card-with-bullet-point.m.css +7 -0
- package/esm/components/Molecules/StoryElementCard/README.md +9 -0
- package/esm/components/Molecules/StoryElementCard/index.js +494 -0
- package/esm/components/Molecules/StoryElementCard/stories.js +25 -0
- package/esm/components/Molecules/StoryElementCard/story-element-card.m.css +78 -0
- package/esm/components/Molecules/StorycardContent/README.md +34 -0
- package/esm/components/Molecules/StorycardContent/index.js +86 -0
- package/esm/components/Molecules/StorycardContent/stories.js +45 -0
- package/esm/components/Molecules/StorycardContent/storycardContent.m.css +21 -0
- package/esm/components/Rows/AlternateCollectionFilter/README.md +38 -0
- package/esm/components/Rows/AlternateCollectionFilter/alternate-collection-filter.m.css +254 -0
- package/esm/components/Rows/AlternateCollectionFilter/index.js +288 -0
- package/esm/components/Rows/AlternateCollectionFilter/stories.js +68 -0
- package/esm/components/Rows/AsideCollection/README.md +27 -0
- package/esm/components/Rows/AsideCollection/aside-collection.m.css +103 -0
- package/esm/components/Rows/AsideCollection/aside-collection.test.js +32 -0
- package/esm/components/Rows/AsideCollection/index.js +253 -0
- package/esm/components/Rows/AsideCollection/stories.js +48 -0
- package/esm/components/Rows/AstrologyCollection/README.md +40 -0
- package/esm/components/Rows/AstrologyCollection/astrology-collection.m.css +165 -0
- package/esm/components/Rows/AstrologyCollection/index.js +272 -0
- package/esm/components/Rows/AstrologyCollection/stories.js +61 -0
- package/esm/components/Rows/AuthorIntroductionCard/README.md +43 -0
- package/esm/components/Rows/AuthorIntroductionCard/author-intro.m.css +278 -0
- package/esm/components/Rows/AuthorIntroductionCard/author-intro.test.js +148 -0
- package/esm/components/Rows/AuthorIntroductionCard/index.js +157 -0
- package/esm/components/Rows/AuthorIntroductionCard/stories.js +46 -0
- package/esm/components/Rows/AuthorsList/README.md +24 -0
- package/esm/components/Rows/AuthorsList/author-list.test.js +66 -0
- package/esm/components/Rows/AuthorsList/authors-list.m.css +22 -0
- package/esm/components/Rows/AuthorsList/index.js +64 -0
- package/esm/components/Rows/AuthorsList/stories.js +62 -0
- package/esm/components/Rows/CollectionFilter/README.md +39 -0
- package/esm/components/Rows/CollectionFilter/collection-filter.m.css +213 -0
- package/esm/components/Rows/CollectionFilter/index.js +366 -0
- package/esm/components/Rows/CollectionFilter/stories.js +78 -0
- package/esm/components/Rows/ElevenStories/11-stories.m.css +85 -0
- package/esm/components/Rows/ElevenStories/README.md +39 -0
- package/esm/components/Rows/ElevenStories/index.js +418 -0
- package/esm/components/Rows/ElevenStories/stories.js +71 -0
- package/esm/components/Rows/FourColFiveStories/README.md +37 -0
- package/esm/components/Rows/FourColFiveStories/four-col-five-stories.m.css +112 -0
- package/{atoms/ExtendedLoadMore/index-b5754c5d.js → esm/components/Rows/FourColFiveStories/index.js} +54 -70
- package/esm/components/Rows/FourColFiveStories/stories.js +67 -0
- package/esm/components/Rows/FourColGrid/README.md +39 -0
- package/esm/components/Rows/FourColGrid/four-col.m.css +50 -0
- package/{atoms/ExtendedLoadMore/index-37a9ccff.js → esm/components/Rows/FourColGrid/index.js} +50 -65
- package/esm/components/Rows/FourColGrid/stories.js +68 -0
- package/esm/components/Rows/FourColPortraitStories/README.md +38 -0
- package/esm/components/Rows/FourColPortraitStories/four-col-portrait-stories.m.css +45 -0
- package/esm/components/Rows/FourColPortraitStories/index.js +153 -0
- package/esm/components/Rows/FourColPortraitStories/stories.js +68 -0
- package/esm/components/Rows/FourColSixteenStories/README.md +35 -0
- package/esm/components/Rows/FourColSixteenStories/four-col-sixteen-stories.m.css +141 -0
- package/esm/components/Rows/FourColSixteenStories/index.js +157 -0
- package/esm/components/Rows/FourColSixteenStories/stories.js +43 -0
- package/esm/components/Rows/FourColTwelveStory/README.md +39 -0
- package/esm/components/Rows/FourColTwelveStory/four-col-twelve-story.m.css +71 -0
- package/esm/components/Rows/FourColTwelveStory/index.js +219 -0
- package/esm/components/Rows/FourColTwelveStory/stories.js +107 -0
- package/esm/components/Rows/FourStorySlider/README.md +45 -0
- package/esm/components/Rows/FourStorySlider/four-story-slider.m.css +78 -0
- package/esm/components/Rows/FourStorySlider/index.js +145 -0
- package/esm/components/Rows/FourStorySlider/stories.js +125 -0
- package/esm/components/Rows/FourStorySliderPortrait/README.md +45 -0
- package/esm/components/Rows/FourStorySliderPortrait/four-story-slider-portrait.m.css +221 -0
- package/esm/components/Rows/FourStorySliderPortrait/index.js +148 -0
- package/esm/components/Rows/FourStorySliderPortrait/stories.js +125 -0
- package/esm/components/Rows/FourTabbedBigStorySlider/README.md +39 -0
- package/esm/components/Rows/FourTabbedBigStorySlider/four-tabbed-big-story-slider.m.css +265 -0
- package/esm/components/Rows/FourTabbedBigStorySlider/index.js +221 -0
- package/esm/components/Rows/FourTabbedBigStorySlider/stories.js +59 -0
- package/esm/components/Rows/FullScreenSlider/README.md +46 -0
- package/esm/components/Rows/FullScreenSlider/full-screen-slider.m.css +155 -0
- package/esm/components/Rows/FullScreenSlider/index.js +140 -0
- package/esm/components/Rows/FullScreenSlider/stories.js +113 -0
- package/esm/components/Rows/HalfScreenSlider/README.md +43 -0
- package/esm/components/Rows/HalfScreenSlider/half-screen-slider.m.css +80 -0
- package/esm/components/Rows/HalfScreenSlider/index.js +124 -0
- package/esm/components/Rows/HalfScreenSlider/stories.js +118 -0
- package/esm/components/Rows/ListComponent/README.md +48 -0
- package/esm/components/Rows/ListComponent/index.js +176 -0
- package/esm/components/Rows/ListComponent/list-component.m.css +65 -0
- package/esm/components/Rows/ListComponent/stories.js +65 -0
- package/esm/components/Rows/Listicles/README.md +32 -0
- package/esm/components/Rows/Listicles/index.js +240 -0
- package/esm/components/Rows/Listicles/listicles.m.css +149 -0
- package/esm/components/Rows/Listicles/stories.js +53 -0
- package/esm/components/Rows/MagazineEditions/README.md +21 -0
- package/esm/components/Rows/MagazineEditions/index.js +123 -0
- package/esm/components/Rows/MagazineEditions/magazine-editions.m.css +50 -0
- package/esm/components/Rows/MagazineEditions/magazine-editions.test.js +30 -0
- package/esm/components/Rows/MagazineEditions/stories.js +41 -0
- package/esm/components/Rows/MagazineHeaderCard/README.md +21 -0
- package/esm/components/Rows/MagazineHeaderCard/index.js +117 -0
- package/esm/components/Rows/MagazineHeaderCard/magazine-cards.m.css +106 -0
- package/esm/components/Rows/MagazineHeaderCard/stories.js +34 -0
- package/esm/components/Rows/MagazineWidget/README.md +21 -0
- package/esm/components/Rows/MagazineWidget/index.js +177 -0
- package/esm/components/Rows/MagazineWidget/stories.js +40 -0
- package/esm/components/Rows/OneColStoryList/README.md +48 -0
- package/{atoms/ExtendedLoadMore/index-bbaf526e.js → esm/components/Rows/OneColStoryList/index.js} +69 -80
- package/esm/components/Rows/OneColStoryList/one-col-story-list.m.css +81 -0
- package/esm/components/Rows/OneColStoryList/stories.js +78 -0
- package/esm/components/Rows/OpinionCollection/README.md +36 -0
- package/esm/components/Rows/OpinionCollection/index.js +205 -0
- package/esm/components/Rows/OpinionCollection/opinion-collection.m.css +226 -0
- package/esm/components/Rows/OpinionCollection/stories.js +92 -0
- package/esm/components/Rows/SixColSixStories/README.md +37 -0
- package/{atoms/ExtendedLoadMore/index-cfb262ef.js → esm/components/Rows/SixColSixStories/index.js} +56 -69
- package/esm/components/Rows/SixColSixStories/six-col-six-stories.m.css +75 -0
- package/esm/components/Rows/SixColSixStories/stories.js +74 -0
- package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/README.md +19 -0
- package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/__snapshots__/listicle-story.test.js.snap +841 -0
- package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/index.js +330 -0
- package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/listicle-story.m.css +249 -0
- package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/listicle-story.test.js +46 -0
- package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/stories.js +119 -0
- package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/README.md +25 -0
- package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/index.js +97 -0
- package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/live-blog.m.css +326 -0
- package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/stories.js +118 -0
- package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/templates.js +418 -0
- package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/index.js +294 -0
- package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/photo-story.test.js +163 -0
- package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/photo.m.css +175 -0
- package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/stories.js +124 -0
- package/esm/components/Rows/StoryTemplates/TextStoryTemplates/README.md +49 -0
- package/esm/components/Rows/StoryTemplates/TextStoryTemplates/index.js +100 -0
- package/esm/components/Rows/StoryTemplates/TextStoryTemplates/stories.js +124 -0
- package/esm/components/Rows/StoryTemplates/TextStoryTemplates/templates.js +285 -0
- package/esm/components/Rows/StoryTemplates/TextStoryTemplates/text-story.m.css +449 -0
- package/esm/components/Rows/StoryTemplates/TextStoryTemplates/text-story.test.js +242 -0
- package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/README.md +31 -0
- package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/index.js +239 -0
- package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/stories.js +214 -0
- package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/video-story.m.css +195 -0
- package/esm/components/Rows/TagIntroductionCard/README.md +11 -0
- package/esm/components/Rows/TagIntroductionCard/index.js +45 -0
- package/esm/components/Rows/TagIntroductionCard/stories.js +20 -0
- package/esm/components/Rows/TagIntroductionCard/tag-intro-card.module.css +25 -0
- package/esm/components/Rows/ThreeColFlexStories/README.md +38 -0
- package/{atoms/ExtendedLoadMore/index-57dd4870.js → esm/components/Rows/ThreeColFlexStories/index.js} +70 -82
- package/esm/components/Rows/ThreeColFlexStories/stories.js +74 -0
- package/esm/components/Rows/ThreeColFlexStories/three-col-flex-stories.m.css +60 -0
- package/esm/components/Rows/ThreeColFourteenStory/README.md +28 -0
- package/esm/components/Rows/ThreeColFourteenStory/index.js +154 -0
- package/esm/components/Rows/ThreeColFourteenStory/stories.js +65 -0
- package/esm/components/Rows/ThreeColFourteenStory/three-col-fourteen-story.m.css +51 -0
- package/esm/components/Rows/ThreeColGrid/README.md +36 -0
- package/{atoms/ExtendedLoadMore/index-446679c8.js → esm/components/Rows/ThreeColGrid/index.js} +54 -69
- package/esm/components/Rows/ThreeColGrid/stories.js +78 -0
- package/esm/components/Rows/ThreeColGrid/three-col.m.css +43 -0
- package/esm/components/Rows/ThreeColSevenStory/README.md +36 -0
- package/esm/components/Rows/ThreeColSevenStory/index.js +201 -0
- package/esm/components/Rows/ThreeColSevenStory/stories.js +74 -0
- package/esm/components/Rows/ThreeColSevenStory/three-col-seven-story.m.css +44 -0
- package/esm/components/Rows/ThreeColSixStories/README.md +40 -0
- package/esm/components/Rows/ThreeColSixStories/index.js +183 -0
- package/esm/components/Rows/ThreeColSixStories/stories.js +74 -0
- package/esm/components/Rows/ThreeColSixStories/three-col-six-stories.m.css +32 -0
- package/esm/components/Rows/ThreeColTwelveStories/README.md +41 -0
- package/esm/components/Rows/ThreeColTwelveStories/index.js +165 -0
- package/esm/components/Rows/ThreeColTwelveStories/stories.js +53 -0
- package/esm/components/Rows/ThreeColTwelveStories/three-col-twelve-stories.m.css +83 -0
- package/esm/components/Rows/TwoColFourStory/README.md +33 -0
- package/esm/components/Rows/TwoColFourStory/index.js +174 -0
- package/esm/components/Rows/TwoColFourStory/stories.js +63 -0
- package/esm/components/Rows/TwoColFourStory/two-col-four-story.m.css +64 -0
- package/esm/components/Rows/TwoColFourStoryHighlight/README.md +35 -0
- package/esm/components/Rows/TwoColFourStoryHighlight/index.js +164 -0
- package/esm/components/Rows/TwoColFourStoryHighlight/stories.js +50 -0
- package/esm/components/Rows/TwoColFourStoryHighlight/two-col-four-story-highlight.m.css +116 -0
- package/esm/components/Rows/TwoColSevenStories/README.md +37 -0
- package/esm/components/Rows/TwoColSevenStories/index.js +193 -0
- package/esm/components/Rows/TwoColSevenStories/stories.js +102 -0
- package/esm/components/Rows/TwoColSevenStories/two-col-seven-stories.m.css +175 -0
- package/esm/components/Rows/TwoColSixStories/README.md +36 -0
- package/esm/components/Rows/TwoColSixStories/index.js +185 -0
- package/esm/components/Rows/TwoColSixStories/stories.js +67 -0
- package/esm/components/Rows/TwoColSixStories/two-col-six-stories.m.css +135 -0
- package/esm/components/Rows/TwoColTenStoriesSidebar/README.md +34 -0
- package/esm/components/Rows/TwoColTenStoriesSidebar/index.js +191 -0
- package/esm/components/Rows/TwoColTenStoriesSidebar/stories.js +53 -0
- package/esm/components/Rows/TwoColTenStoriesSidebar/two-col-ten-stories-sidebar.m.css +52 -0
- package/esm/components/Rows/TwoColThreeStory/README.md +40 -0
- package/esm/components/Rows/TwoColThreeStory/index.js +146 -0
- package/esm/components/Rows/TwoColThreeStory/stories.js +63 -0
- package/esm/components/Rows/TwoColThreeStory/two-col-three-story.m.css +36 -0
- package/esm/components/SharedContext.js +17 -0
- package/esm/components/Svgs/Loading/loading.js +140 -0
- package/esm/components/Svgs/Loading/loading.m.css +5 -0
- package/esm/components/Svgs/SocialIcons/facebook.js +18 -0
- package/esm/components/Svgs/SocialIcons/instagram.js +33 -0
- package/esm/components/Svgs/SocialIcons/linkedin.js +18 -0
- package/esm/components/Svgs/SocialIcons/pinterest.js +12 -0
- package/esm/components/Svgs/SocialIcons/twitter.js +18 -0
- package/esm/components/Svgs/SocialIcons/whatsapp.js +19 -0
- package/esm/components/Svgs/SocialIcons/youtube.js +19 -0
- package/esm/components/Svgs/caret-right.svg +3 -0
- package/esm/components/Svgs/clock-icon.js +19 -0
- package/esm/components/Svgs/close-icon.js +22 -0
- package/esm/components/Svgs/crown.js +40 -0
- package/esm/components/Svgs/fallbackImage.js +45 -0
- package/esm/components/Svgs/hyperlink.js +22 -0
- package/esm/components/Svgs/key.js +39 -0
- package/esm/components/Svgs/left-arrow.js +24 -0
- package/esm/components/Svgs/liveicon.js +16 -0
- package/esm/components/Svgs/lock.js +40 -0
- package/esm/components/Svgs/right-arrow.js +24 -0
- package/esm/components/Svgs/share-icon.js +19 -0
- package/esm/components/Svgs/star.js +34 -0
- package/esm/components/Svgs/user-fallback-icon.js +22 -0
- package/esm/components/Typography/README.md +7 -0
- package/esm/components/Typography/index.js +33 -0
- package/esm/components/Typography/stories.js +15 -0
- package/esm/components/Typography/style.m.css +11 -0
- package/esm/entry-points.js +291 -0
- package/esm/guide/stories.js +22 -0
- package/esm/hydration-component/index.js +41 -0
- package/esm/hydration-component/useNearScreen.js +71 -0
- package/esm/index.js +88 -0
- package/esm/rows.js +40 -0
- package/esm/stylesheets/mixins.scss +27 -0
- package/esm/stylesheets/viewports.m.css +3 -0
- package/esm/utils/testing-utils.js +8 -0
- package/esm/utils/utils.js +363 -0
- package/esm/utils/utils.test.js +46 -0
- package/package.json +1 -1
- package/atoms/Author/index.js +0 -170
- package/atoms/Author/styles.arrow.css +0 -1
- package/atoms/AuthorWithTime/index.js +0 -514
- package/atoms/AuthorWithTime/styles.arrow.css +0 -1
- package/atoms/CollectionName/index.js +0 -255
- package/atoms/CollectionName/styles.arrow.css +0 -1
- package/atoms/ExtendedLoadMore/index-0f809dd9.js +0 -254
- package/atoms/ExtendedLoadMore/index-142f015c.js +0 -476
- package/atoms/ExtendedLoadMore/index-44f97338.js +0 -300
- package/atoms/ExtendedLoadMore/index-66dd4dbd.js +0 -215
- package/atoms/ExtendedLoadMore/index-8462c597.js +0 -363
- package/atoms/ExtendedLoadMore/index-93cb06d1.js +0 -1016
- package/atoms/ExtendedLoadMore/index-afd44863.js +0 -95
- package/atoms/ExtendedLoadMore/index.js +0 -20
- package/atoms/ExtendedLoadMore/styles.arrow.css +0 -1
- package/atoms/Headline/index.js +0 -379
- package/atoms/Headline/styles.arrow.css +0 -1
- package/atoms/HeroImage/index.js +0 -336
- package/atoms/HeroImage/styles.arrow.css +0 -1
- package/atoms/LoadmoreButton/index.js +0 -175
- package/atoms/LoadmoreButton/styles.arrow.css +0 -1
- package/atoms/ScrollSnap/index.js +0 -379
- package/atoms/ScrollSnap/styles.arrow.css +0 -1
- package/atoms/SectionTag/index.js +0 -140
- package/atoms/SectionTag/styles.arrow.css +0 -1
- package/atoms/Subheadline/index.js +0 -120
- package/atoms/Subheadline/styles.arrow.css +0 -1
- package/atoms/TimeStamp/index.js +0 -221
- package/atoms/TimeStamp/styles.arrow.css +0 -1
- package/molecules/KeyEvents/index.js +0 -457
- package/molecules/KeyEvents/styles.arrow.css +0 -1
- package/molecules/PageIntroductionCard/index.js +0 -248
- package/molecules/PageIntroductionCard/styles.arrow.css +0 -1
- package/molecules/SocialShareTemplate/index.js +0 -506
- package/molecules/SocialShareTemplate/styles.arrow.css +0 -1
- package/molecules/StoryCard/index.js +0 -1430
- package/molecules/StoryCard/styles.arrow.css +0 -1
- package/molecules/StoryElementCard/index.js +0 -3091
- package/molecules/StoryElementCard/styles.arrow.css +0 -1
- package/molecules/StorycardContent/index.js +0 -976
- package/molecules/StorycardContent/styles.arrow.css +0 -1
- package/rows/AlternateCollectionFilter/index.js +0 -2189
- package/rows/AlternateCollectionFilter/styles.arrow.css +0 -1
- package/rows/AsideCollection/index.js +0 -2135
- package/rows/AsideCollection/styles.arrow.css +0 -1
- package/rows/AstrologyCollection/index.js +0 -2106
- package/rows/AstrologyCollection/styles.arrow.css +0 -1
- package/rows/AuthorIntroductionCard/index.js +0 -813
- package/rows/AuthorIntroductionCard/styles.arrow.css +0 -1
- package/rows/AuthorsList/index.js +0 -996
- package/rows/AuthorsList/styles.arrow.css +0 -1
- package/rows/CollectionFilter/index.js +0 -2279
- package/rows/CollectionFilter/styles.arrow.css +0 -1
- package/rows/ElevenStories/index.js +0 -2118
- package/rows/ElevenStories/styles.arrow.css +0 -1
- package/rows/FourColFiveStories/index.js +0 -1861
- package/rows/FourColFiveStories/styles.arrow.css +0 -1
- package/rows/FourColGrid/index.js +0 -2083
- package/rows/FourColGrid/styles.arrow.css +0 -1
- package/rows/FourColPortraitStories/index.js +0 -2116
- package/rows/FourColPortraitStories/styles.arrow.css +0 -1
- package/rows/FourColSixteenStories/index.js +0 -1849
- package/rows/FourColSixteenStories/styles.arrow.css +0 -1
- package/rows/FourColTwelveStories/index.js +0 -1822
- package/rows/FourColTwelveStories/styles.arrow.css +0 -1
- package/rows/FourStorySlider/index.js +0 -2223
- package/rows/FourStorySlider/styles.arrow.css +0 -1
- package/rows/FourStorySliderPortrait/index.js +0 -2226
- package/rows/FourStorySliderPortrait/styles.arrow.css +0 -1
- package/rows/FourTabbedBigStorySlider/index.js +0 -1985
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +0 -1
- package/rows/FullScreenSlider/index.js +0 -2141
- package/rows/FullScreenSlider/styles.arrow.css +0 -1
- package/rows/HalfScreenSlider/index.js +0 -1994
- package/rows/HalfScreenSlider/styles.arrow.css +0 -1
- package/rows/ListComponent/index.js +0 -1942
- package/rows/ListComponent/styles.arrow.css +0 -1
- package/rows/Listicles/index.js +0 -945
- package/rows/Listicles/styles.arrow.css +0 -1
- package/rows/MagazineEditions/index.js +0 -690
- package/rows/MagazineEditions/styles.arrow.css +0 -1
- package/rows/MagazineHeaderCard/index.js +0 -684
- package/rows/MagazineHeaderCard/styles.arrow.css +0 -1
- package/rows/MagazineWidget/index.js +0 -1994
- package/rows/MagazineWidget/styles.arrow.css +0 -1
- package/rows/OneColStoryList/index.js +0 -2169
- package/rows/OneColStoryList/styles.arrow.css +0 -1
- package/rows/OpinionCollection/index.js +0 -1545
- package/rows/OpinionCollection/styles.arrow.css +0 -1
- package/rows/SixColSixStories/index.js +0 -2014
- package/rows/SixColSixStories/styles.arrow.css +0 -1
- package/rows/StoryCollection/index.js +0 -2135
- package/rows/StoryCollection/styles.arrow.css +0 -1
- package/rows/TagIntroductionCard/index.js +0 -103
- package/rows/TagIntroductionCard/styles.arrow.css +0 -1
- package/rows/ThreeColFlexStories/index.js +0 -2074
- package/rows/ThreeColFlexStories/styles.arrow.css +0 -1
- package/rows/ThreeColFourteenStories/index.js +0 -1770
- package/rows/ThreeColFourteenStories/styles.arrow.css +0 -1
- package/rows/ThreeColGrid/index.js +0 -2104
- package/rows/ThreeColGrid/styles.arrow.css +0 -1
- package/rows/ThreeColSevenStory/index.js +0 -1982
- package/rows/ThreeColSevenStory/styles.arrow.css +0 -1
- package/rows/ThreeColSixStories/index.js +0 -1965
- package/rows/ThreeColSixStories/styles.arrow.css +0 -1
- package/rows/ThreeColTwelveStories/index.js +0 -1854
- package/rows/ThreeColTwelveStories/styles.arrow.css +0 -1
- package/rows/TwoColFourStories/index.js +0 -1943
- package/rows/TwoColFourStories/styles.arrow.css +0 -1
- package/rows/TwoColFourStoryHighlight/index.js +0 -1930
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +0 -1
- package/rows/TwoColSevenStories/index.js +0 -1970
- package/rows/TwoColSevenStories/styles.arrow.css +0 -1
- package/rows/TwoColSixStories/index.js +0 -1963
- package/rows/TwoColSixStories/styles.arrow.css +0 -1
- package/rows/TwoColTenStoriesSidebar/index.js +0 -2029
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +0 -1
- package/rows/TwoColThreeStories/index.js +0 -1916
- package/rows/TwoColThreeStories/styles.arrow.css +0 -1
- package/story-elements/AlsoRead/index.js +0 -320
- package/story-elements/AlsoRead/styles.arrow.css +0 -1
- package/story-elements/Attachment/index.js +0 -167
- package/story-elements/Attachment/styles.arrow.css +0 -1
- package/story-elements/BigFact/index.js +0 -137
- package/story-elements/BigFact/styles.arrow.css +0 -1
- package/story-elements/BlockQuote/index.js +0 -304
- package/story-elements/BlockQuote/styles.arrow.css +0 -1
- package/story-elements/Blurb/index.js +0 -189
- package/story-elements/Blurb/styles.arrow.css +0 -1
- package/story-elements/Image/index.js +0 -529
- package/story-elements/Image/styles.arrow.css +0 -1
- package/story-elements/ImageGallery/index.js +0 -462
- package/story-elements/ImageGallery/styles.arrow.css +0 -1
- package/story-elements/ImageSlideshow/index.js +0 -773
- package/story-elements/ImageSlideshow/styles.arrow.css +0 -1
- package/story-elements/QuestionAnswer/index.js +0 -267
- package/story-elements/QuestionAnswer/styles.arrow.css +0 -1
- package/story-elements/Quote/index.js +0 -166
- package/story-elements/Quote/styles.arrow.css +0 -1
- package/story-elements/Reference/index.js +0 -160
- package/story-elements/Reference/styles.arrow.css +0 -1
- package/story-elements/StoryElement/index.js +0 -75
- package/story-elements/Summary/index.js +0 -190
- package/story-elements/Summary/styles.arrow.css +0 -1
- package/story-elements/Text/index.js +0 -165
- package/story-elements/Text/styles.arrow.css +0 -1
- package/story-elements/Video/index.js +0 -81
- package/story-elements/Video/styles.arrow.css +0 -1
- package/story-templates/ListicleStoryTemplate/index.js +0 -5586
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +0 -5762
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/PhotoStoryTemplate/index.js +0 -5564
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/TextStoryTemplate/index.js +0 -5637
- package/story-templates/TextStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/VideoStoryTemplate/index.js +0 -5496
- package/story-templates/VideoStoryTemplate/styles.arrow.css +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { shallow, mount } from "enzyme";
|
|
3
|
+
import { BigFact } from "./index";
|
|
4
|
+
import { generateStoryElementData } from "../../../Fixture";
|
|
5
|
+
import "./big-fact.m.css";
|
|
6
|
+
var element = generateStoryElementData("bigfact");
|
|
7
|
+
describe("Component: BigFact", function () {
|
|
8
|
+
test("It should display the big fact element content and attribution", function () {
|
|
9
|
+
var wrapper = mount( /*#__PURE__*/React.createElement(BigFact, {
|
|
10
|
+
element: element
|
|
11
|
+
}));
|
|
12
|
+
expect(wrapper.find({
|
|
13
|
+
"data-test-id": "bigfact"
|
|
14
|
+
}).prop("className")).toMatch(/bigfact-element/);
|
|
15
|
+
});
|
|
16
|
+
it("Should not render attribution value if there is no data", function () {
|
|
17
|
+
var wrapper = shallow( /*#__PURE__*/React.createElement(BigFact, {
|
|
18
|
+
element: element
|
|
19
|
+
}));
|
|
20
|
+
expect(wrapper.find({
|
|
21
|
+
"data-test-id": "attribution"
|
|
22
|
+
}).length).toEqual(0);
|
|
23
|
+
});
|
|
24
|
+
test("It should not render the BigFact component if the data is null", function () {
|
|
25
|
+
var component = shallow( /*#__PURE__*/React.createElement(BigFact, null));
|
|
26
|
+
expect(component.contains( /*#__PURE__*/React.createElement(BigFact, null))).toBe(false);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["element", "story", "config"];
|
|
4
|
+
import _getClassName from "babel-plugin-react-css-modules/dist/browser/getClassName";
|
|
5
|
+
var _styleModuleImportMap = {
|
|
6
|
+
"./big-fact.m.css": {
|
|
7
|
+
"viewports": "\"../../../../stylesheets/viewports.m.css\"",
|
|
8
|
+
"mobile": "768px",
|
|
9
|
+
"bigfact-element": "big-fact-m_bigfact-element__3uAwv",
|
|
10
|
+
"light": "big-fact-m_light__ha49M",
|
|
11
|
+
"content": "big-fact-m_content__1u2Ul",
|
|
12
|
+
"attribution": "big-fact-m_attribution__3XK_P",
|
|
13
|
+
"dark": "big-fact-m_dark__7a_KC"
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
import React from "react";
|
|
17
|
+
import PropTypes from "prop-types";
|
|
18
|
+
import { withElementWrapper } from "../withElementWrapper";
|
|
19
|
+
import { useStateValue } from "../../../SharedContext";
|
|
20
|
+
import { getTextColor } from "../../../../utils/utils";
|
|
21
|
+
import "./big-fact.m.css";
|
|
22
|
+
|
|
23
|
+
var BigFactBase = function BigFactBase(_ref) {
|
|
24
|
+
var element = _ref.element,
|
|
25
|
+
story = _ref.story,
|
|
26
|
+
config = _ref.config,
|
|
27
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
+
|
|
29
|
+
var configData = useStateValue() || {};
|
|
30
|
+
var textInvertColor = getTextColor(configData.theme);
|
|
31
|
+
var _element$metadata = element.metadata,
|
|
32
|
+
content = _element$metadata.content,
|
|
33
|
+
attribution = _element$metadata.attribution;
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
35
|
+
"data-test-id": "bigfact"
|
|
36
|
+
}, restProps, {
|
|
37
|
+
className: "arrow-component arr--bigfact-element " + _getClassName("bigfact-element ".concat(textInvertColor), _styleModuleImportMap) + (" " + (restProps ? restProps.className || "" : ""))
|
|
38
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: "big-fact-m_content__1u2Ul"
|
|
40
|
+
}, content), /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
"data-test-id": "attribution",
|
|
42
|
+
className: _getClassName("attribution ".concat(textInvertColor), _styleModuleImportMap)
|
|
43
|
+
}, attribution));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
BigFactBase.propTypes = {
|
|
47
|
+
element: PropTypes.shape({
|
|
48
|
+
metadata: PropTypes.shape({
|
|
49
|
+
content: PropTypes.string,
|
|
50
|
+
attribution: PropTypes.string
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
story: PropTypes.object,
|
|
54
|
+
config: PropTypes.object
|
|
55
|
+
};
|
|
56
|
+
export var BigFact = withElementWrapper(BigFactBase);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BigFact } from "./index";
|
|
3
|
+
import { withStore } from "../../../../../storybook";
|
|
4
|
+
import Readme from "./README.md";
|
|
5
|
+
import { generateStoryElementData } from "../../../Fixture";
|
|
6
|
+
var element = generateStoryElementData("bigfact");
|
|
7
|
+
withStore("Atoms/Story Elements/BigFact", {}, Readme).add("Default", function () {
|
|
8
|
+
return /*#__PURE__*/React.createElement(BigFact, {
|
|
9
|
+
element: element
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Block Quote
|
|
2
|
+
|
|
3
|
+
Displays the Block quote story element of the story
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
#### Block quote story element with default template
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
<BlockQuote element={element} template="default" />
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
#### Block quote story element with background template
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<BlockQuote element={element} template="withBackground" />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
#### Block quote story element with border template
|
|
20
|
+
|
|
21
|
+
```jsx
|
|
22
|
+
<BlockQuote element={element} template="withBorder" />
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
#### Block quote story element with background color
|
|
26
|
+
|
|
27
|
+
```jsx
|
|
28
|
+
const css = { backgroundShade: "#ff214b" };
|
|
29
|
+
|
|
30
|
+
<BlockQuote element={element} template="withBackground" css={css} />;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### Block quote story element with blockquote color
|
|
34
|
+
|
|
35
|
+
```jsx
|
|
36
|
+
const css = { blockQuoteColor: "#ff214b" };
|
|
37
|
+
|
|
38
|
+
<BlockQuote element={element} template="default" css={css} />;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### Replace default block quote element template with custom template passed using render
|
|
42
|
+
|
|
43
|
+
```jsx
|
|
44
|
+
const customTemplate = ({ element }) => <h3 dangerouslySetInnerHTML={{ __html: element.text }} />;
|
|
45
|
+
|
|
46
|
+
<BlockQuote element={element} render={customTemplate} />;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
<!-- PROPS -->
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import "./icon.m.css";
|
|
4
|
+
export var CurveIcon = function CurveIcon(_ref) {
|
|
5
|
+
var width = _ref.width,
|
|
6
|
+
height = _ref.height,
|
|
7
|
+
color = _ref.color,
|
|
8
|
+
opacity = _ref.opacity;
|
|
9
|
+
var lightColor = color === "light" && "#ffffff";
|
|
10
|
+
var darkColor = color === "dark" && "#0d0d0d";
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: "icon-m_curve-wrapper__3-sLV",
|
|
13
|
+
style: {
|
|
14
|
+
fill: "".concat(lightColor || darkColor || color)
|
|
15
|
+
}
|
|
16
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
width: width,
|
|
19
|
+
height: height,
|
|
20
|
+
viewBox: "0 0 64 64"
|
|
21
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
22
|
+
fill: "inherit",
|
|
23
|
+
opacity: opacity,
|
|
24
|
+
d: "M61 44.702c0 3.465-1.13 6.214-3.39 8.248-2.261 2.033-5.125 3.05-8.59 3.05-4.07 0-7.423-1.356-10.06-4.067-2.638-2.712-3.956-6.704-3.956-11.976 0-4.971.716-9.227 2.147-12.767 1.432-3.54 3.165-6.553 5.2-9.039 2.034-2.485 4.144-4.481 6.33-5.988 2.184-1.506 4.106-2.56 5.763-3.163l5.652 7.909c-3.316 1.657-5.99 3.879-8.025 6.666-2.035 2.786-3.052 6.289-3.052 10.507.603-.15 1.432-.226 2.487-.226 3.014 0 5.35 1.054 7.007 3.163C60.171 39.13 61 41.69 61 44.702zm-33.004 0c0 3.465-1.13 6.214-3.39 8.248-2.261 2.033-5.125 3.05-8.59 3.05-4.07 0-7.423-1.356-10.06-4.067C3.319 49.22 2 45.229 2 39.957c0-4.971.716-9.227 2.148-12.767 1.431-3.54 3.164-6.553 5.199-9.039 2.034-2.485 4.144-4.481 6.33-5.988C17.86 10.657 19.782 9.603 21.44 9l5.651 7.909c-3.316 1.657-5.99 3.879-8.025 6.666-2.034 2.786-3.052 6.289-3.052 10.507.603-.15 1.432-.226 2.487-.226 3.014 0 5.35 1.054 7.008 3.163 1.657 2.11 2.486 4.67 2.486 7.683z"
|
|
25
|
+
})));
|
|
26
|
+
};
|
|
27
|
+
CurveIcon.propTypes = {
|
|
28
|
+
width: PropTypes.string,
|
|
29
|
+
height: PropTypes.string,
|
|
30
|
+
color: PropTypes.string,
|
|
31
|
+
opacity: PropTypes.string
|
|
32
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import "./icon.m.css";
|
|
4
|
+
export var EdgeIcon = function EdgeIcon(_ref) {
|
|
5
|
+
var width = _ref.width,
|
|
6
|
+
height = _ref.height,
|
|
7
|
+
color = _ref.color,
|
|
8
|
+
opacity = _ref.opacity;
|
|
9
|
+
var lightColor = color === "light" && "#ffffff";
|
|
10
|
+
var darkColor = color === "dark" && "#0d0d0d";
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: "icon-m_edge-wrapper__xUOdp",
|
|
13
|
+
style: {
|
|
14
|
+
fill: "".concat(lightColor || darkColor || color)
|
|
15
|
+
}
|
|
16
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
width: width,
|
|
19
|
+
height: height,
|
|
20
|
+
viewBox: "0 0 64 64"
|
|
21
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
22
|
+
fill: "inherit",
|
|
23
|
+
opacity: opacity,
|
|
24
|
+
d: "M16.858 29.836v4.727H28V60H4V29.836c0-9.6 2.606-16.727 7.746-21.187C15.3 5.564 19.8 4 25.122 4v13.627c-2.888 0-8.264 0-8.264 12.209zm40.264-12.21V4c-5.32 0-9.82 1.564-13.376 4.65C38.606 13.108 36 20.236 36 29.835V60h24V34.563H48.857v-4.727c0-12.21 5.377-12.21 8.265-12.21z"
|
|
25
|
+
})));
|
|
26
|
+
};
|
|
27
|
+
EdgeIcon.propTypes = {
|
|
28
|
+
width: PropTypes.string,
|
|
29
|
+
height: PropTypes.string,
|
|
30
|
+
color: PropTypes.string,
|
|
31
|
+
opacity: PropTypes.string
|
|
32
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
@value viewports: "../../../../stylesheets/viewports.m.css";
|
|
2
|
+
@value mobile from viewports;
|
|
3
|
+
|
|
4
|
+
.blockquote-withBackground::before {
|
|
5
|
+
@media (min-width: mobile) {
|
|
6
|
+
content: "";
|
|
7
|
+
padding-top: 56.25%;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.icon {
|
|
12
|
+
width: 48px;
|
|
13
|
+
height: 48px;
|
|
14
|
+
@media (min-width: mobile) {
|
|
15
|
+
width: 64px;
|
|
16
|
+
height: 64px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.icon-border {
|
|
21
|
+
display: flex;
|
|
22
|
+
margin-bottom: var(--arrow-spacing-s);
|
|
23
|
+
@media (min-width: mobile) {
|
|
24
|
+
margin-bottom: var(--arrow-spacing-m);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.blockquote .icon,
|
|
29
|
+
.blockquote-default .icon {
|
|
30
|
+
margin-bottom: var(--arrow-spacing-s);
|
|
31
|
+
@media (min-width: mobile) {
|
|
32
|
+
margin-bottom: unset;
|
|
33
|
+
margin-right: var(--arrow-spacing-l);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.blockquote-withBorder .icon {
|
|
38
|
+
margin-right: var(--arrow-spacing-m);
|
|
39
|
+
@media (min-width: mobile) {
|
|
40
|
+
margin-right: var(--arrow-spacing-l);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.blockquote-withBackground .icon {
|
|
45
|
+
margin-bottom: var(--arrow-spacing-s);
|
|
46
|
+
@media (min-width: mobile) {
|
|
47
|
+
margin-bottom: var(--arrow-spacing-m);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.blockquote-withBorder .border {
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 2px;
|
|
54
|
+
background-color: var(--arrow-c-brand1);
|
|
55
|
+
margin-top: 36px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.blockquote .content,
|
|
59
|
+
.blockquote-default .content,
|
|
60
|
+
.blockquote-withBorder .content,
|
|
61
|
+
.blockquote-withBackground .content {
|
|
62
|
+
font-family: var(--arrow-typeface-primary);
|
|
63
|
+
font-size: var(--arrow-fs-l);
|
|
64
|
+
font-weight: var(--arrow-fw-bold);
|
|
65
|
+
margin-bottom: var(--arrow-spacing-s);
|
|
66
|
+
line-height: var(--arrow-lh-3);
|
|
67
|
+
@media (min-width: mobile) {
|
|
68
|
+
font-size: var(--arrow-fs-huge);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.blockquote .content,
|
|
73
|
+
.blockquote-default .content {
|
|
74
|
+
@media (min-width: mobile) {
|
|
75
|
+
margin-bottom: var(--arrow-spacing-xs);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.blockquote-withBorder .content {
|
|
80
|
+
margin-bottom: var(--arrow-spacing-xs);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.blockquote-withBorder .wrapper {
|
|
84
|
+
border-bottom: solid 2px var(--arrow-c-brand1);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.blockquote .attribution,
|
|
88
|
+
.blockquote-default .attribution,
|
|
89
|
+
.blockquote-withBorder .attribution,
|
|
90
|
+
.blockquote-withBackground .attribution {
|
|
91
|
+
font-family: var(--arrow-typeface-secondary);
|
|
92
|
+
font-size: var(--arrow-fs-m);
|
|
93
|
+
font-weight: var(--arrow-fw-bold);
|
|
94
|
+
font-style: italic;
|
|
95
|
+
line-height: var(--arrow-lh-5);
|
|
96
|
+
@media (min-width: mobile) {
|
|
97
|
+
font-size: var(--arrow-fs-l);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.blockquote-withBorder .attribution {
|
|
102
|
+
margin-bottom: var(--arrow-spacing-l);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.blockquote-withBackground .attribution {
|
|
106
|
+
display: flex;
|
|
107
|
+
justify-content: flex-end;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.blockquote-withBackground {
|
|
111
|
+
background-color: var(--arrow-c-brand1);
|
|
112
|
+
display: flex;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
align-items: center;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.blockquote-withBorder {
|
|
118
|
+
display: block;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.blockquote-withBackground .attribution::before {
|
|
122
|
+
content: "–";
|
|
123
|
+
color: inherit;
|
|
124
|
+
margin-right: var(--arrow-spacing-xs);
|
|
125
|
+
@media (min-width: mobile) {
|
|
126
|
+
margin-right: var(--arrow-spacing-s);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.blockquote-withBackground .quote-wrapper {
|
|
131
|
+
padding: 48px;
|
|
132
|
+
@media (min-width: mobile) {
|
|
133
|
+
padding: 96px;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.blockquote .quote-wrapper,
|
|
138
|
+
.blockquote-default .quote-wrapper {
|
|
139
|
+
@media (min-width: mobile) {
|
|
140
|
+
display: flex;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
html[dir="rtl"] .wrapper {
|
|
145
|
+
margin-right: var(--arrow-spacing-l);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.attribution.dark {
|
|
149
|
+
color: var(--arrow-c-mono4);
|
|
150
|
+
}
|
|
151
|
+
.attribution.light {
|
|
152
|
+
color: var(--arrow-c-invert-mono4);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.content.dark {
|
|
156
|
+
color: var(--arrow-c-mono2);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.content.light {
|
|
160
|
+
color: var(--arrow-c-invert-mono2);
|
|
161
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { shallow, mount } from "enzyme";
|
|
3
|
+
import { generateStoryElementData } from "../../../Fixture";
|
|
4
|
+
import { BlockQuote } from "./index";
|
|
5
|
+
var element = generateStoryElementData("blockquote");
|
|
6
|
+
describe("Block Quote Story Element", function () {
|
|
7
|
+
it("Should render default template", function () {
|
|
8
|
+
var wrapper = mount( /*#__PURE__*/React.createElement(BlockQuote, {
|
|
9
|
+
element: element,
|
|
10
|
+
template: "default"
|
|
11
|
+
}));
|
|
12
|
+
expect(wrapper.find({
|
|
13
|
+
"data-test-id": "blockquote"
|
|
14
|
+
}).prop("className")).toMatch(/blockquote-default/);
|
|
15
|
+
});
|
|
16
|
+
it("Should render with background template", function () {
|
|
17
|
+
var wrapper = mount( /*#__PURE__*/React.createElement(BlockQuote, {
|
|
18
|
+
element: element,
|
|
19
|
+
template: "withBackground"
|
|
20
|
+
}));
|
|
21
|
+
expect(wrapper.find({
|
|
22
|
+
"data-test-id": "blockquote"
|
|
23
|
+
}).prop("className")).toMatch(/blockquote-withBackground/);
|
|
24
|
+
});
|
|
25
|
+
it("Should render with border template", function () {
|
|
26
|
+
var wrapper = mount( /*#__PURE__*/React.createElement(BlockQuote, {
|
|
27
|
+
element: element,
|
|
28
|
+
template: "withBorder"
|
|
29
|
+
}));
|
|
30
|
+
expect(wrapper.find({
|
|
31
|
+
"data-test-id": "blockquote"
|
|
32
|
+
}).prop("className")).toMatch(/blockquote-withBorder/);
|
|
33
|
+
});
|
|
34
|
+
it("Should render background template with background color", function () {
|
|
35
|
+
var wrapper = shallow( /*#__PURE__*/React.createElement(BlockQuote, {
|
|
36
|
+
template: "withBackground",
|
|
37
|
+
element: element,
|
|
38
|
+
css: {
|
|
39
|
+
backgroundColor: "#ff214b"
|
|
40
|
+
}
|
|
41
|
+
}));
|
|
42
|
+
expect(wrapper.html()).toBe('<div data-test-id="blockquote" class="arrow-component arr--block-quote block-quote-m_blockquote-withBackground__1yW-u block-quote-m_dark__HaZuG "><div class="block-quote-m_quote-wrapper__83bEy"><div class="block-quote-m_icon__m-EIZ"><div class="icon-m_curve-wrapper__3-sLV" style="fill:#0d0d0d"><svg xmlns="http://www.w3.org/2000/svg" width="48px" height="48px" viewBox="0 0 64 64"><path fill="inherit" opacity=".4" d="M61 44.702c0 3.465-1.13 6.214-3.39 8.248-2.261 2.033-5.125 3.05-8.59 3.05-4.07 0-7.423-1.356-10.06-4.067-2.638-2.712-3.956-6.704-3.956-11.976 0-4.971.716-9.227 2.147-12.767 1.432-3.54 3.165-6.553 5.2-9.039 2.034-2.485 4.144-4.481 6.33-5.988 2.184-1.506 4.106-2.56 5.763-3.163l5.652 7.909c-3.316 1.657-5.99 3.879-8.025 6.666-2.035 2.786-3.052 6.289-3.052 10.507.603-.15 1.432-.226 2.487-.226 3.014 0 5.35 1.054 7.007 3.163C60.171 39.13 61 41.69 61 44.702zm-33.004 0c0 3.465-1.13 6.214-3.39 8.248-2.261 2.033-5.125 3.05-8.59 3.05-4.07 0-7.423-1.356-10.06-4.067C3.319 49.22 2 45.229 2 39.957c0-4.971.716-9.227 2.148-12.767 1.431-3.54 3.164-6.553 5.199-9.039 2.034-2.485 4.144-4.481 6.33-5.988C17.86 10.657 19.782 9.603 21.44 9l5.651 7.909c-3.316 1.657-5.99 3.879-8.025 6.666-2.034 2.786-3.052 6.289-3.052 10.507.603-.15 1.432-.226 2.487-.226 3.014 0 5.35 1.054 7.008 3.163 1.657 2.11 2.486 4.67 2.486 7.683z"></path></svg></div></div><div class="block-quote-m_wrapper__2KEhw"><div class="block-quote-m_content__xpMqX block-quote-m_dark__HaZuG">After the death of James Halliday, the creator of the virtual reality world, his pre-recorded message reveals the hidden fortune, which makes Wade Watts, a teenager, embark on a quest.</div><div class="block-quote-m_attribution__2m4s2 block-quote-m_dark__HaZuG">Player</div></div></div></div>');
|
|
43
|
+
});
|
|
44
|
+
it("Should render default template with blockquote color", function () {
|
|
45
|
+
var wrapper = shallow( /*#__PURE__*/React.createElement(BlockQuote, {
|
|
46
|
+
template: "default",
|
|
47
|
+
element: element,
|
|
48
|
+
css: {
|
|
49
|
+
blockQuoteColor: "#ff214b"
|
|
50
|
+
}
|
|
51
|
+
}));
|
|
52
|
+
expect(wrapper.html()).toBe('<div data-test-id="blockquote" class="arrow-component arr--block-quote block-quote-m_blockquote-default__fZ8a1 "><div class="block-quote-m_quote-wrapper__83bEy"><div class="block-quote-m_icon__m-EIZ"><div class="icon-m_curve-wrapper__3-sLV" style="fill:#ff214b"><svg xmlns="http://www.w3.org/2000/svg" width="48px" height="48px" viewBox="0 0 64 64"><path fill="inherit" d="M61 44.702c0 3.465-1.13 6.214-3.39 8.248-2.261 2.033-5.125 3.05-8.59 3.05-4.07 0-7.423-1.356-10.06-4.067-2.638-2.712-3.956-6.704-3.956-11.976 0-4.971.716-9.227 2.147-12.767 1.432-3.54 3.165-6.553 5.2-9.039 2.034-2.485 4.144-4.481 6.33-5.988 2.184-1.506 4.106-2.56 5.763-3.163l5.652 7.909c-3.316 1.657-5.99 3.879-8.025 6.666-2.035 2.786-3.052 6.289-3.052 10.507.603-.15 1.432-.226 2.487-.226 3.014 0 5.35 1.054 7.007 3.163C60.171 39.13 61 41.69 61 44.702zm-33.004 0c0 3.465-1.13 6.214-3.39 8.248-2.261 2.033-5.125 3.05-8.59 3.05-4.07 0-7.423-1.356-10.06-4.067C3.319 49.22 2 45.229 2 39.957c0-4.971.716-9.227 2.148-12.767 1.431-3.54 3.164-6.553 5.199-9.039 2.034-2.485 4.144-4.481 6.33-5.988C17.86 10.657 19.782 9.603 21.44 9l5.651 7.909c-3.316 1.657-5.99 3.879-8.025 6.666-2.034 2.786-3.052 6.289-3.052 10.507.603-.15 1.432-.226 2.487-.226 3.014 0 5.35 1.054 7.008 3.163 1.657 2.11 2.486 4.67 2.486 7.683z"></path></svg></div></div><div class="block-quote-m_wrapper__2KEhw" style="border-color:#ff214b"><div class="block-quote-m_content__xpMqX block-quote-m_dark__HaZuG">After the death of James Halliday, the creator of the virtual reality world, his pre-recorded message reveals the hidden fortune, which makes Wade Watts, a teenager, embark on a quest.</div><div class="block-quote-m_attribution__2m4s2 block-quote-m_dark__HaZuG">Player</div></div></div></div>');
|
|
53
|
+
});
|
|
54
|
+
it("Should render custom template", function () {
|
|
55
|
+
// eslint-disable-next-line react/prop-types
|
|
56
|
+
var customTemplate = function customTemplate(_ref) {
|
|
57
|
+
var element = _ref.element;
|
|
58
|
+
return /*#__PURE__*/React.createElement("h3", {
|
|
59
|
+
dangerouslySetInnerHTML: {
|
|
60
|
+
__html: element.metadata.content
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var wrapper = shallow( /*#__PURE__*/React.createElement(BlockQuote, {
|
|
66
|
+
element: element,
|
|
67
|
+
render: customTemplate
|
|
68
|
+
}));
|
|
69
|
+
expect(wrapper.html()).toBe("<h3>After the death of James Halliday, the creator of the virtual reality world, his pre-recorded message reveals the hidden fortune, which makes Wade Watts, a teenager, embark on a quest.</h3>");
|
|
70
|
+
});
|
|
71
|
+
});
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["element", "template", "css", "story", "config", "render"];
|
|
4
|
+
import _getClassName from "babel-plugin-react-css-modules/dist/browser/getClassName";
|
|
5
|
+
var _styleModuleImportMap = {
|
|
6
|
+
"./block-quote.m.css": {
|
|
7
|
+
"viewports": "\"../../../../stylesheets/viewports.m.css\"",
|
|
8
|
+
"mobile": "768px",
|
|
9
|
+
"blockquote-withBackground": "block-quote-m_blockquote-withBackground__1yW-u",
|
|
10
|
+
"icon": "block-quote-m_icon__m-EIZ",
|
|
11
|
+
"icon-border": "block-quote-m_icon-border__2xQQY",
|
|
12
|
+
"blockquote": "block-quote-m_blockquote__HPVh0",
|
|
13
|
+
"blockquote-default": "block-quote-m_blockquote-default__fZ8a1",
|
|
14
|
+
"blockquote-withBorder": "block-quote-m_blockquote-withBorder__1GVQL",
|
|
15
|
+
"border": "block-quote-m_border__1ZTPR",
|
|
16
|
+
"content": "block-quote-m_content__xpMqX",
|
|
17
|
+
"wrapper": "block-quote-m_wrapper__2KEhw",
|
|
18
|
+
"attribution": "block-quote-m_attribution__2m4s2",
|
|
19
|
+
"quote-wrapper": "block-quote-m_quote-wrapper__83bEy",
|
|
20
|
+
"dark": "block-quote-m_dark__HaZuG",
|
|
21
|
+
"light": "block-quote-m_light__1QrNc"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
import React from "react";
|
|
25
|
+
import { get } from "lodash";
|
|
26
|
+
import PropTypes from "prop-types";
|
|
27
|
+
import { clientWidth, getTextColor, shapeConfig, shapeStory } from "../../../../utils/utils";
|
|
28
|
+
import { withElementWrapper } from "../withElementWrapper";
|
|
29
|
+
import { CurveIcon } from "./Svg/curve";
|
|
30
|
+
import { EdgeIcon } from "./Svg/edge";
|
|
31
|
+
import "./block-quote.m.css";
|
|
32
|
+
import { useStateValue } from "../../../SharedContext";
|
|
33
|
+
|
|
34
|
+
var SelectionOfIcon = function SelectionOfIcon(iconType, template, blockQuoteColor, quoteColor) {
|
|
35
|
+
var isMobile = clientWidth("mobile");
|
|
36
|
+
var dimension = isMobile ? "48px" : "64px";
|
|
37
|
+
|
|
38
|
+
if (template === "withBackground") {
|
|
39
|
+
if (iconType === "edgeIcon") {
|
|
40
|
+
return /*#__PURE__*/React.createElement(EdgeIcon, {
|
|
41
|
+
width: dimension,
|
|
42
|
+
height: dimension,
|
|
43
|
+
color: quoteColor,
|
|
44
|
+
opacity: ".4"
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return /*#__PURE__*/React.createElement(CurveIcon, {
|
|
49
|
+
width: dimension,
|
|
50
|
+
height: dimension,
|
|
51
|
+
color: quoteColor,
|
|
52
|
+
opacity: ".4"
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (template !== "withBackground") {
|
|
57
|
+
if (iconType === "edgeIcon") {
|
|
58
|
+
return /*#__PURE__*/React.createElement(EdgeIcon, {
|
|
59
|
+
width: dimension,
|
|
60
|
+
height: dimension,
|
|
61
|
+
color: blockQuoteColor
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return /*#__PURE__*/React.createElement(CurveIcon, {
|
|
66
|
+
width: dimension,
|
|
67
|
+
height: dimension,
|
|
68
|
+
color: blockQuoteColor
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export var BlockQuoteBase = function BlockQuoteBase(_ref) {
|
|
74
|
+
var element = _ref.element,
|
|
75
|
+
template = _ref.template,
|
|
76
|
+
_ref$css = _ref.css,
|
|
77
|
+
css = _ref$css === void 0 ? {} : _ref$css,
|
|
78
|
+
_ref$story = _ref.story,
|
|
79
|
+
story = _ref$story === void 0 ? {} : _ref$story,
|
|
80
|
+
_ref$config = _ref.config,
|
|
81
|
+
config = _ref$config === void 0 ? {} : _ref$config,
|
|
82
|
+
render = _ref.render,
|
|
83
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
84
|
+
|
|
85
|
+
var _get = get(element, ["metadata"]),
|
|
86
|
+
content = _get.content,
|
|
87
|
+
attribution = _get.attribution;
|
|
88
|
+
|
|
89
|
+
if (!content) return null;
|
|
90
|
+
var blockQuoteColor = css.blockQuoteColor,
|
|
91
|
+
backgroundShade = css.backgroundShade,
|
|
92
|
+
iconType = css.iconType;
|
|
93
|
+
var templateStyle = template ? "blockquote-".concat(template) : "blockquote";
|
|
94
|
+
var isBackground = template === "withBackground";
|
|
95
|
+
var textColor = isBackground ? getTextColor(backgroundShade) : "";
|
|
96
|
+
var theme = isBackground && backgroundShade ? {
|
|
97
|
+
backgroundColor: backgroundShade
|
|
98
|
+
} : {};
|
|
99
|
+
var configData = useStateValue() || {};
|
|
100
|
+
var textInvertColor = getTextColor(isBackground ? theme.backgroundColor : configData.theme);
|
|
101
|
+
|
|
102
|
+
var updateStructure = function updateStructure() {
|
|
103
|
+
return template === "withBorder" ? /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
className: "block-quote-m_icon-border__2xQQY"
|
|
105
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
className: "block-quote-m_icon__m-EIZ"
|
|
107
|
+
}, SelectionOfIcon(iconType, template, blockQuoteColor, textColor)), /*#__PURE__*/React.createElement("div", {
|
|
108
|
+
className: "block-quote-m_border__1ZTPR",
|
|
109
|
+
style: blockQuoteColor && {
|
|
110
|
+
backgroundColor: blockQuoteColor
|
|
111
|
+
}
|
|
112
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
className: "block-quote-m_icon__m-EIZ"
|
|
114
|
+
}, SelectionOfIcon(iconType, template, blockQuoteColor, textColor));
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
118
|
+
"data-test-id": "blockquote",
|
|
119
|
+
style: theme
|
|
120
|
+
}, restProps, {
|
|
121
|
+
className: "arrow-component arr--block-quote " + _getClassName("".concat(templateStyle, " ").concat(textColor), _styleModuleImportMap) + (" " + (restProps ? restProps.className || "" : ""))
|
|
122
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
123
|
+
className: "block-quote-m_quote-wrapper__83bEy"
|
|
124
|
+
}, updateStructure(), /*#__PURE__*/React.createElement("div", {
|
|
125
|
+
className: "block-quote-m_wrapper__2KEhw",
|
|
126
|
+
style: blockQuoteColor && {
|
|
127
|
+
borderColor: blockQuoteColor
|
|
128
|
+
}
|
|
129
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
130
|
+
dangerouslySetInnerHTML: {
|
|
131
|
+
__html: content
|
|
132
|
+
},
|
|
133
|
+
className: _getClassName("content ".concat(textInvertColor), _styleModuleImportMap)
|
|
134
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
dangerouslySetInnerHTML: {
|
|
136
|
+
__html: attribution
|
|
137
|
+
},
|
|
138
|
+
className: _getClassName("attribution ".concat(textInvertColor), _styleModuleImportMap)
|
|
139
|
+
}))));
|
|
140
|
+
};
|
|
141
|
+
BlockQuoteBase.propTypes = {
|
|
142
|
+
element: PropTypes.shape({
|
|
143
|
+
metadata: PropTypes.shape({
|
|
144
|
+
content: PropTypes.string,
|
|
145
|
+
attribution: PropTypes.string
|
|
146
|
+
})
|
|
147
|
+
}),
|
|
148
|
+
template: PropTypes.string,
|
|
149
|
+
story: shapeStory,
|
|
150
|
+
config: shapeConfig,
|
|
151
|
+
render: PropTypes.func,
|
|
152
|
+
css: PropTypes.object
|
|
153
|
+
};
|
|
154
|
+
export var BlockQuote = withElementWrapper(BlockQuoteBase);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { generateStoryElementData } from "../../../Fixture";
|
|
3
|
+
import { BlockQuote } from "./index";
|
|
4
|
+
import { withStore, optionalSelect } from "../../../../../storybook";
|
|
5
|
+
import Readme from "./README.md";
|
|
6
|
+
import { color } from "@storybook/addon-knobs";
|
|
7
|
+
var templateStyle = {
|
|
8
|
+
Default: "default",
|
|
9
|
+
"With Background": "withBackground",
|
|
10
|
+
"With Border": "withBorder"
|
|
11
|
+
};
|
|
12
|
+
var element = generateStoryElementData("blockquote");
|
|
13
|
+
var iconStyle = {
|
|
14
|
+
"Curve Icon": "curveIcon",
|
|
15
|
+
"Edge Icon": "edgeIcon"
|
|
16
|
+
};
|
|
17
|
+
withStore("Atoms/Story Elements/Block Quote", {}, Readme).add("Default", function () {
|
|
18
|
+
return /*#__PURE__*/React.createElement(BlockQuote, {
|
|
19
|
+
element: element,
|
|
20
|
+
template: optionalSelect("Template Options", templateStyle),
|
|
21
|
+
css: {
|
|
22
|
+
blockQuoteColor: color("Block quote color", "#ff214b"),
|
|
23
|
+
backgroundShade: color("Background color", "#ff214b"),
|
|
24
|
+
iconType: optionalSelect("Icon Types", iconStyle)
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}).add("Custom", function () {
|
|
28
|
+
// eslint-disable-next-line react/prop-types
|
|
29
|
+
var customTemplate = function customTemplate(_ref) {
|
|
30
|
+
var element = _ref.element;
|
|
31
|
+
return /*#__PURE__*/React.createElement("h3", {
|
|
32
|
+
dangerouslySetInnerHTML: {
|
|
33
|
+
__html: element.metadata.content
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return /*#__PURE__*/React.createElement(BlockQuote, {
|
|
39
|
+
element: element,
|
|
40
|
+
render: customTemplate
|
|
41
|
+
});
|
|
42
|
+
});
|