@quintype/arrow 3.15.1-perf.5 → 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.
Files changed (452) hide show
  1. package/esm/components/Atoms/AdPlaceholder/ads.m.css +13 -0
  2. package/esm/components/Atoms/AdPlaceholder/index.js +28 -0
  3. package/esm/components/Atoms/Author/README.md +19 -0
  4. package/esm/components/Atoms/Author/author.m.css +65 -0
  5. package/esm/components/Atoms/Author/index.js +109 -0
  6. package/esm/components/Atoms/Author/stories.js +28 -0
  7. package/esm/components/Atoms/AuthorCard/README.md +47 -0
  8. package/esm/components/Atoms/AuthorCard/author-card.m.css +174 -0
  9. package/esm/components/Atoms/AuthorCard/author-card.test.js +93 -0
  10. package/esm/components/Atoms/AuthorCard/index.js +133 -0
  11. package/esm/components/Atoms/AuthorCard/stories.js +68 -0
  12. package/esm/components/Atoms/AuthorImage/README.md +31 -0
  13. package/esm/components/Atoms/AuthorImage/author-image.m.css +53 -0
  14. package/esm/components/Atoms/AuthorImage/index.js +69 -0
  15. package/esm/components/Atoms/AuthorImage/stories.js +26 -0
  16. package/esm/components/Atoms/AuthorWithTimestamp/README.md +12 -0
  17. package/esm/components/Atoms/AuthorWithTimestamp/author-with-timestamp.m.css +42 -0
  18. package/esm/components/Atoms/AuthorWithTimestamp/index.js +95 -0
  19. package/esm/components/Atoms/AuthorWithTimestamp/stories.js +22 -0
  20. package/esm/components/Atoms/BulletPoint/README.md +9 -0
  21. package/esm/components/Atoms/BulletPoint/bullet-point.m.css +14 -0
  22. package/esm/components/Atoms/BulletPoint/index.js +27 -0
  23. package/esm/components/Atoms/BulletPoint/stories.js +9 -0
  24. package/esm/components/Atoms/CaptionAttribution/README.md +15 -0
  25. package/esm/components/Atoms/CaptionAttribution/caption-attribution.m.css +40 -0
  26. package/esm/components/Atoms/CaptionAttribution/caption-attribution.test.js +50 -0
  27. package/esm/components/Atoms/CaptionAttribution/index.js +66 -0
  28. package/esm/components/Atoms/CaptionAttribution/stories.js +47 -0
  29. package/esm/components/Atoms/CollectionName/README.md +11 -0
  30. package/esm/components/Atoms/CollectionName/collection-name.m.css +94 -0
  31. package/esm/components/Atoms/CollectionName/index.js +152 -0
  32. package/esm/components/Atoms/CollectionName/stories.js +41 -0
  33. package/esm/components/Atoms/Divider/__snapshots__/divider.test.js.snap +18 -0
  34. package/esm/components/Atoms/Divider/divider.m.css +6 -0
  35. package/esm/components/Atoms/Divider/divider.test.js +9 -0
  36. package/esm/components/Atoms/Divider/index.js +34 -0
  37. package/esm/components/Atoms/Dot/dot.js +39 -0
  38. package/esm/components/Atoms/Dot/dot.m.css +6 -0
  39. package/esm/components/Atoms/ExtendedLoadMore/README.md +9 -0
  40. package/esm/components/Atoms/ExtendedLoadMore/__snapshots__/extended-load-more.test.js.snap +11 -0
  41. package/esm/components/Atoms/ExtendedLoadMore/extended-load-more.test.js +14 -0
  42. package/esm/components/Atoms/ExtendedLoadMore/index.js +183 -0
  43. package/esm/components/Atoms/FallbackImage/fallback.m.css +33 -0
  44. package/esm/components/Atoms/FallbackImage/index.js +29 -0
  45. package/esm/components/Atoms/Headline/README.md +7 -0
  46. package/esm/components/Atoms/Headline/headline.m.css +26 -0
  47. package/esm/components/Atoms/Headline/index.js +97 -0
  48. package/esm/components/Atoms/Headline/stories.js +39 -0
  49. package/esm/components/Atoms/HeroImage/README.md +13 -0
  50. package/esm/components/Atoms/HeroImage/hero-image.m.css +72 -0
  51. package/esm/components/Atoms/HeroImage/index.js +175 -0
  52. package/esm/components/Atoms/HeroImage/stories.js +23 -0
  53. package/esm/components/Atoms/Hyperlink/hyperlink.m.css +10 -0
  54. package/esm/components/Atoms/Hyperlink/index.js +20 -0
  55. package/esm/components/Atoms/LoadMoreTarget/index.js +24 -0
  56. package/esm/components/Atoms/Loadmore/README.md +0 -0
  57. package/esm/components/Atoms/Loadmore/__snapshots__/load-more.test.js.snap +25 -0
  58. package/esm/components/Atoms/Loadmore/index.js +61 -0
  59. package/esm/components/Atoms/Loadmore/load-more.m.css +23 -0
  60. package/esm/components/Atoms/Loadmore/load-more.test.js +26 -0
  61. package/esm/components/Atoms/Loadmore/stories.js +17 -0
  62. package/esm/components/Atoms/MagazineCoverImage/README.md +21 -0
  63. package/esm/components/Atoms/MagazineCoverImage/index.js +58 -0
  64. package/esm/components/Atoms/MagazineCoverImage/magazine-cover-image.m.css +24 -0
  65. package/esm/components/Atoms/MagazineCoverImage/stories.js +22 -0
  66. package/esm/components/Atoms/PremiumStoryIcon/index.js +54 -0
  67. package/esm/components/Atoms/PublishDetail/README.md +15 -0
  68. package/esm/components/Atoms/PublishDetail/index.js +104 -0
  69. package/esm/components/Atoms/PublishDetail/publish-details.m.css +47 -0
  70. package/esm/components/Atoms/PublishDetail/publish-details.test.js +38 -0
  71. package/esm/components/Atoms/PublishDetail/stories.js +20 -0
  72. package/esm/components/Atoms/ReadTime/README.md +13 -0
  73. package/esm/components/Atoms/ReadTime/index.js +46 -0
  74. package/esm/components/Atoms/ReadTime/read-time.m.css +25 -0
  75. package/esm/components/Atoms/ReadTime/read-time.test.js +29 -0
  76. package/esm/components/Atoms/ReadTime/stories.js +15 -0
  77. package/esm/components/Atoms/ScrollSnap/SliderArrow/index.js +64 -0
  78. package/esm/components/Atoms/ScrollSnap/SliderArrow/slider-arrow.m.css +45 -0
  79. package/esm/components/Atoms/ScrollSnap/SliderIndicator/index.js +53 -0
  80. package/esm/components/Atoms/ScrollSnap/SliderIndicator/slider-indicator.m.css +71 -0
  81. package/esm/components/Atoms/ScrollSnap/index.js +165 -0
  82. package/esm/components/Atoms/ScrollSnap/scroll-snap.m.css +27 -0
  83. package/esm/components/Atoms/SectionTag/README.md +11 -0
  84. package/esm/components/Atoms/SectionTag/index.js +79 -0
  85. package/esm/components/Atoms/SectionTag/section.m.css +53 -0
  86. package/esm/components/Atoms/SectionTag/stories.js +22 -0
  87. package/esm/components/Atoms/SocialSharePopup/README.md +25 -0
  88. package/esm/components/Atoms/SocialSharePopup/__snapshots__/social-share-popup.test.js.snap +653 -0
  89. package/esm/components/Atoms/SocialSharePopup/index.js +100 -0
  90. package/esm/components/Atoms/SocialSharePopup/social-share-popup.m.css +109 -0
  91. package/esm/components/Atoms/SocialSharePopup/social-share-popup.test.js +87 -0
  92. package/esm/components/Atoms/SocialSharePopup/stories.js +18 -0
  93. package/esm/components/Atoms/StoryElements/AlsoRead/README.md +49 -0
  94. package/esm/components/Atoms/StoryElements/AlsoRead/also-read.m.css +135 -0
  95. package/esm/components/Atoms/StoryElements/AlsoRead/also-read.test.js +97 -0
  96. package/esm/components/Atoms/StoryElements/AlsoRead/index.js +156 -0
  97. package/esm/components/Atoms/StoryElements/AlsoRead/stories.js +47 -0
  98. package/esm/components/Atoms/StoryElements/Attachment/README.md +21 -0
  99. package/esm/components/Atoms/StoryElements/Attachment/__snapshots__/attachment.test.js.snap +47 -0
  100. package/esm/components/Atoms/StoryElements/Attachment/attachment.m.css +125 -0
  101. package/esm/components/Atoms/StoryElements/Attachment/attachment.test.js +66 -0
  102. package/esm/components/Atoms/StoryElements/Attachment/index.js +86 -0
  103. package/esm/components/Atoms/StoryElements/Attachment/stories.js +62 -0
  104. package/esm/components/Atoms/StoryElements/BigFact/README.md +9 -0
  105. package/esm/components/Atoms/StoryElements/BigFact/big-fact.m.css +41 -0
  106. package/esm/components/Atoms/StoryElements/BigFact/big-fact.test.js +28 -0
  107. package/esm/components/Atoms/StoryElements/BigFact/index.js +56 -0
  108. package/esm/components/Atoms/StoryElements/BigFact/stories.js +11 -0
  109. package/esm/components/Atoms/StoryElements/BlockQuote/README.md +49 -0
  110. package/esm/components/Atoms/StoryElements/BlockQuote/Svg/curve.js +32 -0
  111. package/esm/components/Atoms/StoryElements/BlockQuote/Svg/edge.js +32 -0
  112. package/esm/components/Atoms/StoryElements/BlockQuote/Svg/icon.m.css +4 -0
  113. package/esm/components/Atoms/StoryElements/BlockQuote/block-quote.m.css +161 -0
  114. package/esm/components/Atoms/StoryElements/BlockQuote/block-quote.test.js +71 -0
  115. package/esm/components/Atoms/StoryElements/BlockQuote/index.js +154 -0
  116. package/esm/components/Atoms/StoryElements/BlockQuote/stories.js +42 -0
  117. package/esm/components/Atoms/StoryElements/Blurb/README.md +43 -0
  118. package/esm/components/Atoms/StoryElements/Blurb/blurb.m.css +55 -0
  119. package/esm/components/Atoms/StoryElements/Blurb/blurb.test.js +76 -0
  120. package/esm/components/Atoms/StoryElements/Blurb/index.js +96 -0
  121. package/esm/components/Atoms/StoryElements/Blurb/stories.js +38 -0
  122. package/esm/components/Atoms/StoryElements/Image/README.md +13 -0
  123. package/esm/components/Atoms/StoryElements/Image/image.m.css +21 -0
  124. package/esm/components/Atoms/StoryElements/Image/image.test.js +19 -0
  125. package/esm/components/Atoms/StoryElements/Image/index.js +87 -0
  126. package/esm/components/Atoms/StoryElements/Image/stories.js +28 -0
  127. package/esm/components/Atoms/StoryElements/ImageSlideshow/README.md +13 -0
  128. package/esm/components/Atoms/StoryElements/ImageSlideshow/image-slideshow.m.css +49 -0
  129. package/esm/components/Atoms/StoryElements/ImageSlideshow/index.js +82 -0
  130. package/esm/components/Atoms/StoryElements/ImageSlideshow/stories.js +31 -0
  131. package/esm/components/Atoms/StoryElements/QuestionAnswer/README.md +56 -0
  132. package/esm/components/Atoms/StoryElements/QuestionAnswer/index.js +176 -0
  133. package/esm/components/Atoms/StoryElements/QuestionAnswer/question-answer.m.css +106 -0
  134. package/esm/components/Atoms/StoryElements/QuestionAnswer/question-answer.test.js +130 -0
  135. package/esm/components/Atoms/StoryElements/QuestionAnswer/stories.js +102 -0
  136. package/esm/components/Atoms/StoryElements/Quote/README.md +41 -0
  137. package/esm/components/Atoms/StoryElements/Quote/index.js +87 -0
  138. package/esm/components/Atoms/StoryElements/Quote/quote.m.css +111 -0
  139. package/esm/components/Atoms/StoryElements/Quote/quote.test.js +61 -0
  140. package/esm/components/Atoms/StoryElements/Quote/stories.js +39 -0
  141. package/esm/components/Atoms/StoryElements/Reference/README.md +9 -0
  142. package/esm/components/Atoms/StoryElements/Reference/index.js +80 -0
  143. package/esm/components/Atoms/StoryElements/Reference/reference.m.css +42 -0
  144. package/esm/components/Atoms/StoryElements/Reference/reference.test.js +38 -0
  145. package/esm/components/Atoms/StoryElements/Reference/stories.js +16 -0
  146. package/esm/components/Atoms/StoryElements/StoryElement/README.md +10 -0
  147. package/esm/components/Atoms/StoryElements/StoryElement/index.js +30 -0
  148. package/esm/components/Atoms/StoryElements/StoryElement/stories.js +17 -0
  149. package/esm/components/Atoms/StoryElements/StoryElement/storyelement.test.js +14 -0
  150. package/esm/components/Atoms/StoryElements/Summary/README.md +56 -0
  151. package/esm/components/Atoms/StoryElements/Summary/index.js +98 -0
  152. package/esm/components/Atoms/StoryElements/Summary/stories.js +41 -0
  153. package/esm/components/Atoms/StoryElements/Summary/summary.m.css +121 -0
  154. package/esm/components/Atoms/StoryElements/Summary/summary.test.js +83 -0
  155. package/esm/components/Atoms/StoryElements/Text/README.md +32 -0
  156. package/esm/components/Atoms/StoryElements/Text/index.js +74 -0
  157. package/esm/components/Atoms/StoryElements/Text/stories.js +56 -0
  158. package/esm/components/Atoms/StoryElements/Text/text.m.css +78 -0
  159. package/esm/components/Atoms/StoryElements/Text/text.test.js +70 -0
  160. package/esm/components/Atoms/StoryElements/Video/README.md +9 -0
  161. package/esm/components/Atoms/StoryElements/Video/index.js +37 -0
  162. package/esm/components/Atoms/StoryElements/Video/stories.js +29 -0
  163. package/esm/components/Atoms/StoryElements/Video/video.m.css +89 -0
  164. package/esm/components/Atoms/StoryElements/Video/video.test.js +14 -0
  165. package/esm/components/Atoms/StoryElements/imageGallery/README.md +18 -0
  166. package/esm/components/Atoms/StoryElements/imageGallery/image-gallery.m.css +52 -0
  167. package/esm/components/Atoms/StoryElements/imageGallery/image-gallery.test.js +17 -0
  168. package/esm/components/Atoms/StoryElements/imageGallery/index.js +112 -0
  169. package/esm/components/Atoms/StoryElements/imageGallery/stories.js +22 -0
  170. package/esm/components/Atoms/StoryElements/withElementWrapper.js +21 -0
  171. package/esm/components/Atoms/StoryElements/withElementWrapper.test.js +49 -0
  172. package/esm/components/Atoms/StoryHeadline/index.js +57 -0
  173. package/esm/components/Atoms/StoryHeadline/story-headline.m.css +36 -0
  174. package/esm/components/Atoms/StoryTags/README.md +9 -0
  175. package/esm/components/Atoms/StoryTags/index.js +47 -0
  176. package/esm/components/Atoms/StoryTags/stories.js +23 -0
  177. package/esm/components/Atoms/StoryTags/story-tags.test.js +16 -0
  178. package/esm/components/Atoms/StoryTags/tags.m.css +34 -0
  179. package/esm/components/Atoms/Subheadline/README.md +17 -0
  180. package/esm/components/Atoms/Subheadline/index.js +52 -0
  181. package/esm/components/Atoms/Subheadline/stories.js +21 -0
  182. package/esm/components/Atoms/Subheadline/subheadline.m.css +17 -0
  183. package/esm/components/Atoms/TimeStamp/README.md +9 -0
  184. package/esm/components/Atoms/TimeStamp/index.js +39 -0
  185. package/esm/components/Atoms/TimeStamp/stories.js +11 -0
  186. package/esm/components/Atoms/TimeStamp/timestamp.m.css +22 -0
  187. package/esm/components/Fixture/config.json +2703 -0
  188. package/esm/components/Fixture/dummy-collection.js +2547 -0
  189. package/esm/components/Fixture/dummyStory.js +2089 -0
  190. package/esm/components/Fixture/index.js +433 -0
  191. package/esm/components/Fixture/slot-config.js +26 -0
  192. package/esm/components/Molecules/FullScreenImages/fullscreenimages.scss +56 -0
  193. package/esm/components/Molecules/FullScreenImages/index.js +119 -0
  194. package/esm/components/Molecules/KeyEvents/README.md +21 -0
  195. package/esm/components/Molecules/KeyEvents/index.js +152 -0
  196. package/esm/components/Molecules/KeyEvents/key-events.m.css +89 -0
  197. package/esm/components/Molecules/KeyEvents/stories.js +25 -0
  198. package/esm/components/Molecules/PageIntroductionCard/README.md +25 -0
  199. package/esm/components/Molecules/PageIntroductionCard/index.js +77 -0
  200. package/esm/components/Molecules/PageIntroductionCard/page-intro-card.m.css +61 -0
  201. package/esm/components/Molecules/PageIntroductionCard/stories.js +17 -0
  202. package/esm/components/Molecules/PortraitStoryCard/README.md +10 -0
  203. package/esm/components/Molecules/PortraitStoryCard/index.js +52 -0
  204. package/esm/components/Molecules/PortraitStoryCard/portrait-story-card.m.css +38 -0
  205. package/esm/components/Molecules/PortraitStoryCard/stories.js +24 -0
  206. package/esm/components/Molecules/SliderHorizontalCard/README.md +14 -0
  207. package/esm/components/Molecules/SliderHorizontalCard/index.js +69 -0
  208. package/esm/components/Molecules/SliderHorizontalCard/slider-horizontal-card.m.css +42 -0
  209. package/esm/components/Molecules/SliderHorizontalCard/stories.js +27 -0
  210. package/esm/components/Molecules/SocialShareTemplate/README.md +118 -0
  211. package/esm/components/Molecules/SocialShareTemplate/__snapshots__/social-share-template.test.js.snap +738 -0
  212. package/esm/components/Molecules/SocialShareTemplate/index.js +164 -0
  213. package/esm/components/Molecules/SocialShareTemplate/social-share-data.js +90 -0
  214. package/esm/components/Molecules/SocialShareTemplate/social-share-template.m.css +174 -0
  215. package/esm/components/Molecules/SocialShareTemplate/social-share-template.test.js +108 -0
  216. package/esm/components/Molecules/SocialShareTemplate/stories.js +38 -0
  217. package/esm/components/Molecules/StoryCard/README.md +75 -0
  218. package/esm/components/Molecules/StoryCard/READMEBGIMAGE.md +25 -0
  219. package/esm/components/Molecules/StoryCard/READMEBORDER.md +61 -0
  220. package/esm/components/Molecules/StoryCard/index.js +200 -0
  221. package/esm/components/Molecules/StoryCard/stories.js +274 -0
  222. package/esm/components/Molecules/StoryCard/storycard.m.css +158 -0
  223. package/esm/components/Molecules/StoryCardWithBulletPoint/README.md +9 -0
  224. package/esm/components/Molecules/StoryCardWithBulletPoint/index.js +43 -0
  225. package/esm/components/Molecules/StoryCardWithBulletPoint/stories.js +28 -0
  226. package/esm/components/Molecules/StoryCardWithBulletPoint/story-card-with-bullet-point.m.css +7 -0
  227. package/esm/components/Molecules/StoryElementCard/README.md +9 -0
  228. package/esm/components/Molecules/StoryElementCard/index.js +494 -0
  229. package/esm/components/Molecules/StoryElementCard/stories.js +25 -0
  230. package/esm/components/Molecules/StoryElementCard/story-element-card.m.css +78 -0
  231. package/esm/components/Molecules/StorycardContent/README.md +34 -0
  232. package/esm/components/Molecules/StorycardContent/index.js +86 -0
  233. package/esm/components/Molecules/StorycardContent/stories.js +45 -0
  234. package/esm/components/Molecules/StorycardContent/storycardContent.m.css +21 -0
  235. package/esm/components/Rows/AlternateCollectionFilter/README.md +38 -0
  236. package/esm/components/Rows/AlternateCollectionFilter/alternate-collection-filter.m.css +254 -0
  237. package/esm/components/Rows/AlternateCollectionFilter/index.js +288 -0
  238. package/esm/components/Rows/AlternateCollectionFilter/stories.js +68 -0
  239. package/esm/components/Rows/AsideCollection/README.md +27 -0
  240. package/esm/components/Rows/AsideCollection/aside-collection.m.css +103 -0
  241. package/esm/components/Rows/AsideCollection/aside-collection.test.js +32 -0
  242. package/esm/components/Rows/AsideCollection/index.js +253 -0
  243. package/esm/components/Rows/AsideCollection/stories.js +48 -0
  244. package/esm/components/Rows/AstrologyCollection/README.md +40 -0
  245. package/esm/components/Rows/AstrologyCollection/astrology-collection.m.css +165 -0
  246. package/esm/components/Rows/AstrologyCollection/index.js +272 -0
  247. package/esm/components/Rows/AstrologyCollection/stories.js +61 -0
  248. package/esm/components/Rows/AuthorIntroductionCard/README.md +43 -0
  249. package/esm/components/Rows/AuthorIntroductionCard/author-intro.m.css +278 -0
  250. package/esm/components/Rows/AuthorIntroductionCard/author-intro.test.js +148 -0
  251. package/esm/components/Rows/AuthorIntroductionCard/index.js +157 -0
  252. package/esm/components/Rows/AuthorIntroductionCard/stories.js +46 -0
  253. package/esm/components/Rows/AuthorsList/README.md +24 -0
  254. package/esm/components/Rows/AuthorsList/author-list.test.js +66 -0
  255. package/esm/components/Rows/AuthorsList/authors-list.m.css +22 -0
  256. package/esm/components/Rows/AuthorsList/index.js +64 -0
  257. package/esm/components/Rows/AuthorsList/stories.js +62 -0
  258. package/esm/components/Rows/CollectionFilter/README.md +39 -0
  259. package/esm/components/Rows/CollectionFilter/collection-filter.m.css +213 -0
  260. package/esm/components/Rows/CollectionFilter/index.js +366 -0
  261. package/esm/components/Rows/CollectionFilter/stories.js +78 -0
  262. package/esm/components/Rows/ElevenStories/11-stories.m.css +85 -0
  263. package/esm/components/Rows/ElevenStories/README.md +39 -0
  264. package/esm/components/Rows/ElevenStories/index.js +418 -0
  265. package/esm/components/Rows/ElevenStories/stories.js +71 -0
  266. package/esm/components/Rows/FourColFiveStories/README.md +37 -0
  267. package/esm/components/Rows/FourColFiveStories/four-col-five-stories.m.css +112 -0
  268. package/esm/components/Rows/FourColFiveStories/index.js +179 -0
  269. package/esm/components/Rows/FourColFiveStories/stories.js +67 -0
  270. package/esm/components/Rows/FourColGrid/README.md +39 -0
  271. package/esm/components/Rows/FourColGrid/four-col.m.css +50 -0
  272. package/esm/components/Rows/FourColGrid/index.js +167 -0
  273. package/esm/components/Rows/FourColGrid/stories.js +68 -0
  274. package/esm/components/Rows/FourColPortraitStories/README.md +38 -0
  275. package/esm/components/Rows/FourColPortraitStories/four-col-portrait-stories.m.css +45 -0
  276. package/esm/components/Rows/FourColPortraitStories/index.js +153 -0
  277. package/esm/components/Rows/FourColPortraitStories/stories.js +68 -0
  278. package/esm/components/Rows/FourColSixteenStories/README.md +35 -0
  279. package/esm/components/Rows/FourColSixteenStories/four-col-sixteen-stories.m.css +141 -0
  280. package/esm/components/Rows/FourColSixteenStories/index.js +157 -0
  281. package/esm/components/Rows/FourColSixteenStories/stories.js +43 -0
  282. package/esm/components/Rows/FourColTwelveStory/README.md +39 -0
  283. package/esm/components/Rows/FourColTwelveStory/four-col-twelve-story.m.css +71 -0
  284. package/esm/components/Rows/FourColTwelveStory/index.js +219 -0
  285. package/esm/components/Rows/FourColTwelveStory/stories.js +107 -0
  286. package/esm/components/Rows/FourStorySlider/README.md +45 -0
  287. package/esm/components/Rows/FourStorySlider/four-story-slider.m.css +78 -0
  288. package/esm/components/Rows/FourStorySlider/index.js +145 -0
  289. package/esm/components/Rows/FourStorySlider/stories.js +125 -0
  290. package/esm/components/Rows/FourStorySliderPortrait/README.md +45 -0
  291. package/esm/components/Rows/FourStorySliderPortrait/four-story-slider-portrait.m.css +221 -0
  292. package/esm/components/Rows/FourStorySliderPortrait/index.js +148 -0
  293. package/esm/components/Rows/FourStorySliderPortrait/stories.js +125 -0
  294. package/esm/components/Rows/FourTabbedBigStorySlider/README.md +39 -0
  295. package/esm/components/Rows/FourTabbedBigStorySlider/four-tabbed-big-story-slider.m.css +265 -0
  296. package/esm/components/Rows/FourTabbedBigStorySlider/index.js +221 -0
  297. package/esm/components/Rows/FourTabbedBigStorySlider/stories.js +59 -0
  298. package/esm/components/Rows/FullScreenSlider/README.md +46 -0
  299. package/esm/components/Rows/FullScreenSlider/full-screen-slider.m.css +155 -0
  300. package/esm/components/Rows/FullScreenSlider/index.js +140 -0
  301. package/esm/components/Rows/FullScreenSlider/stories.js +113 -0
  302. package/esm/components/Rows/HalfScreenSlider/README.md +43 -0
  303. package/esm/components/Rows/HalfScreenSlider/half-screen-slider.m.css +80 -0
  304. package/esm/components/Rows/HalfScreenSlider/index.js +124 -0
  305. package/esm/components/Rows/HalfScreenSlider/stories.js +118 -0
  306. package/esm/components/Rows/ListComponent/README.md +48 -0
  307. package/esm/components/Rows/ListComponent/index.js +176 -0
  308. package/esm/components/Rows/ListComponent/list-component.m.css +65 -0
  309. package/esm/components/Rows/ListComponent/stories.js +65 -0
  310. package/esm/components/Rows/Listicles/README.md +32 -0
  311. package/esm/components/Rows/Listicles/index.js +240 -0
  312. package/esm/components/Rows/Listicles/listicles.m.css +149 -0
  313. package/esm/components/Rows/Listicles/stories.js +53 -0
  314. package/esm/components/Rows/MagazineEditions/README.md +21 -0
  315. package/esm/components/Rows/MagazineEditions/index.js +123 -0
  316. package/esm/components/Rows/MagazineEditions/magazine-editions.m.css +50 -0
  317. package/esm/components/Rows/MagazineEditions/magazine-editions.test.js +30 -0
  318. package/esm/components/Rows/MagazineEditions/stories.js +41 -0
  319. package/esm/components/Rows/MagazineHeaderCard/README.md +21 -0
  320. package/esm/components/Rows/MagazineHeaderCard/index.js +117 -0
  321. package/esm/components/Rows/MagazineHeaderCard/magazine-cards.m.css +106 -0
  322. package/esm/components/Rows/MagazineHeaderCard/stories.js +34 -0
  323. package/esm/components/Rows/MagazineWidget/README.md +21 -0
  324. package/esm/components/Rows/MagazineWidget/index.js +177 -0
  325. package/esm/components/Rows/MagazineWidget/stories.js +40 -0
  326. package/esm/components/Rows/OneColStoryList/README.md +48 -0
  327. package/esm/components/Rows/OneColStoryList/index.js +245 -0
  328. package/esm/components/Rows/OneColStoryList/one-col-story-list.m.css +81 -0
  329. package/esm/components/Rows/OneColStoryList/stories.js +78 -0
  330. package/esm/components/Rows/OpinionCollection/README.md +36 -0
  331. package/esm/components/Rows/OpinionCollection/index.js +205 -0
  332. package/esm/components/Rows/OpinionCollection/opinion-collection.m.css +226 -0
  333. package/esm/components/Rows/OpinionCollection/stories.js +92 -0
  334. package/esm/components/Rows/SixColSixStories/README.md +37 -0
  335. package/esm/components/Rows/SixColSixStories/index.js +179 -0
  336. package/esm/components/Rows/SixColSixStories/six-col-six-stories.m.css +75 -0
  337. package/esm/components/Rows/SixColSixStories/stories.js +74 -0
  338. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/README.md +19 -0
  339. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/__snapshots__/listicle-story.test.js.snap +841 -0
  340. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/index.js +330 -0
  341. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/listicle-story.m.css +249 -0
  342. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/listicle-story.test.js +46 -0
  343. package/esm/components/Rows/StoryTemplates/ListicleStoryTemplates/stories.js +119 -0
  344. package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/README.md +25 -0
  345. package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/index.js +97 -0
  346. package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/live-blog.m.css +326 -0
  347. package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/stories.js +118 -0
  348. package/esm/components/Rows/StoryTemplates/LiveBlogStoryTemplates/templates.js +418 -0
  349. package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/index.js +294 -0
  350. package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/photo-story.test.js +163 -0
  351. package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/photo.m.css +175 -0
  352. package/esm/components/Rows/StoryTemplates/PhotoStoryTemplates/stories.js +124 -0
  353. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/README.md +49 -0
  354. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/index.js +100 -0
  355. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/stories.js +124 -0
  356. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/templates.js +285 -0
  357. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/text-story.m.css +449 -0
  358. package/esm/components/Rows/StoryTemplates/TextStoryTemplates/text-story.test.js +242 -0
  359. package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/README.md +31 -0
  360. package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/index.js +239 -0
  361. package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/stories.js +214 -0
  362. package/esm/components/Rows/StoryTemplates/VideoStoryTemplates/video-story.m.css +195 -0
  363. package/esm/components/Rows/TagIntroductionCard/README.md +11 -0
  364. package/esm/components/Rows/TagIntroductionCard/index.js +45 -0
  365. package/esm/components/Rows/TagIntroductionCard/stories.js +20 -0
  366. package/esm/components/Rows/TagIntroductionCard/tag-intro-card.module.css +25 -0
  367. package/esm/components/Rows/ThreeColFlexStories/README.md +38 -0
  368. package/esm/components/Rows/ThreeColFlexStories/index.js +227 -0
  369. package/esm/components/Rows/ThreeColFlexStories/stories.js +74 -0
  370. package/esm/components/Rows/ThreeColFlexStories/three-col-flex-stories.m.css +60 -0
  371. package/esm/components/Rows/ThreeColFourteenStory/README.md +28 -0
  372. package/esm/components/Rows/ThreeColFourteenStory/index.js +154 -0
  373. package/esm/components/Rows/ThreeColFourteenStory/stories.js +65 -0
  374. package/esm/components/Rows/ThreeColFourteenStory/three-col-fourteen-story.m.css +51 -0
  375. package/esm/components/Rows/ThreeColGrid/README.md +36 -0
  376. package/esm/components/Rows/ThreeColGrid/index.js +176 -0
  377. package/esm/components/Rows/ThreeColGrid/stories.js +78 -0
  378. package/esm/components/Rows/ThreeColGrid/three-col.m.css +43 -0
  379. package/esm/components/Rows/ThreeColSevenStory/README.md +36 -0
  380. package/esm/components/Rows/ThreeColSevenStory/index.js +201 -0
  381. package/esm/components/Rows/ThreeColSevenStory/stories.js +74 -0
  382. package/esm/components/Rows/ThreeColSevenStory/three-col-seven-story.m.css +44 -0
  383. package/esm/components/Rows/ThreeColSixStories/README.md +40 -0
  384. package/esm/components/Rows/ThreeColSixStories/index.js +183 -0
  385. package/esm/components/Rows/ThreeColSixStories/stories.js +74 -0
  386. package/esm/components/Rows/ThreeColSixStories/three-col-six-stories.m.css +32 -0
  387. package/esm/components/Rows/ThreeColTwelveStories/README.md +41 -0
  388. package/esm/components/Rows/ThreeColTwelveStories/index.js +165 -0
  389. package/esm/components/Rows/ThreeColTwelveStories/stories.js +53 -0
  390. package/esm/components/Rows/ThreeColTwelveStories/three-col-twelve-stories.m.css +83 -0
  391. package/esm/components/Rows/TwoColFourStory/README.md +33 -0
  392. package/esm/components/Rows/TwoColFourStory/index.js +174 -0
  393. package/esm/components/Rows/TwoColFourStory/stories.js +63 -0
  394. package/esm/components/Rows/TwoColFourStory/two-col-four-story.m.css +64 -0
  395. package/esm/components/Rows/TwoColFourStoryHighlight/README.md +35 -0
  396. package/esm/components/Rows/TwoColFourStoryHighlight/index.js +164 -0
  397. package/esm/components/Rows/TwoColFourStoryHighlight/stories.js +50 -0
  398. package/esm/components/Rows/TwoColFourStoryHighlight/two-col-four-story-highlight.m.css +116 -0
  399. package/esm/components/Rows/TwoColSevenStories/README.md +37 -0
  400. package/esm/components/Rows/TwoColSevenStories/index.js +193 -0
  401. package/esm/components/Rows/TwoColSevenStories/stories.js +102 -0
  402. package/esm/components/Rows/TwoColSevenStories/two-col-seven-stories.m.css +175 -0
  403. package/esm/components/Rows/TwoColSixStories/README.md +36 -0
  404. package/esm/components/Rows/TwoColSixStories/index.js +185 -0
  405. package/esm/components/Rows/TwoColSixStories/stories.js +67 -0
  406. package/esm/components/Rows/TwoColSixStories/two-col-six-stories.m.css +135 -0
  407. package/esm/components/Rows/TwoColTenStoriesSidebar/README.md +34 -0
  408. package/esm/components/Rows/TwoColTenStoriesSidebar/index.js +191 -0
  409. package/esm/components/Rows/TwoColTenStoriesSidebar/stories.js +53 -0
  410. package/esm/components/Rows/TwoColTenStoriesSidebar/two-col-ten-stories-sidebar.m.css +52 -0
  411. package/esm/components/Rows/TwoColThreeStory/README.md +40 -0
  412. package/esm/components/Rows/TwoColThreeStory/index.js +146 -0
  413. package/esm/components/Rows/TwoColThreeStory/stories.js +63 -0
  414. package/esm/components/Rows/TwoColThreeStory/two-col-three-story.m.css +36 -0
  415. package/esm/components/SharedContext.js +17 -0
  416. package/esm/components/Svgs/Loading/loading.js +140 -0
  417. package/esm/components/Svgs/Loading/loading.m.css +5 -0
  418. package/esm/components/Svgs/SocialIcons/facebook.js +18 -0
  419. package/esm/components/Svgs/SocialIcons/instagram.js +33 -0
  420. package/esm/components/Svgs/SocialIcons/linkedin.js +18 -0
  421. package/esm/components/Svgs/SocialIcons/pinterest.js +12 -0
  422. package/esm/components/Svgs/SocialIcons/twitter.js +18 -0
  423. package/esm/components/Svgs/SocialIcons/whatsapp.js +19 -0
  424. package/esm/components/Svgs/SocialIcons/youtube.js +19 -0
  425. package/esm/components/Svgs/caret-right.svg +3 -0
  426. package/esm/components/Svgs/clock-icon.js +19 -0
  427. package/esm/components/Svgs/close-icon.js +22 -0
  428. package/esm/components/Svgs/crown.js +40 -0
  429. package/esm/components/Svgs/fallbackImage.js +45 -0
  430. package/esm/components/Svgs/hyperlink.js +22 -0
  431. package/esm/components/Svgs/key.js +39 -0
  432. package/esm/components/Svgs/left-arrow.js +24 -0
  433. package/esm/components/Svgs/liveicon.js +16 -0
  434. package/esm/components/Svgs/lock.js +40 -0
  435. package/esm/components/Svgs/right-arrow.js +24 -0
  436. package/esm/components/Svgs/share-icon.js +19 -0
  437. package/esm/components/Svgs/star.js +34 -0
  438. package/esm/components/Svgs/user-fallback-icon.js +22 -0
  439. package/esm/components/Typography/README.md +7 -0
  440. package/esm/components/Typography/index.js +33 -0
  441. package/esm/components/Typography/stories.js +15 -0
  442. package/esm/components/Typography/style.m.css +11 -0
  443. package/esm/entry-points.js +291 -0
  444. package/esm/guide/stories.js +22 -0
  445. package/esm/hydration-component/index.js +41 -0
  446. package/esm/hydration-component/useNearScreen.js +71 -0
  447. package/esm/index.js +88 -0
  448. package/esm/rows.js +40 -0
  449. package/esm/utils/testing-utils.js +8 -0
  450. package/esm/utils/utils.js +363 -0
  451. package/esm/utils/utils.test.js +46 -0
  452. package/package.json +1 -1
