@quintype/arrow 3.15.1-perf.3 → 3.15.1-perf.7
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-3976fac4.js → esm/components/Rows/FourColFiveStories/index.js} +54 -64
- 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-bc129cb8.js → esm/components/Rows/FourColGrid/index.js} +52 -59
- 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-a5c95f84.js → esm/components/Rows/OneColStoryList/index.js} +69 -72
- 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-6ecceae4.js → esm/components/Rows/SixColSixStories/index.js} +57 -61
- 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-b5936059.js → esm/components/Rows/ThreeColFlexStories/index.js} +70 -74
- 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-6e083738.js → esm/components/Rows/ThreeColGrid/index.js} +55 -62
- 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/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 -2259
- package/atoms/Author/styles.arrow.css +0 -1
- package/atoms/AuthorWithTime/index.js +0 -2964
- package/atoms/AuthorWithTime/styles.arrow.css +0 -1
- package/atoms/CollectionName/index.js +0 -2344
- package/atoms/CollectionName/styles.arrow.css +0 -1
- package/atoms/ExtendedLoadMore/index-3c4ac692.js +0 -1025
- package/atoms/ExtendedLoadMore/index-4ddfe28d.js +0 -93
- package/atoms/ExtendedLoadMore/index-5c8eda4a.js +0 -358
- package/atoms/ExtendedLoadMore/index-9e0d32b7.js +0 -290
- package/atoms/ExtendedLoadMore/index-b22f1843.js +0 -251
- package/atoms/ExtendedLoadMore/index-e7cde739.js +0 -3051
- package/atoms/ExtendedLoadMore/index-fee73a14.js +0 -207
- package/atoms/ExtendedLoadMore/index.js +0 -13
- package/atoms/ExtendedLoadMore/styles.arrow.css +0 -1
- package/atoms/Headline/index.js +0 -2468
- package/atoms/Headline/styles.arrow.css +0 -1
- package/atoms/HeroImage/index.js +0 -2484
- package/atoms/HeroImage/styles.arrow.css +0 -1
- package/atoms/LoadmoreButton/index.js +0 -2277
- package/atoms/LoadmoreButton/styles.arrow.css +0 -1
- package/atoms/ScrollSnap/index.js +0 -2540
- package/atoms/ScrollSnap/styles.arrow.css +0 -1
- package/atoms/SectionTag/index.js +0 -2229
- package/atoms/SectionTag/styles.arrow.css +0 -1
- package/atoms/Subheadline/index.js +0 -2209
- package/atoms/Subheadline/styles.arrow.css +0 -1
- package/atoms/TimeStamp/index.js +0 -2671
- package/atoms/TimeStamp/styles.arrow.css +0 -1
- package/molecules/KeyEvents/index.js +0 -2979
- package/molecules/KeyEvents/styles.arrow.css +0 -1
- package/molecules/PageIntroductionCard/index.js +0 -2685
- package/molecules/PageIntroductionCard/styles.arrow.css +0 -1
- package/molecules/SocialShareTemplate/index.js +0 -3102
- package/molecules/SocialShareTemplate/styles.arrow.css +0 -1
- package/molecules/StoryCard/index.js +0 -3948
- package/molecules/StoryCard/styles.arrow.css +0 -1
- package/molecules/StoryElementCard/index.js +0 -5861
- package/molecules/StoryElementCard/styles.arrow.css +0 -1
- package/molecules/StorycardContent/index.js +0 -3426
- package/molecules/StorycardContent/styles.arrow.css +0 -1
- package/rows/AlternateCollectionFilter/index.js +0 -4756
- package/rows/AlternateCollectionFilter/styles.arrow.css +0 -1
- package/rows/AsideCollection/index.js +0 -4702
- package/rows/AsideCollection/styles.arrow.css +0 -1
- package/rows/AstrologyCollection/index.js +0 -4673
- package/rows/AstrologyCollection/styles.arrow.css +0 -1
- package/rows/AuthorIntroductionCard/index.js +0 -3529
- package/rows/AuthorIntroductionCard/styles.arrow.css +0 -1
- package/rows/AuthorsList/index.js +0 -3725
- package/rows/AuthorsList/styles.arrow.css +0 -1
- package/rows/CollectionFilter/index.js +0 -4846
- package/rows/CollectionFilter/styles.arrow.css +0 -1
- package/rows/ElevenStories/index.js +0 -4649
- package/rows/ElevenStories/styles.arrow.css +0 -1
- package/rows/FourColFiveStories/index.js +0 -4389
- package/rows/FourColFiveStories/styles.arrow.css +0 -1
- package/rows/FourColGrid/index.js +0 -4614
- package/rows/FourColGrid/styles.arrow.css +0 -1
- package/rows/FourColPortraitStories/index.js +0 -4647
- package/rows/FourColPortraitStories/styles.arrow.css +0 -1
- package/rows/FourColSixteenStories/index.js +0 -4386
- package/rows/FourColSixteenStories/styles.arrow.css +0 -1
- package/rows/FourColTwelveStories/index.js +0 -4346
- package/rows/FourColTwelveStories/styles.arrow.css +0 -1
- package/rows/FourStorySlider/index.js +0 -4754
- package/rows/FourStorySlider/styles.arrow.css +0 -1
- package/rows/FourStorySliderPortrait/index.js +0 -4757
- package/rows/FourStorySliderPortrait/styles.arrow.css +0 -1
- package/rows/FourTabbedBigStorySlider/index.js +0 -4516
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +0 -1
- package/rows/FullScreenSlider/index.js +0 -4672
- package/rows/FullScreenSlider/styles.arrow.css +0 -1
- package/rows/HalfScreenSlider/index.js +0 -4525
- package/rows/HalfScreenSlider/styles.arrow.css +0 -1
- package/rows/ListComponent/index.js +0 -4473
- package/rows/ListComponent/styles.arrow.css +0 -1
- package/rows/Listicles/index.js +0 -3142
- package/rows/Listicles/styles.arrow.css +0 -1
- package/rows/MagazineEditions/index.js +0 -3153
- package/rows/MagazineEditions/styles.arrow.css +0 -1
- package/rows/MagazineHeaderCard/index.js +0 -3147
- package/rows/MagazineHeaderCard/styles.arrow.css +0 -1
- package/rows/MagazineWidget/index.js +0 -4525
- package/rows/MagazineWidget/styles.arrow.css +0 -1
- package/rows/OneColStoryList/index.js +0 -4700
- package/rows/OneColStoryList/styles.arrow.css +0 -1
- package/rows/OpinionCollection/index.js +0 -4067
- package/rows/OpinionCollection/styles.arrow.css +0 -1
- package/rows/SixColSixStories/index.js +0 -4545
- package/rows/SixColSixStories/styles.arrow.css +0 -1
- package/rows/StoryCollection/index.js +0 -4702
- package/rows/StoryCollection/styles.arrow.css +0 -1
- package/rows/TagIntroductionCard/index.js +0 -1910
- package/rows/TagIntroductionCard/styles.arrow.css +0 -1
- package/rows/ThreeColFlexStories/index.js +0 -4605
- package/rows/ThreeColFlexStories/styles.arrow.css +0 -1
- package/rows/ThreeColFourteenStories/index.js +0 -4294
- package/rows/ThreeColFourteenStories/styles.arrow.css +0 -1
- package/rows/ThreeColGrid/index.js +0 -4635
- package/rows/ThreeColGrid/styles.arrow.css +0 -1
- package/rows/ThreeColSevenStory/index.js +0 -4513
- package/rows/ThreeColSevenStory/styles.arrow.css +0 -1
- package/rows/ThreeColSixStories/index.js +0 -4496
- package/rows/ThreeColSixStories/styles.arrow.css +0 -1
- package/rows/ThreeColTwelveStories/index.js +0 -4391
- package/rows/ThreeColTwelveStories/styles.arrow.css +0 -1
- package/rows/TwoColFourStories/index.js +0 -4474
- package/rows/TwoColFourStories/styles.arrow.css +0 -1
- package/rows/TwoColFourStoryHighlight/index.js +0 -4467
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +0 -1
- package/rows/TwoColSevenStories/index.js +0 -4501
- package/rows/TwoColSevenStories/styles.arrow.css +0 -1
- package/rows/TwoColSixStories/index.js +0 -4500
- package/rows/TwoColSixStories/styles.arrow.css +0 -1
- package/rows/TwoColTenStoriesSidebar/index.js +0 -4560
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +0 -1
- package/rows/TwoColThreeStories/index.js +0 -4447
- package/rows/TwoColThreeStories/styles.arrow.css +0 -1
- package/story-elements/AlsoRead/index.js +0 -2466
- package/story-elements/AlsoRead/styles.arrow.css +0 -1
- package/story-elements/Attachment/index.js +0 -2022
- package/story-elements/Attachment/styles.arrow.css +0 -1
- package/story-elements/BigFact/index.js +0 -1992
- package/story-elements/BigFact/styles.arrow.css +0 -1
- package/story-elements/BlockQuote/index.js +0 -2441
- package/story-elements/BlockQuote/styles.arrow.css +0 -1
- package/story-elements/Blurb/index.js +0 -2103
- package/story-elements/Blurb/styles.arrow.css +0 -1
- package/story-elements/Image/index.js +0 -2738
- package/story-elements/Image/styles.arrow.css +0 -1
- package/story-elements/ImageGallery/index.js +0 -2671
- package/story-elements/ImageGallery/styles.arrow.css +0 -1
- package/story-elements/ImageSlideshow/index.js +0 -2982
- package/story-elements/ImageSlideshow/styles.arrow.css +0 -1
- package/story-elements/QuestionAnswer/index.js +0 -2404
- package/story-elements/QuestionAnswer/styles.arrow.css +0 -1
- package/story-elements/Quote/index.js +0 -2021
- package/story-elements/Quote/styles.arrow.css +0 -1
- package/story-elements/Reference/index.js +0 -2015
- package/story-elements/Reference/styles.arrow.css +0 -1
- package/story-elements/StoryElement/index.js +0 -1788
- package/story-elements/Summary/index.js +0 -2045
- package/story-elements/Summary/styles.arrow.css +0 -1
- package/story-elements/Text/index.js +0 -2302
- package/story-elements/Text/styles.arrow.css +0 -1
- package/story-elements/Video/index.js +0 -1794
- package/story-elements/Video/styles.arrow.css +0 -1
- package/story-templates/ListicleStoryTemplate/index.js +0 -8471
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +0 -8647
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/PhotoStoryTemplate/index.js +0 -8449
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/TextStoryTemplate/index.js +0 -8522
- package/story-templates/TextStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/VideoStoryTemplate/index.js +0 -8381
- package/story-templates/VideoStoryTemplate/styles.arrow.css +0 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["element", "template", "opts", "css", "story", "config", "render"];
|
|
4
|
+
import _getClassName from "babel-plugin-react-css-modules/dist/browser/getClassName";
|
|
5
|
+
var _styleModuleImportMap = {
|
|
6
|
+
"./summary.m.css": {
|
|
7
|
+
"viewports": "\"../../../../../assets/stylesheets/viewports.m.css\"",
|
|
8
|
+
"mobile": "768px",
|
|
9
|
+
"headline": "summary-m_headline__30sie",
|
|
10
|
+
"summary": "summary-m_summary__3-CnO",
|
|
11
|
+
"content": "summary-m_content__37n8C",
|
|
12
|
+
"summary-header": "summary-m_summary-header__UKVHi",
|
|
13
|
+
"summary-border": "summary-m_summary-border__M9hrr",
|
|
14
|
+
"dark": "summary-m_dark__1ZuzR",
|
|
15
|
+
"light": "summary-m_light__2SYiC",
|
|
16
|
+
"heading-wrapper": "summary-m_heading-wrapper__23S51",
|
|
17
|
+
"content-border": "summary-m_content-border__3ilmJ"
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
import React from "react";
|
|
21
|
+
import PropTypes from "prop-types";
|
|
22
|
+
import { withElementWrapper } from "../withElementWrapper";
|
|
23
|
+
import { getTextColor, updateContentLinks, shapeStory, shapeConfig } from "../../../../utils/utils";
|
|
24
|
+
import "./summary.m.css";
|
|
25
|
+
import { useStateValue } from "../../../SharedContext";
|
|
26
|
+
|
|
27
|
+
var SummaryBase = function SummaryBase(_ref) {
|
|
28
|
+
var element = _ref.element,
|
|
29
|
+
_ref$template = _ref.template,
|
|
30
|
+
template = _ref$template === void 0 ? "" : _ref$template,
|
|
31
|
+
_ref$opts = _ref.opts,
|
|
32
|
+
opts = _ref$opts === void 0 ? {} : _ref$opts,
|
|
33
|
+
_ref$css = _ref.css,
|
|
34
|
+
css = _ref$css === void 0 ? {} : _ref$css,
|
|
35
|
+
_ref$story = _ref.story,
|
|
36
|
+
story = _ref$story === void 0 ? {} : _ref$story,
|
|
37
|
+
_ref$config = _ref.config,
|
|
38
|
+
config = _ref$config === void 0 ? {} : _ref$config,
|
|
39
|
+
render = _ref.render,
|
|
40
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
+
|
|
42
|
+
var configData = useStateValue() || {};
|
|
43
|
+
var textInvertColor = getTextColor(configData.theme);
|
|
44
|
+
var content = element.text;
|
|
45
|
+
if (!content) return null;
|
|
46
|
+
var headerBgColor = css.headerBgColor;
|
|
47
|
+
var _opts$isExternalLink = opts.isExternalLink,
|
|
48
|
+
isExternalLink = _opts$isExternalLink === void 0 ? true : _opts$isExternalLink,
|
|
49
|
+
_opts$headline = opts.headline,
|
|
50
|
+
headline = _opts$headline === void 0 ? "Summary" : _opts$headline,
|
|
51
|
+
_opts$hideHeadline = opts.hideHeadline,
|
|
52
|
+
hideHeadline = _opts$hideHeadline === void 0 ? false : _opts$hideHeadline;
|
|
53
|
+
var text = isExternalLink && updateContentLinks(content) || content;
|
|
54
|
+
var supportedTemplates = ["header", "border"];
|
|
55
|
+
var templateStyle = supportedTemplates.includes(template) ? "summary-".concat(template) : "summary";
|
|
56
|
+
var contentBorder = hideHeadline ? "content-border" : "";
|
|
57
|
+
var renderTemplate = template === "header" || template === "border";
|
|
58
|
+
var updateHeaderColor = renderTemplate ? "".concat(headerBgColor) : "";
|
|
59
|
+
var textColor = renderTemplate ? getTextColor(headerBgColor) : "";
|
|
60
|
+
var updateContentColor = template === "header" ? "" : textInvertColor;
|
|
61
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
62
|
+
"data-test-id": "summary"
|
|
63
|
+
}, restProps, {
|
|
64
|
+
className: "arrow-component arr--summary-element arr-custom-style " + _getClassName(templateStyle, _styleModuleImportMap) + (" " + (restProps ? restProps.className || "" : ""))
|
|
65
|
+
}), !hideHeadline && /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
"data-test-id": "summary-headline",
|
|
67
|
+
className: _getClassName("heading-wrapper ".concat(textInvertColor), _styleModuleImportMap)
|
|
68
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
style: {
|
|
70
|
+
backgroundColor: updateHeaderColor
|
|
71
|
+
},
|
|
72
|
+
className: _getClassName("headline ".concat(textColor, " ").concat(textInvertColor), _styleModuleImportMap)
|
|
73
|
+
}, headline)), /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
dangerouslySetInnerHTML: {
|
|
75
|
+
__html: text
|
|
76
|
+
},
|
|
77
|
+
className: _getClassName("content ".concat(contentBorder, " ").concat(updateContentColor, " ").concat(textInvertColor), _styleModuleImportMap)
|
|
78
|
+
}));
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
SummaryBase.propTypes = {
|
|
82
|
+
element: PropTypes.shape({
|
|
83
|
+
text: PropTypes.string
|
|
84
|
+
}),
|
|
85
|
+
template: PropTypes.string,
|
|
86
|
+
opts: PropTypes.shape({
|
|
87
|
+
isExternalLink: PropTypes.bool,
|
|
88
|
+
headline: PropTypes.string,
|
|
89
|
+
hideHeadline: PropTypes.bool
|
|
90
|
+
}),
|
|
91
|
+
story: shapeStory,
|
|
92
|
+
config: shapeConfig,
|
|
93
|
+
render: PropTypes.func,
|
|
94
|
+
css: PropTypes.shape({
|
|
95
|
+
headerBgColor: PropTypes.string
|
|
96
|
+
})
|
|
97
|
+
};
|
|
98
|
+
export var Summary = withElementWrapper(SummaryBase);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { withStore, optionalSelect } from "../../../../../storybook";
|
|
3
|
+
import { generateStoryElementData } from "../../../Fixture";
|
|
4
|
+
import Readme from "./README.md";
|
|
5
|
+
import { Summary } from "./index";
|
|
6
|
+
import { color, boolean as _boolean, text } from "@storybook/addon-knobs";
|
|
7
|
+
var element = generateStoryElementData("summary");
|
|
8
|
+
var summaryTemplate = {
|
|
9
|
+
"default": "",
|
|
10
|
+
header: "header",
|
|
11
|
+
border: "border"
|
|
12
|
+
};
|
|
13
|
+
withStore("Atoms/Story Elements/Summary", {}, Readme).add("Default", function () {
|
|
14
|
+
return /*#__PURE__*/React.createElement(Summary, {
|
|
15
|
+
element: element,
|
|
16
|
+
template: optionalSelect("templates", summaryTemplate),
|
|
17
|
+
css: {
|
|
18
|
+
headerBgColor: color("Color", "#ff214b")
|
|
19
|
+
},
|
|
20
|
+
opts: {
|
|
21
|
+
isExternalLink: _boolean("External Link", true),
|
|
22
|
+
headline: text("Headline", "Summary"),
|
|
23
|
+
hideHeadline: _boolean("Hide Headline", false)
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}).add("Custom", function () {
|
|
27
|
+
// eslint-disable-next-line react/prop-types
|
|
28
|
+
var customTemplate = function customTemplate(_ref) {
|
|
29
|
+
var element = _ref.element;
|
|
30
|
+
return /*#__PURE__*/React.createElement("h3", {
|
|
31
|
+
dangerouslySetInnerHTML: {
|
|
32
|
+
__html: element.text
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return /*#__PURE__*/React.createElement(Summary, {
|
|
38
|
+
element: element,
|
|
39
|
+
render: customTemplate
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
@value viewports: "../../../../../assets/stylesheets/viewports.m.css";
|
|
2
|
+
@value mobile from viewports;
|
|
3
|
+
|
|
4
|
+
.headline {
|
|
5
|
+
font-size: var(--arrow-fs-s);
|
|
6
|
+
font-weight: var(--arrow-fw-bold);
|
|
7
|
+
@media (min-width: mobile) {
|
|
8
|
+
font-size: var(--arrow-fs-m);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.summary:global(.arrow-component) .content p {
|
|
13
|
+
font-style: italic;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.summary:global(.arrow-component) .content > p,
|
|
17
|
+
.summary-header:global(.arrow-component) .content > p,
|
|
18
|
+
.summary-border:global(.arrow-component) .content > p,
|
|
19
|
+
.dark {
|
|
20
|
+
font-size: var(--arrow-fs-s);
|
|
21
|
+
color: var(--arrow-c-dark);
|
|
22
|
+
@media (min-width: mobile) {
|
|
23
|
+
font-size: var(--arrow-fs-m);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.summary:global(.arrow-component) .content.light > p,
|
|
28
|
+
.summary-header:global(.arrow-component) .content.light > p,
|
|
29
|
+
.summary-border:global(.arrow-component) .content.light > p {
|
|
30
|
+
color: var(--arrow-c-light);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dark {
|
|
34
|
+
color: var(--arrow-c-mono1);
|
|
35
|
+
}
|
|
36
|
+
.light {
|
|
37
|
+
color: var(--arrow-c-invert-mono1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* default template */
|
|
41
|
+
.summary .headline {
|
|
42
|
+
margin-bottom: var(--arrow-spacing-xs);
|
|
43
|
+
font-size: var(--arrow-fs-s);
|
|
44
|
+
@media (min-width: mobile) {
|
|
45
|
+
font-size: var(--arrow-fs-l);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* headline template */
|
|
50
|
+
.summary-header .headline {
|
|
51
|
+
padding: var(--arrow-spacing-xs) var(--arrow-spacing-s);
|
|
52
|
+
font-size: var(--arrow-fs-s);
|
|
53
|
+
background-color: var(--arrow-c-brand1);
|
|
54
|
+
@media (min-width: mobile) {
|
|
55
|
+
font-size: var(--arrow-fs-m);
|
|
56
|
+
padding: var(--arrow-spacing-xs) var(--arrow-spacing-l);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
.summary-header .content {
|
|
60
|
+
background-color: var(--arrow-c-invert-mono7);
|
|
61
|
+
padding: var(--arrow-spacing-s);
|
|
62
|
+
@media (min-width: mobile) {
|
|
63
|
+
padding: var(--arrow-spacing-l);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* border template */
|
|
68
|
+
.summary-border .heading-wrapper {
|
|
69
|
+
display: flex;
|
|
70
|
+
margin-bottom: -22px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.summary-border .heading-wrapper::before {
|
|
74
|
+
content: " ";
|
|
75
|
+
position: relative;
|
|
76
|
+
width: var(--arrow-spacing-m);
|
|
77
|
+
border-top: 1px solid var(--arrow-c-dark);
|
|
78
|
+
align-self: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.summary-border .heading-wrapper.light::before {
|
|
82
|
+
border-top: 1px solid var(--arrow-c-light);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.summary-border .heading-wrapper::after {
|
|
86
|
+
content: " ";
|
|
87
|
+
position: relative;
|
|
88
|
+
flex: 1 1 auto;
|
|
89
|
+
border-top: 1px solid var(--arrow-c-dark);
|
|
90
|
+
align-self: center;
|
|
91
|
+
margin-right: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.summary-border .heading-wrapper.light::after {
|
|
95
|
+
border-top: 1px solid var(--arrow-c-light);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.summary-border .content {
|
|
99
|
+
border: 1px solid var(--arrow-c-dark);
|
|
100
|
+
border-top: none;
|
|
101
|
+
padding: var(--arrow-spacing-l);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.summary-border .content.light {
|
|
105
|
+
border: 1px solid var(--arrow-c-light);
|
|
106
|
+
}
|
|
107
|
+
.summary-border .headline {
|
|
108
|
+
background-color: var(--arrow-c-brand1);
|
|
109
|
+
padding: var(--arrow-spacing-xs) var(--arrow-spacing-l);
|
|
110
|
+
line-height: var(--arrow-lh-4);
|
|
111
|
+
border-radius: 2px;
|
|
112
|
+
margin: 0 var(--arrow-spacing-xs);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.summary-border .content-border.dark {
|
|
116
|
+
border: 1px solid var(--arrow-c-mono5);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.summary-border .content-border.light {
|
|
120
|
+
border: 1px solid var(--arrow-c-invert-mono5);
|
|
121
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { shallow, mount } from "enzyme";
|
|
3
|
+
import expect from "expect";
|
|
4
|
+
import { generateStoryElementData } from "../../../Fixture";
|
|
5
|
+
import { Summary } from "./index";
|
|
6
|
+
var element = generateStoryElementData("summary");
|
|
7
|
+
describe("Summary Story Element", function () {
|
|
8
|
+
it("Should render default template", function () {
|
|
9
|
+
var wrapper = mount( /*#__PURE__*/React.createElement(Summary, {
|
|
10
|
+
element: element
|
|
11
|
+
}));
|
|
12
|
+
expect(wrapper.find({
|
|
13
|
+
"data-test-id": "summary"
|
|
14
|
+
}).prop("className")).toMatch(/summary/);
|
|
15
|
+
});
|
|
16
|
+
it("Should render border left template", function () {
|
|
17
|
+
var wrapper = mount( /*#__PURE__*/React.createElement(Summary, {
|
|
18
|
+
element: element,
|
|
19
|
+
template: "header"
|
|
20
|
+
}));
|
|
21
|
+
expect(wrapper.find({
|
|
22
|
+
"data-test-id": "summary"
|
|
23
|
+
}).prop("className")).toMatch(/summary-header/);
|
|
24
|
+
});
|
|
25
|
+
it("Should render border top template", function () {
|
|
26
|
+
var wrapper = mount( /*#__PURE__*/React.createElement(Summary, {
|
|
27
|
+
element: element,
|
|
28
|
+
template: "border"
|
|
29
|
+
}));
|
|
30
|
+
expect(wrapper.find({
|
|
31
|
+
"data-test-id": "summary"
|
|
32
|
+
}).prop("className")).toMatch(/summary-border/);
|
|
33
|
+
});
|
|
34
|
+
it("Should render template without headline", function () {
|
|
35
|
+
var wrapper = shallow( /*#__PURE__*/React.createElement(Summary, {
|
|
36
|
+
element: element,
|
|
37
|
+
opts: {
|
|
38
|
+
hideHeadline: true
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
expect(wrapper.find({
|
|
42
|
+
"data-test-id": "summary-headline"
|
|
43
|
+
}).length).toEqual(0);
|
|
44
|
+
});
|
|
45
|
+
it("Should render template with custom headline", function () {
|
|
46
|
+
var wrapper = mount( /*#__PURE__*/React.createElement(Summary, {
|
|
47
|
+
element: element,
|
|
48
|
+
opts: {
|
|
49
|
+
headline: "in short"
|
|
50
|
+
}
|
|
51
|
+
}));
|
|
52
|
+
expect(wrapper.find({
|
|
53
|
+
"data-test-id": "summary-headline"
|
|
54
|
+
}).text()).toEqual("in short");
|
|
55
|
+
});
|
|
56
|
+
it("Should render template with header background color", function () {
|
|
57
|
+
var wrapper = mount( /*#__PURE__*/React.createElement(Summary, {
|
|
58
|
+
element: element,
|
|
59
|
+
template: "header",
|
|
60
|
+
css: {
|
|
61
|
+
headerBgColor: " #b3243e"
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
64
|
+
expect(wrapper.html()).toBe("<div data-test-id=\"summary\" class=\"arrow-component arr--summary-element arr-custom-style summary-m_summary-header__UKVHi \"><div data-test-id=\"summary-headline\" class=\"summary-m_heading-wrapper__23S51 summary-m_dark__1ZuzR\"><div style=\"background-color: rgb(179, 36, 62);\" class=\"summary-m_headline__30sie summary-m_dark__1ZuzR summary-m_dark__1ZuzR\">Summary</div></div><div class=\"summary-m_content__37n8C summary-m_dark__1ZuzR\"><p>Lorem<em> Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries</em>, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p></div></div>");
|
|
65
|
+
});
|
|
66
|
+
it("Should render custom template", function () {
|
|
67
|
+
// eslint-disable-next-line react/prop-types
|
|
68
|
+
var customTemplate = function customTemplate(_ref) {
|
|
69
|
+
var element = _ref.element;
|
|
70
|
+
return /*#__PURE__*/React.createElement("h3", {
|
|
71
|
+
dangerouslySetInnerHTML: {
|
|
72
|
+
__html: element.text
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
var wrapper = shallow( /*#__PURE__*/React.createElement(Summary, {
|
|
78
|
+
element: element,
|
|
79
|
+
render: customTemplate
|
|
80
|
+
}));
|
|
81
|
+
expect(wrapper.html()).toBe("<h3><p>Lorem<em> Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries</em>, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p></h3>");
|
|
82
|
+
});
|
|
83
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Text Story Element
|
|
2
|
+
|
|
3
|
+
Displays the text story element of the story
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
#### Default text story element
|
|
8
|
+
```jsx
|
|
9
|
+
<Text element={element} />
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
#### Text story element with external links opening in new tab
|
|
13
|
+
```jsx
|
|
14
|
+
const opts = { isExternalLink: true };
|
|
15
|
+
|
|
16
|
+
<Text element={element} opts={opts} />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
#### Text story element as promotional message
|
|
20
|
+
```jsx
|
|
21
|
+
const promotionalMessage = { ...element, metadata: { "promotional-message": true } };
|
|
22
|
+
<Text element={promotionalMessage} opts={opts} />
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
#### Replace default text story element template with custom template passed using render
|
|
26
|
+
```jsx
|
|
27
|
+
const customTemplate = ({element}) => <h3 dangerouslySetInnerHTML={{ __html: element.text }}/>;
|
|
28
|
+
|
|
29
|
+
<Text element={element} render={customTemplate} />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
<!-- PROPS -->
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["element", "opts", "css", "story", "config"];
|
|
4
|
+
import _getClassName from "babel-plugin-react-css-modules/dist/browser/getClassName";
|
|
5
|
+
var _styleModuleImportMap = {
|
|
6
|
+
"./text.m.css": {
|
|
7
|
+
"viewports": "\"../../../../../assets/stylesheets/viewports.m.css\"",
|
|
8
|
+
"mobile": "768px",
|
|
9
|
+
"promotionalMessage": "text-m_promotionalMessage__CUsPM",
|
|
10
|
+
"textElement": "text-m_textElement__e3QEt",
|
|
11
|
+
"dark": "text-m_dark__1TC18",
|
|
12
|
+
"light": "text-m_light__2cRe8"
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
import React from "react";
|
|
16
|
+
import PropTypes from "prop-types";
|
|
17
|
+
import { get } from "lodash";
|
|
18
|
+
import { withElementWrapper } from "../withElementWrapper";
|
|
19
|
+
import { updateContentLinks, shapeStory, shapeConfig, getTextColor } from "../../../../utils/utils";
|
|
20
|
+
import "./text.m.css";
|
|
21
|
+
import { useStateValue } from "../../../SharedContext";
|
|
22
|
+
|
|
23
|
+
var TextBase = function TextBase(_ref) {
|
|
24
|
+
var _ref$element = _ref.element,
|
|
25
|
+
element = _ref$element === void 0 ? {} : _ref$element,
|
|
26
|
+
_ref$opts = _ref.opts,
|
|
27
|
+
opts = _ref$opts === void 0 ? {} : _ref$opts,
|
|
28
|
+
_ref$css = _ref.css,
|
|
29
|
+
css = _ref$css === void 0 ? {} : _ref$css,
|
|
30
|
+
_ref$story = _ref.story,
|
|
31
|
+
story = _ref$story === void 0 ? {} : _ref$story,
|
|
32
|
+
_ref$config = _ref.config,
|
|
33
|
+
config = _ref$config === void 0 ? {} : _ref$config,
|
|
34
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
35
|
+
|
|
36
|
+
var content = element.text;
|
|
37
|
+
if (!content) return null;
|
|
38
|
+
var configData = useStateValue() || {};
|
|
39
|
+
var textInvertColor = getTextColor(configData.theme);
|
|
40
|
+
var textColor = css.textColor;
|
|
41
|
+
var _opts$isExternalLink = opts.isExternalLink,
|
|
42
|
+
isExternalLink = _opts$isExternalLink === void 0 ? true : _opts$isExternalLink;
|
|
43
|
+
var text = isExternalLink && updateContentLinks(content) || content;
|
|
44
|
+
var isPromotionalMessage = get(element, ["metadata", "promotional-message"], false);
|
|
45
|
+
var updatedStyle = isPromotionalMessage ? "promotionalMessage" : "textElement";
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
47
|
+
style: !isPromotionalMessage ? {
|
|
48
|
+
color: textColor
|
|
49
|
+
} : {},
|
|
50
|
+
"data-test-id": isPromotionalMessage ? "promotional-message" : "text",
|
|
51
|
+
dangerouslySetInnerHTML: {
|
|
52
|
+
__html: text
|
|
53
|
+
},
|
|
54
|
+
id: "text-element"
|
|
55
|
+
}, restProps, {
|
|
56
|
+
className: "arrow-component arr--text-element " + _getClassName("".concat(updatedStyle, " ").concat(textInvertColor), _styleModuleImportMap) + (" " + (restProps ? restProps.className || "" : ""))
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
TextBase.propTypes = {
|
|
61
|
+
element: PropTypes.shape({
|
|
62
|
+
text: PropTypes.string
|
|
63
|
+
}),
|
|
64
|
+
opts: PropTypes.shape({
|
|
65
|
+
isExternalLink: PropTypes.bool
|
|
66
|
+
}),
|
|
67
|
+
css: PropTypes.shape({
|
|
68
|
+
hyperlinkColor: PropTypes.string,
|
|
69
|
+
textColor: PropTypes.string
|
|
70
|
+
}),
|
|
71
|
+
story: shapeStory,
|
|
72
|
+
config: shapeConfig
|
|
73
|
+
};
|
|
74
|
+
export var Text = withElementWrapper(TextBase);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { withStore } from "../../../../../storybook";
|
|
9
|
+
import { Text } from "./index";
|
|
10
|
+
import Readme from "./README.md";
|
|
11
|
+
import { generateStoryElementData } from "../../../Fixture";
|
|
12
|
+
import { boolean as _boolean, color } from "@storybook/addon-knobs";
|
|
13
|
+
var element = generateStoryElementData("text");
|
|
14
|
+
withStore("Atoms/Story Elements/Text", {}, Readme).add("Default", function () {
|
|
15
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
16
|
+
element: element,
|
|
17
|
+
opts: {
|
|
18
|
+
isExternalLink: _boolean("External Link", true)
|
|
19
|
+
},
|
|
20
|
+
css: {
|
|
21
|
+
hyperlinkColor: color("Hyperlink Color", "#ff214b"),
|
|
22
|
+
textColor: color("Text Color", "#000")
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}).add("Promotional Message", function () {
|
|
26
|
+
var promotionalMessage = _objectSpread(_objectSpread({}, element), {}, {
|
|
27
|
+
metadata: {
|
|
28
|
+
"promotional-message": true
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
33
|
+
element: promotionalMessage,
|
|
34
|
+
opts: {
|
|
35
|
+
isExternalLink: _boolean("External Link", true)
|
|
36
|
+
},
|
|
37
|
+
css: {
|
|
38
|
+
hyperlinkColor: color("Hyperlink Color", "#ff214b")
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}).add("Custom", function () {
|
|
42
|
+
// eslint-disable-next-line react/prop-types
|
|
43
|
+
var customTemplate = function customTemplate(_ref) {
|
|
44
|
+
var element = _ref.element;
|
|
45
|
+
return /*#__PURE__*/React.createElement("h3", {
|
|
46
|
+
dangerouslySetInnerHTML: {
|
|
47
|
+
__html: element.text
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
53
|
+
element: element,
|
|
54
|
+
render: customTemplate
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@value viewports: "../../../../../assets/stylesheets/viewports.m.css";
|
|
2
|
+
@value mobile from viewports;
|
|
3
|
+
|
|
4
|
+
.promotionalMessage p {
|
|
5
|
+
font-size: var(--arrow-fs-tiny);
|
|
6
|
+
padding-bottom: var(--arrow-spacing-xxs);
|
|
7
|
+
@media (min-width: mobile) {
|
|
8
|
+
font-size: var(--arrow-fs-xs);
|
|
9
|
+
padding-bottom: var(--arrow-spacing-xs);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.textElement p,
|
|
14
|
+
.dark {
|
|
15
|
+
line-height: var(--arrow-lh-5);
|
|
16
|
+
font-size: var(--arrow-fs-s);
|
|
17
|
+
@media (min-width: mobile) {
|
|
18
|
+
font-size: var(--arrow-fs-m);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.promotionalMessage a,
|
|
23
|
+
.textElement a {
|
|
24
|
+
color: var(--textElementHyperlinkColor);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.textElement a:hover {
|
|
28
|
+
border-bottom: 1px solid var(--textElementHyperlinkColor);
|
|
29
|
+
transition: border 0.3s ease;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.textElement.light p {
|
|
33
|
+
color: var(--arrow-c-invert-mono2);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.promotionalMessage a:hover {
|
|
37
|
+
color: var(--arrow-c-brand1);
|
|
38
|
+
border-bottom: 1px solid;
|
|
39
|
+
padding-bottom: 3px;
|
|
40
|
+
transition: all 0.3s ease 0s;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.promotionalMessage.dark p {
|
|
44
|
+
color: var(--arrow-c-mono4);
|
|
45
|
+
}
|
|
46
|
+
.promotionalMessage.light p {
|
|
47
|
+
color: var(--arrow-c-invert-mono4);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.textElement ul,
|
|
51
|
+
.textElement ol {
|
|
52
|
+
list-style: initial;
|
|
53
|
+
padding: var(--arrow-spacing-m) 0 0 var(--arrow-spacing-l);
|
|
54
|
+
@media (min-width: mobile) {
|
|
55
|
+
padding: var(--arrow-spacing-m) 0 0 var(--arrow-spacing-xl);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.textElement ol {
|
|
60
|
+
list-style: auto;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.textElement :global .cta-anchor {
|
|
64
|
+
background-color: var(--arrow-c-brand1);
|
|
65
|
+
color: var(--arrow-c-light);
|
|
66
|
+
border-radius: var(--arrow-spacing-xxs);
|
|
67
|
+
box-shadow: 0 var(--arrow-spacing-xxs) var(-arrow-spacing-xs) 0 var(--arrow-c-mono6);
|
|
68
|
+
font-size: var(--arrow-fs-s);
|
|
69
|
+
padding: var(--arrow-spacing-s) var(--arrow-spacing-m);
|
|
70
|
+
display: block;
|
|
71
|
+
text-align: center;
|
|
72
|
+
|
|
73
|
+
@media (min-width: mobile) {
|
|
74
|
+
display: inline-block;
|
|
75
|
+
font-size: var(--arrow-fs-m);
|
|
76
|
+
padding: var(--arrow-spacing-m) var(--arrow-spacing-l);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { shallow, mount } from "enzyme";
|
|
9
|
+
import { Text } from "./index";
|
|
10
|
+
import { generateStoryElementData } from "../../../Fixture";
|
|
11
|
+
var element = generateStoryElementData("text");
|
|
12
|
+
describe("Text Story Element", function () {
|
|
13
|
+
it("should render default template", function () {
|
|
14
|
+
var wrapper = mount( /*#__PURE__*/React.createElement(Text, {
|
|
15
|
+
element: element
|
|
16
|
+
}));
|
|
17
|
+
expect(wrapper.find({
|
|
18
|
+
"data-test-id": "text"
|
|
19
|
+
}).prop("className")).toMatch(/text-element/);
|
|
20
|
+
});
|
|
21
|
+
it("should render promotional message when it is enabled", function () {
|
|
22
|
+
var promotionalMessage = _objectSpread(_objectSpread({}, element), {}, {
|
|
23
|
+
metadata: {
|
|
24
|
+
"promotional-message": true
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
var wrapper = mount( /*#__PURE__*/React.createElement(Text, {
|
|
29
|
+
element: promotionalMessage
|
|
30
|
+
}));
|
|
31
|
+
expect(wrapper.find({
|
|
32
|
+
"data-test-id": "promotional-message"
|
|
33
|
+
}).prop("className")).toMatch(/promotionalMessage/);
|
|
34
|
+
});
|
|
35
|
+
it("should render default template with external link", function () {
|
|
36
|
+
var wrapper = shallow( /*#__PURE__*/React.createElement(Text, {
|
|
37
|
+
opts: {
|
|
38
|
+
isExternalLink: true
|
|
39
|
+
},
|
|
40
|
+
element: element
|
|
41
|
+
}));
|
|
42
|
+
expect(wrapper.html()).toBe("<div data-test-id=\"text\" id=\"text-element\" class=\"arrow-component arr--text-element text-m_textElement__e3QEt text-m_dark__1TC18 \"><p><a aria-label='content' target='_blank' href=\"https://www.theguardian.com/technology/virtual-reality\">Virtual reality</a> is the air guitar solo of modern cinema: a frenetic imagined activity in a made-up world that exists one level below the already made-up world of the story. <a aria-label='content' target='_blank' href=\"https://www.theguardian.com/film/stevenspielberg\">Steven Spielberg</a> 2019s <a aria-label='content' target='_blank' href=\"https://www.theguardian.com/film/ready-player-one\">Ready Player One</a>.</p></div>");
|
|
43
|
+
});
|
|
44
|
+
it("should render default template without external link", function () {
|
|
45
|
+
var wrapper = shallow( /*#__PURE__*/React.createElement(Text, {
|
|
46
|
+
opts: {
|
|
47
|
+
isExternalLink: false
|
|
48
|
+
},
|
|
49
|
+
element: element
|
|
50
|
+
}));
|
|
51
|
+
expect(wrapper.html()).toBe('<div data-test-id="text" id="text-element" class="arrow-component arr--text-element text-m_textElement__e3QEt text-m_dark__1TC18 "><p><a href="https://www.theguardian.com/technology/virtual-reality">Virtual reality</a> is the air guitar solo of modern cinema: a frenetic imagined activity in a made-up world that exists one level below the already made-up world of the story. <a href="https://www.theguardian.com/film/stevenspielberg">Steven Spielberg</a> 2019s <a href="https://www.theguardian.com/film/ready-player-one">Ready Player One</a>.</p></div>');
|
|
52
|
+
});
|
|
53
|
+
it("should render custom template", function () {
|
|
54
|
+
// eslint-disable-next-line react/prop-types
|
|
55
|
+
var customTemplate = function customTemplate(_ref) {
|
|
56
|
+
var element = _ref.element;
|
|
57
|
+
return /*#__PURE__*/React.createElement("h3", {
|
|
58
|
+
dangerouslySetInnerHTML: {
|
|
59
|
+
__html: element.text
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var wrapper = shallow( /*#__PURE__*/React.createElement(Text, {
|
|
65
|
+
element: element,
|
|
66
|
+
render: customTemplate
|
|
67
|
+
}));
|
|
68
|
+
expect(wrapper.html()).toBe('<h3><p><a href="https://www.theguardian.com/technology/virtual-reality">Virtual reality</a> is the air guitar solo of modern cinema: a frenetic imagined activity in a made-up world that exists one level below the already made-up world of the story. <a href="https://www.theguardian.com/film/stevenspielberg">Steven Spielberg</a> 2019s <a href="https://www.theguardian.com/film/ready-player-one">Ready Player One</a>.</p></h3>');
|
|
69
|
+
});
|
|
70
|
+
});
|