@@ -0,0 +1,183 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ import _getClassName from "babel-plugin-react-css-modules/dist/browser/getClassName";
5
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
+
7
+ /*
8
+ * ************************************************************************
9
+ * * © [2015 - 2020] Quintype Technologies India Private Limited
10
+ * * All Rights Reserved.
11
+ * *************************************************************************
12
+ */
13
+ import { get } from "lodash";
14
+ import PropTypes from "prop-types";
15
+ import React, { lazy, Suspense, useState } from "react";
16
+ import { getTextColor } from "../../../utils/utils";
17
+ import "./../Loadmore/load-more.m.css";
18
+ var _styleModuleImportMap = {
19
+ "./../Loadmore/load-more.m.css": {
20
+ "button": "load-more-m_button__1mmf1",
21
+ "default": "load-more-m_default__2_k4V",
22
+ "dark": "load-more-m_dark__3dfzb",
23
+ "light": "load-more-m_light__ePZQI"
24
+ }
25
+ };
26
+
27
+ var getTemplate = function getTemplate(templateName) {
28
+ switch (templateName) {
29
+ case "ArrowFourColGrid":
30
+ return /*#__PURE__*/lazy(function () {
31
+ return import("../../Rows/FourColGrid");
32
+ });
33
+
34
+ case "ArrowThreeColGrid":
35
+ return /*#__PURE__*/lazy(function () {
36
+ return import("../../Rows/ThreeColGrid");
37
+ });
38
+
39
+ case "ArrowOneColStoryList":
40
+ return /*#__PURE__*/lazy(function () {
41
+ return import("../../Rows/OneColStoryList");
42
+ });
43
+
44
+ case "ArrowFourColFiveStories":
45
+ return /*#__PURE__*/lazy(function () {
46
+ return import("../../Rows/FourColFiveStories");
47
+ });
48
+
49
+ case "ArrowOpinionCollection":
50
+ return /*#__PURE__*/lazy(function () {
51
+ return import("../../Rows/OpinionCollection");
52
+ });
53
+
54
+ case "ArrowSixColSixStories":
55
+ return /*#__PURE__*/lazy(function () {
56
+ return import("../../Rows/SixColSixStories");
57
+ });
58
+
59
+ case "ArrowThreeColFlexStories":
60
+ return /*#__PURE__*/lazy(function () {
61
+ return import("../../Rows/ThreeColFlexStories");
62
+ });
63
+
64
+ case "ArrowFourColPortraitStories":
65
+ return /*#__PURE__*/lazy(function () {
66
+ return import("../../Rows/FourColPortraitStories");
67
+ });
68
+
69
+ default:
70
+ return /*#__PURE__*/lazy(function () {
71
+ return import("../../Rows/ThreeColGrid");
72
+ });
73
+ }
74
+ };
75
+
76
+ export var ExtendedLoadMore = function ExtendedLoadMore(_ref) {
77
+ var config = _ref.config,
78
+ componentName = _ref.componentName,
79
+ WithArrowConfig = _ref.WithArrowConfig,
80
+ withSubsequentLoad = _ref.withSubsequentLoad;
81
+ var showButton = get(config, ["showButton"], true);
82
+ var btnText = get(config, ["buttonText"], "Read More");
83
+ var theme = get(config, ["theme"], "");
84
+ var textColor = getTextColor(theme);
85
+ /* Open an array to maintain load-more initiated components to re-render */
86
+
87
+ var _useState = useState([]),
88
+ _useState2 = _slicedToArray(_useState, 2),
89
+ components = _useState2[0],
90
+ setComponents = _useState2[1];
91
+
92
+ var addComponent = /*#__PURE__*/function () {
93
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(event) {
94
+ var collectionSlug, offset, limit, Component, _yield$yield$fetch$js, items, updatedOffset, updatedCompList;
95
+
96
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
97
+ while (1) {
98
+ switch (_context.prev = _context.next) {
99
+ case 0:
100
+ event.persist();
101
+ collectionSlug = event.target.parentElement.getAttribute("data-collection-slug");
102
+ offset = event.target.parentElement.getAttribute("data-collection-offset");
103
+ limit = event.target.parentElement.getAttribute("data-collection-limit");
104
+ Component = getTemplate(componentName);
105
+ _context.next = 7;
106
+ return fetch("/api/v1/collections/".concat(collectionSlug, "?item-type=story&offset=").concat(offset, "&limit=").concat(limit));
107
+
108
+ case 7:
109
+ _context.next = 9;
110
+ return _context.sent.json();
111
+
112
+ case 9:
113
+ _yield$yield$fetch$js = _context.sent;
114
+ items = _yield$yield$fetch$js.items;
115
+
116
+ if (items.length) {
117
+ updatedOffset = parseInt(offset) + parseInt(limit);
118
+ event.target.parentElement.setAttribute("data-collection-offset", updatedOffset);
119
+ }
120
+
121
+ updatedCompList = [].concat(_toConsumableArray(components), [{
122
+ // Passing a number below the initial collection length (which we will not know here)
123
+ // as the second parameter causes the Load More button to be rendered regardless of
124
+ // the value given to `isLoadMoreVisible`. Since this paramter will be ignored anyway,
125
+ // we pass in a number that is sufficiently always larger.
126
+ Component: WithArrowConfig(withSubsequentLoad(Component, limit || 10, true)),
127
+ props: {
128
+ collection: {
129
+ items: items
130
+ },
131
+ isLoadMoreVisible: false,
132
+ config: config
133
+ },
134
+ componentName: componentName
135
+ }]);
136
+ setComponents(updatedCompList);
137
+
138
+ case 14:
139
+ case "end":
140
+ return _context.stop();
141
+ }
142
+ }
143
+ }, _callee);
144
+ }));
145
+
146
+ return function addComponent(_x) {
147
+ return _ref2.apply(this, arguments);
148
+ };
149
+ }();
150
+
151
+ if (!showButton) return null;
152
+ /* TODO: !HACK! Remove this line post deployment */
153
+
154
+ var componentStyles = function componentStyles(componentName) {
155
+ return componentName === "ArrowOneColStoryList" ? {
156
+ marginLeft: 0
157
+ } : {};
158
+ };
159
+
160
+ return /*#__PURE__*/React.createElement(React.Fragment, null, components.map(function (_ref3, index) {
161
+ var Component = _ref3.Component,
162
+ props = _ref3.props;
163
+ return /*#__PURE__*/React.createElement("div", {
164
+ style: {
165
+ maxWidth: 1172,
166
+ margin: "auto"
167
+ },
168
+ key: "extendedLoadMoreBase-key-".concat(index)
169
+ }, /*#__PURE__*/React.createElement(Suspense, {
170
+ fallback: /*#__PURE__*/React.createElement("div", null, "Loading...")
171
+ }, /*#__PURE__*/React.createElement(Component, props)));
172
+ }), /*#__PURE__*/React.createElement("div", {
173
+ style: componentStyles(componentName),
174
+ onClick: addComponent,
175
+ className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap)
176
+ }, btnText));
177
+ };
178
+ ExtendedLoadMore.propTypes = {
179
+ componentName: PropTypes.string,
180
+ config: PropTypes.object,
181
+ WithArrowConfig: PropTypes.func,
182
+ withSubsequentLoad: PropTypes.func
183
+ };
@@ -0,0 +1,33 @@
1
+ .image-position {
2
+ position: absolute;
3
+ top: 0;
4
+ right: 0;
5
+ left: 0;
6
+ bottom: 0;
7
+ }
8
+
9
+ .image {
10
+ composes: image-position;
11
+ background: var(--fallback-img);
12
+ }
13
+
14
+ .image::after {
15
+ content: "";
16
+ position: absolute;
17
+ top: 0;
18
+ right: 0;
19
+ left: 0;
20
+ bottom: 0;
21
+ /* background: linear-gradient(0deg, rgba(0, 0, 0, 0.3), transparent 50%, transparent); */
22
+ }
23
+
24
+ .fallback-svg svg {
25
+ object-fit: cover;
26
+ position: absolute;
27
+ top: 0;
28
+ right: 0;
29
+ bottom: 0;
30
+ left: 50%;
31
+ transform: translateX(-50%);
32
+ height: 100%;
33
+ }
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import { ImageFallbackIcon } from "../../Svgs/fallbackImage";
4
+ import { Link } from "@quintype/components";
5
+ import "./fallback.m.css";
6
+
7
+ var imageFallback = function imageFallback() {
8
+ return /*#__PURE__*/React.createElement("div", {
9
+ className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
10
+ }, /*#__PURE__*/React.createElement("figure", {
11
+ className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
12
+ }, /*#__PURE__*/React.createElement(ImageFallbackIcon, null)));
13
+ };
14
+
15
+ export var FallbackImage = function FallbackImage(_ref) {
16
+ var slug = _ref.slug;
17
+
18
+ if (slug) {
19
+ return /*#__PURE__*/React.createElement(Link, {
20
+ href: slug,
21
+ "aria-label": "image-fallback"
22
+ }, imageFallback());
23
+ } else {
24
+ return imageFallback();
25
+ }
26
+ };
27
+ FallbackImage.propTypes = {
28
+ slug: PropTypes.string
29
+ };
@@ -0,0 +1,7 @@
1
+ # Headline
2
+
3
+ ## Usage
4
+ ```jsx
5
+ <Headline story={story} headerLevel={1} />
6
+ ```
7
+ <!-- PROPS -->
@@ -0,0 +1,26 @@
1
+ @custom-media --viewport-medium (width >= 768px);
2
+
3
+ .wrapper {
4
+ margin-bottom: 6px;
5
+ }
6
+
7
+ .headline {
8
+ margin-bottom: var(--arrow-spacing-xxs);
9
+ color: var(--arrow-c-mono2);
10
+ font-weight: var(--arrow-fw-semi-bold);
11
+ @media (--viewport-medium) {
12
+ margin-bottom: var(--arrow-spacing-xs);
13
+ }
14
+ }
15
+
16
+ .wrapper .headline {
17
+ display: inline;
18
+ margin-bottom: var(--arrow-spacing-xs);
19
+ }
20
+
21
+ .dark {
22
+ color: var(--arrow-c-mono2);
23
+ }
24
+ .light {
25
+ color: var(--arrow-c-invert-mono2);
26
+ }
@@ -0,0 +1,97 @@
1
+ import _getClassName from "babel-plugin-react-css-modules/dist/browser/getClassName";
2
+ import React from "react";
3
+ import PropTypes from "prop-types";
4
+ import { Link } from "@quintype/components";
5
+ import { useStateValue } from "../../SharedContext";
6
+ import { get } from "lodash";
7
+ import { getTextColor, isExternalStory, getStoryUrl } from "../../../utils/utils";
8
+ import { PremiumStoryIcon } from "../PremiumStoryIcon";
9
+ import LiveIcon from "../../Svgs/liveicon";
10
+ import "./headline.m.css";
11
+ var _styleModuleImportMap = {
12
+ "./headline.m.css": {
13
+ "wrapper": "headline-m_wrapper__3nUmh",
14
+ "headline": "headline-m_headline__3_NhV",
15
+ "dark": "headline-m_dark__en3hW",
16
+ "light": "headline-m_light__3lKJB"
17
+ }
18
+ };
19
+ export var Headline = function Headline(_ref) {
20
+ var story = _ref.story,
21
+ headerLevel = _ref.headerLevel,
22
+ _ref$premiumStoryIcon = _ref.premiumStoryIconConfig,
23
+ premiumStoryIconConfig = _ref$premiumStoryIcon === void 0 ? {} : _ref$premiumStoryIcon,
24
+ isLink = _ref.isLink;
25
+ var configData = useStateValue() || {};
26
+ var _premiumStoryIconConf = premiumStoryIconConfig.iconColor,
27
+ iconColor = _premiumStoryIconConf === void 0 ? "#F7B500" : _premiumStoryIconConf,
28
+ _premiumStoryIconConf2 = premiumStoryIconConfig.iconStyle,
29
+ iconStyle = _premiumStoryIconConf2 === void 0 ? "star" : _premiumStoryIconConf2,
30
+ _premiumStoryIconConf3 = premiumStoryIconConfig.enablePremiumStoryIcon,
31
+ enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
32
+ _premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
33
+ showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
34
+ var alternateHeadline = get(story, ["alternative", "home", "default", "headline"]);
35
+ var premiumStory = enablePremiumStoryIcon && get(story, ["access"]) === "subscription";
36
+ var headline = alternateHeadline || story.headline;
37
+ var HeaderTag = "h" + headerLevel;
38
+
39
+ var positionHeadline = function positionHeadline() {
40
+ switch (parseInt(headerLevel)) {
41
+ case 1:
42
+ return "-2px";
43
+
44
+ case 2:
45
+ return "2px";
46
+
47
+ case 3:
48
+ return "4px";
49
+
50
+ case 4:
51
+ return "5px";
52
+
53
+ default:
54
+ return "6px";
55
+ }
56
+ };
57
+
58
+ var textColor = getTextColor(configData.theme);
59
+ var wrapperClass = premiumStory ? "wrapper" : "";
60
+ var iconSize = "24px";
61
+ var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get(story, ["metadata", "is-closed"], false);
62
+ return /*#__PURE__*/React.createElement("div", {
63
+ "data-test-id": "headline",
64
+ className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap)
65
+ }, premiumStory && /*#__PURE__*/React.createElement(PremiumStoryIcon, {
66
+ width: iconSize,
67
+ height: iconSize,
68
+ color: iconColor,
69
+ iconType: iconStyle,
70
+ positionTop: positionHeadline()
71
+ }), isLink ? /*#__PURE__*/React.createElement(Link, {
72
+ href: getStoryUrl(story, "/".concat(story.slug)),
73
+ externalLink: isExternalStory(story),
74
+ "aria-label": "headline"
75
+ }, /*#__PURE__*/React.createElement(HeaderTag, {
76
+ className: _getClassName("headline ".concat(textColor), _styleModuleImportMap)
77
+ }, enableLiveIcon && /*#__PURE__*/React.createElement(LiveIcon, null), headline)) : /*#__PURE__*/React.createElement(HeaderTag, {
78
+ className: _getClassName("headline ".concat(textColor), _styleModuleImportMap)
79
+ }, enableLiveIcon && /*#__PURE__*/React.createElement(LiveIcon, null), headline));
80
+ };
81
+ Headline.propTypes = {
82
+ /** The Story Object from the API response */
83
+ story: PropTypes.object.isRequired,
84
+
85
+ /** Header tags ranging h1-h6, where h[headerLevel] */
86
+ headerLevel: PropTypes.string,
87
+ premiumStoryIconConfig: PropTypes.shape({
88
+ iconColor: PropTypes.string,
89
+ iconType: PropTypes.string,
90
+ enablePremiumStoryIcon: PropTypes.bool
91
+ }),
92
+ isLink: PropTypes.bool
93
+ };
94
+ Headline.defaultProps = {
95
+ headerLevel: "6",
96
+ isLink: true
97
+ };
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+ import { generateStory } from "../../Fixture";
3
+ import { optionalSelect, withStore } from "../../../../storybook";
4
+ import { Headline } from "./index";
5
+ import Readme from "./README.md";
6
+ import { boolean as _boolean, color } from "@storybook/addon-knobs";
7
+ var story = generateStory();
8
+ var headerLevelOptions = {
9
+ "No Value": "",
10
+ h1: 1,
11
+ h2: 2,
12
+ h3: 3,
13
+ h4: 4,
14
+ h5: 5,
15
+ h6: 6
16
+ };
17
+ var iconType = {
18
+ Star: "star",
19
+ Crown: "crown",
20
+ Lock: "lock",
21
+ Key: "key"
22
+ };
23
+ withStore("Atoms/Headline", {
24
+ qt: {
25
+ config: {
26
+ "cdn-image": "thumbor-stg.assettype.com"
27
+ }
28
+ }
29
+ }, Readme).add("default", function () {
30
+ return /*#__PURE__*/React.createElement(Headline, {
31
+ story: story,
32
+ headerLevel: optionalSelect("Header level", headerLevelOptions),
33
+ premiumStoryIconConfig: {
34
+ iconColor: color("Icon color", "#F7B500"),
35
+ iconStyle: optionalSelect("Icon Types", iconType),
36
+ enablePremiumStoryIcon: _boolean("Enable Premium Icon", true)
37
+ }
38
+ });
39
+ }, Readme);
@@ -0,0 +1,13 @@
1
+ # HeroImage
2
+ Displays the Hero Image for a story with the help of the `ResponsiveHeroImage` component from the `@quintype/components` package.
3
+
4
+ ## Usage
5
+ ```jsx
6
+ <HeroImage story={story} />
7
+ ```
8
+
9
+ ```jsx
10
+ <HeroImage story={story} FullBleed={false} />
11
+ ```
12
+
13
+ <!-- PROPS -->
@@ -0,0 +1,72 @@
1
+ @custom-media --viewport-medium (width >= 768px);
2
+
3
+ .hero-image {
4
+ margin-bottom: var(--arrow-spacing-xs);
5
+ padding-right: 0;
6
+ flex-grow: 1;
7
+ position: relative;
8
+ }
9
+ .right-padding {
10
+ margin-bottom: 0;
11
+ padding-right: var(--arrow-spacing-s);
12
+ flex-grow: 1;
13
+ }
14
+
15
+ .left-padding {
16
+ margin-bottom: 0;
17
+ padding-left: var(--arrow-spacing-s);
18
+ flex-grow: 1;
19
+ }
20
+
21
+ .right-padding-mob {
22
+ margin-bottom: 0;
23
+ padding-right: var(--arrow-spacing-s);
24
+ flex-grow: 1;
25
+ flex-basis: 30%;
26
+ @media (--viewport-medium) {
27
+ padding-right: 0;
28
+ margin-bottom: var(--arrow-spacing-xs);
29
+ }
30
+ }
31
+
32
+ .placeholder {
33
+ background-color: lightgray;
34
+ }
35
+
36
+ html[dir="rtl"] {
37
+ .right-padding,
38
+ .right-padding-mob {
39
+ padding-right: 0;
40
+ padding-left: var(--arrow-spacing-s);
41
+ }
42
+
43
+ .right-padding-mob {
44
+ @media (--viewport-medium) {
45
+ padding-left: 0;
46
+ }
47
+ }
48
+ }
49
+
50
+ .hero-image-mob {
51
+ margin-bottom: var(--arrow-spacing-xs);
52
+ padding-right: 0;
53
+ flex-grow: 1;
54
+ @media (--viewport-medium) {
55
+ /* margin-bottom: 0; */
56
+ }
57
+ }
58
+ .with-padding {
59
+ padding: 16px 16px 0 16px;
60
+ }
61
+
62
+ .image {
63
+ position: relative;
64
+ }
65
+ .image img {
66
+ position: absolute;
67
+ top: 0;
68
+ bottom: 0;
69
+ left: 0;
70
+ right: 0;
71
+ height: 100%;
72
+ }
@@ -0,0 +1,175 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import _getClassName from "babel-plugin-react-css-modules/dist/browser/getClassName";
3
+ import { Link, ResponsiveHeroImage } from "@quintype/components";
4
+ import { get } from "lodash";
5
+ import PropTypes from "prop-types";
6
+ import React from "react";
7
+ import { useSelector } from "react-redux";
8
+ import { clientWidth, isExternalStory, getStoryUrl } from "../../../utils/utils";
9
+ import { useStateValue } from "../../SharedContext";
10
+ import { FallbackImage } from "../FallbackImage";
11
+ import { HyperLink } from "../Hyperlink";
12
+ import "./hero-image.m.css";
13
+ var _styleModuleImportMap = {
14
+ "./hero-image.m.css": {
15
+ "hero-image": "hero-image-m_hero-image__3lraV",
16
+ "right-padding": "hero-image-m_right-padding__1LkCe",
17
+ "left-padding": "hero-image-m_left-padding__pYRAj",
18
+ "right-padding-mob": "hero-image-m_right-padding-mob__3-uOU",
19
+ "placeholder": "hero-image-m_placeholder__1omCm",
20
+ "hero-image-mob": "hero-image-m_hero-image-mob__13JJp",
21
+ "with-padding": "hero-image-m_with-padding__324G_",
22
+ "image": "hero-image-m_image__1mz0U"
23
+ }
24
+ };
25
+ export var HeroImage = function HeroImage(_ref) {
26
+ var story = _ref.story,
27
+ FullBleed = _ref.FullBleed,
28
+ aspectRatio = _ref.aspectRatio,
29
+ defaultWidth = _ref.defaultWidth,
30
+ widths = _ref.widths,
31
+ isHorizontal = _ref.isHorizontal,
32
+ isHorizontalMobile = _ref.isHorizontalMobile,
33
+ isHorizontalWithImageLast = _ref.isHorizontalWithImageLast,
34
+ defaultFallback = _ref.defaultFallback,
35
+ isStoryPageImage = _ref.isStoryPageImage,
36
+ config = _ref.config;
37
+
38
+ var _ref2 = useStateValue() || {},
39
+ _ref2$fallbackImageUr = _ref2.fallbackImageUrl,
40
+ fallbackImageUrl = _ref2$fallbackImageUr === void 0 ? "" : _ref2$fallbackImageUr;
41
+
42
+ var _config$StoryTemplate = config.StoryTemplateIcon,
43
+ StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
44
+ return null;
45
+ } : _config$StoryTemplate;
46
+ var showImagePlaceholder = useSelector(function (state) {
47
+ return get(state, ["qt", "config", "showPlaceholder"]);
48
+ });
49
+ var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
50
+ var fullBleed = FullBleed ? "" : "with-padding";
51
+ var heroImageClass = "hero-image";
52
+ if (isHorizontal) heroImageClass = "right-padding";else if (isHorizontalWithImageLast) heroImageClass = "left-padding";
53
+ var heroImageMobClasses = isHorizontalMobile ? "right-padding-mob" : "";
54
+
55
+ var getPadding = function getPadding(aspectRatio) {
56
+ var _aspectRatio = _slicedToArray(aspectRatio, 2),
57
+ height = _aspectRatio[0],
58
+ width = _aspectRatio[1];
59
+
60
+ if (height > 0 && width > 0) {
61
+ var padding = width / height * 100;
62
+ return padding;
63
+ }
64
+
65
+ return 0;
66
+ };
67
+
68
+ var _aspectRatio2 = _slicedToArray(aspectRatio, 2),
69
+ mobileAspectRatio = _aspectRatio2[0],
70
+ _aspectRatio2$ = _aspectRatio2[1],
71
+ desktopAspectRatio = _aspectRatio2$ === void 0 ? mobileAspectRatio : _aspectRatio2$;
72
+
73
+ var isMobile = clientWidth("mobile");
74
+ var imageAspectRatio = isMobile ? mobileAspectRatio : desktopAspectRatio;
75
+ var imagePadding = isMobile ? getPadding(mobileAspectRatio) : getPadding(desktopAspectRatio);
76
+ var slug = get(story, ["hero-image-s3-key"]) || get(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
77
+ var hyperLink = get(story, ["hero-image-hyperlink"], "");
78
+
79
+ var fallbackImage = function fallbackImage() {
80
+ if (!slug) {
81
+ if (fallbackImageUrl && !isStoryPageImage) {
82
+ return /*#__PURE__*/React.createElement("figure", {
83
+ style: {
84
+ paddingTop: imagePadding + "%"
85
+ },
86
+ className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap)
87
+ }, /*#__PURE__*/React.createElement("img", {
88
+ className: "qt-image",
89
+ "data-src": "".concat(fallbackImageUrl),
90
+ alt: "image-fallback"
91
+ }));
92
+ }
93
+
94
+ return /*#__PURE__*/React.createElement(React.Fragment, null, defaultFallback ? /*#__PURE__*/React.createElement("div", {
95
+ "data-test-id": "arr--fallback-hero-image",
96
+ style: {
97
+ paddingTop: imagePadding + "%"
98
+ },
99
+ className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap)
100
+ }, /*#__PURE__*/React.createElement(StoryTemplateIcon, {
101
+ storyTemplate: story["story-template"]
102
+ }), /*#__PURE__*/React.createElement(FallbackImage, null)) : null);
103
+ }
104
+
105
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("figure", {
106
+ style: {
107
+ paddingTop: imagePadding + "%"
108
+ },
109
+ className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap)
110
+ }, /*#__PURE__*/React.createElement(StoryTemplateIcon, {
111
+ storyTemplate: story["story-template"]
112
+ }), /*#__PURE__*/React.createElement(ResponsiveHeroImage, {
113
+ story: story,
114
+ aspectRatio: imageAspectRatio,
115
+ defaultWidth: defaultWidth,
116
+ widths: widths,
117
+ imgParams: {
118
+ auto: ["format", "compress"],
119
+ fit: "max"
120
+ }
121
+ })), isStoryPageImage && hyperLink && /*#__PURE__*/React.createElement(HyperLink, {
122
+ hyperLink: hyperLink
123
+ }));
124
+ };
125
+
126
+ return story && (isStoryPageImage ? /*#__PURE__*/React.createElement("div", {
127
+ "data-test-id": "arr--hero-image",
128
+ className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap)
129
+ }, fallbackImage()) : /*#__PURE__*/React.createElement(Link, {
130
+ "data-test-id": "arr--hero-image",
131
+ href: getStoryUrl(story, "/".concat(story.slug)),
132
+ externalLink: isExternalStory(story),
133
+ "aria-label": "fallback-hero-image",
134
+ className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap)
135
+ }, fallbackImage()));
136
+ };
137
+ HeroImage.propTypes = {
138
+ /** The Story Object from the API response */
139
+ story: PropTypes.object.isRequired,
140
+
141
+ /** Removes the Hero Image padding for the image to bleed over the margin */
142
+ FullBleed: PropTypes.bool,
143
+
144
+ /** The default width for the image, in case the browser does not support srcset */
145
+ defaultWidth: PropTypes.number,
146
+
147
+ /** The list of available widths */
148
+ widths: PropTypes.array,
149
+ // fatch the correct hero image
150
+ aspectRatio: PropTypes.array,
151
+ // Hints for the browser to choose the best size
152
+
153
+ /** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
154
+ isHorizontal: PropTypes.bool,
155
+
156
+ /** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
157
+ isHorizontalMobile: PropTypes.bool,
158
+ // this prop is responsive for rendering fallback image on story page
159
+ defaultFallback: PropTypes.bool,
160
+ isHorizontalWithImageLast: PropTypes.bool,
161
+ isStoryPageImage: PropTypes.bool,
162
+ config: PropTypes.object
163
+ };
164
+ HeroImage.defaultProps = {
165
+ FullBleed: true,
166
+ aspectRatio: [[1, 1], [16, 9]],
167
+ defaultWidth: 480,
168
+ widths: [250, 480, 640],
169
+ isHorizontal: false,
170
+ isHorizontalMobile: false,
171
+ defaultFallback: true,
172
+ isStoryPageImage: false,
173
+ isHorizontalWithImageLast: false,
174
+ config: {}
175
+ };