@explorer-1/vue 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/components.d.ts +215 -0
  4. package/index.html +18 -0
  5. package/lib/main.ts +78 -0
  6. package/package.json +54 -0
  7. package/postcss.config.js +7 -0
  8. package/public/edu/.gitkeep +0 -0
  9. package/public/edu/explorer-1/bg-stars-edu.png +0 -0
  10. package/public/edu/explorer-1/bg-stars.jpg +0 -0
  11. package/public/explorer-1/bg-stars-edu.png +0 -0
  12. package/public/explorer-1/bg-stars.jpg +0 -0
  13. package/src/App.vue +30 -0
  14. package/src/assets/fonts/README.md +12 -0
  15. package/src/assets/fonts/archivo-narrow/ArchivoNarrow-Bold.woff2 +0 -0
  16. package/src/assets/fonts/archivo-narrow/ArchivoNarrow-BoldItalic.woff2 +0 -0
  17. package/src/assets/fonts/archivo-narrow/ArchivoNarrow-SemiBold.woff2 +0 -0
  18. package/src/assets/fonts/archivo-narrow/ArchivoNarrow-SemiBoldItalic.woff2 +0 -0
  19. package/src/assets/fonts/metropolis/Metropolis-Bold.woff2 +0 -0
  20. package/src/assets/fonts/metropolis/Metropolis-BoldItalic.woff2 +0 -0
  21. package/src/assets/fonts/metropolis/Metropolis-ExtraBold.woff2 +0 -0
  22. package/src/assets/fonts/metropolis/Metropolis-Medium.woff2 +0 -0
  23. package/src/assets/fonts/metropolis/Metropolis-MediumItalic.woff2 +0 -0
  24. package/src/assets/fonts/metropolis/Metropolis-Regular.woff2 +0 -0
  25. package/src/assets/fonts/metropolis/Metropolis-RegularItalic.woff2 +0 -0
  26. package/src/assets/fonts/metropolis/Metropolis-SemiBold.woff2 +0 -0
  27. package/src/assets/fonts/metropolis/Metropolis-SemiBoldItalic.woff2 +0 -0
  28. package/src/assets/scss/styles.scss +1 -0
  29. package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.stories.js +156 -0
  30. package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.vue +156 -0
  31. package/src/components/BackToTop/BackToTop.stories.js +24 -0
  32. package/src/components/BackToTop/BackToTop.vue +76 -0
  33. package/src/components/BaseAudio/BaseAudio.stories.js +29 -0
  34. package/src/components/BaseAudio/BaseAudio.vue +359 -0
  35. package/src/components/BaseButton/BaseButton.stories.ts +65 -0
  36. package/src/components/BaseButton/BaseButton.vue +114 -0
  37. package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.stories.mdx +68 -0
  38. package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue +101 -0
  39. package/src/components/BaseHeading/BaseHeading.stories.js +75 -0
  40. package/src/components/BaseHeading/BaseHeading.vue +58 -0
  41. package/src/components/BaseImage/BaseImage.stories.ts +52 -0
  42. package/src/components/BaseImage/BaseImage.vue +120 -0
  43. package/src/components/BaseImageCaption/BaseImageCaption.stories.js +27 -0
  44. package/src/components/BaseImageCaption/BaseImageCaption.vue +51 -0
  45. package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.stories.js +73 -0
  46. package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.vue +90 -0
  47. package/src/components/BaseLightboxCloseButton/BaseLightboxCloseButton.vue +45 -0
  48. package/src/components/BaseLightboxOpenButton/BaseLightboxOpenButton.vue +46 -0
  49. package/src/components/BaseLink/BaseLink.stories.js +47 -0
  50. package/src/components/BaseLink/BaseLink.vue +227 -0
  51. package/src/components/BaseModal/BaseModal.stories.js +90 -0
  52. package/src/components/BaseModal/BaseModal.vue +54 -0
  53. package/src/components/BaseModal/BaseModalDialog.vue +59 -0
  54. package/src/components/BasePlaceholder/BasePlaceholder.stories.js +29 -0
  55. package/src/components/BasePlaceholder/BasePlaceholder.vue +30 -0
  56. package/src/components/BaseRadioGroup/BaseRadioGroup.stories.mdx +68 -0
  57. package/src/components/BaseRadioGroup/BaseRadioGroup.vue +102 -0
  58. package/src/components/BaseSwimlane/BaseSwimlane.stories.mdx +64 -0
  59. package/src/components/BaseSwimlane/BaseSwimlane.vue +204 -0
  60. package/src/components/BaseTag/BaseTag.stories.js +34 -0
  61. package/src/components/BaseTag/BaseTag.vue +36 -0
  62. package/src/components/BaseTimer/BaseTimer.stories.js +78 -0
  63. package/src/components/BaseTimer/BaseTimer.test.js +15 -0
  64. package/src/components/BaseTimer/BaseTimer.vue +270 -0
  65. package/src/components/BaseUnitToggle/BaseUnitToggle.stories.js +86 -0
  66. package/src/components/BaseUnitToggle/BaseUnitToggle.test.js +26 -0
  67. package/src/components/BaseUnitToggle/BaseUnitToggle.vue +255 -0
  68. package/src/components/BaseVideo/BaseVideo.stories.js +31 -0
  69. package/src/components/BaseVideo/BaseVideo.vue +73 -0
  70. package/src/components/BlockAnchor/BlockAnchor.vue +38 -0
  71. package/src/components/BlockAudio/BlockAudio.stories.js +29 -0
  72. package/src/components/BlockAudio/BlockAudio.vue +78 -0
  73. package/src/components/BlockCard/BlockCard.stories.js +24 -0
  74. package/src/components/BlockCard/BlockCard.vue +88 -0
  75. package/src/components/BlockCardGroup/BlockCardGroup.stories.js +71 -0
  76. package/src/components/BlockCardGroup/BlockCardGroup.vue +61 -0
  77. package/src/components/BlockCircleImageCard/BlockCircleImageCard.stories.js +55 -0
  78. package/src/components/BlockCircleImageCard/BlockCircleImageCard.vue +120 -0
  79. package/src/components/BlockCta/BlockCta.stories.js +35 -0
  80. package/src/components/BlockCta/BlockCta.vue +55 -0
  81. package/src/components/BlockHeading/BlockHeading.stories.js +22 -0
  82. package/src/components/BlockHeading/BlockHeading.vue +27 -0
  83. package/src/components/BlockIframeEmbed/BlockIframeEmbed.stories.js +40 -0
  84. package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +84 -0
  85. package/src/components/BlockImage/BlockImage.stories.js +137 -0
  86. package/src/components/BlockImage/BlockImage.vue +48 -0
  87. package/src/components/BlockImage/BlockImageFullBleed.vue +119 -0
  88. package/src/components/BlockImage/BlockImageStandard.vue +106 -0
  89. package/src/components/BlockImageCarousel/BlockImageCarousel.stories.js +108 -0
  90. package/src/components/BlockImageCarousel/BlockImageCarousel.vue +201 -0
  91. package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.stories.js +63 -0
  92. package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +120 -0
  93. package/src/components/BlockImageComparison/BlockImageComparison.stories.js +46 -0
  94. package/src/components/BlockImageComparison/BlockImageComparison.vue +59 -0
  95. package/src/components/BlockImageGallery/BlockImageGallery.stories.js +55 -0
  96. package/src/components/BlockImageGallery/BlockImageGallery.vue +128 -0
  97. package/src/components/BlockInlineImage/BlockInlineImage.stories.js +68 -0
  98. package/src/components/BlockInlineImage/BlockInlineImage.vue +124 -0
  99. package/src/components/BlockKeyPoints/BlockKeyPoints.stories.js +28 -0
  100. package/src/components/BlockKeyPoints/BlockKeyPoints.vue +48 -0
  101. package/src/components/BlockLinkCard/BlockLinkCard.stories.js +102 -0
  102. package/src/components/BlockLinkCard/BlockLinkCard.vue +197 -0
  103. package/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.js +217 -0
  104. package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +68 -0
  105. package/src/components/BlockLinkTile/BlockLinkTile.stories.js +72 -0
  106. package/src/components/BlockLinkTile/BlockLinkTile.vue +193 -0
  107. package/src/components/BlockListCards/BlockListCards.stories.js +69 -0
  108. package/src/components/BlockListCards/BlockListCards.vue +129 -0
  109. package/src/components/BlockQuote/BlockQuote.stories.js +84 -0
  110. package/src/components/BlockQuote/BlockQuote.vue +87 -0
  111. package/src/components/BlockRelatedLinks/BlockRelatedLinks.stories.js +60 -0
  112. package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +77 -0
  113. package/src/components/BlockRelatedLinks/RelatedLink.vue +85 -0
  114. package/src/components/BlockStreamfield/BlockStreamfield.stories.js +88 -0
  115. package/src/components/BlockStreamfield/BlockStreamfield.vue +333 -0
  116. package/src/components/BlockTable/BlockTable.stories.js +20 -0
  117. package/src/components/BlockTable/BlockTable.vue +73 -0
  118. package/src/components/BlockTeaser/BlockTeaser.stories.js +74 -0
  119. package/src/components/BlockTeaser/BlockTeaser.test.js +12 -0
  120. package/src/components/BlockTeaser/BlockTeaser.vue +174 -0
  121. package/src/components/BlockText/BlockText.stories.js +21 -0
  122. package/src/components/BlockText/BlockText.vue +44 -0
  123. package/src/components/BlockTwitterEmbed/BlockTwitterEmbed.stories.js +19 -0
  124. package/src/components/BlockTwitterEmbed/BlockTwitterEmbed.vue +61 -0
  125. package/src/components/BlockVideo/BlockVideo.stories.js +23 -0
  126. package/src/components/BlockVideo/BlockVideo.vue +41 -0
  127. package/src/components/BlockVideoEmbed/BlockVideoEmbed.stories.js +20 -0
  128. package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +71 -0
  129. package/src/components/CalendarButton/CalendarButton.stories.js +36 -0
  130. package/src/components/CalendarButton/CalendarButton.vue +86 -0
  131. package/src/components/DetailHeadline/DetailHeadline.stories.js +48 -0
  132. package/src/components/DetailHeadline/DetailHeadline.vue +143 -0
  133. package/src/components/DsnWidget/DsnWidget.stories.js +29 -0
  134. package/src/components/DsnWidget/DsnWidget.vue +96 -0
  135. package/src/components/EventCard/EventCard.vue +188 -0
  136. package/src/components/EventDetailHero/EventDetailHero.stories.js +53 -0
  137. package/src/components/EventDetailHero/EventDetailHero.vue +64 -0
  138. package/src/components/FormContact/FormContact.stories.js +16 -0
  139. package/src/components/FormContact/FormContact.vue +202 -0
  140. package/src/components/FormNewsletterSignup/FormNewsletterSignup.stories.js +16 -0
  141. package/src/components/FormNewsletterSignup/FormNewsletterSignup.vue +355 -0
  142. package/src/components/HeroLarge/HeroLarge.stories.js +46 -0
  143. package/src/components/HeroLarge/HeroLarge.vue +93 -0
  144. package/src/components/HeroListingIndex/HeroListingIndex.stories.js +156 -0
  145. package/src/components/HeroListingIndex/HeroListingIndex.vue +80 -0
  146. package/src/components/HeroMedia/HeroMedia.stories.js +135 -0
  147. package/src/components/HeroMedia/HeroMedia.vue +174 -0
  148. package/src/components/HeroMedium/HeroMedium.stories.js +73 -0
  149. package/src/components/HeroMedium/HeroMedium.vue +166 -0
  150. package/src/components/HomepageCarousel/HomepageCarousel.stories.js +112 -0
  151. package/src/components/HomepageCarousel/HomepageCarousel.vue +382 -0
  152. package/src/components/HomepageCarouselItem/HomepageCarouselItem.stories.js +60 -0
  153. package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +168 -0
  154. package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.stories.js +35 -0
  155. package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.vue +39 -0
  156. package/src/components/HomepageFeaturedRobot/HomepageFeaturedRobot.stories.js +93 -0
  157. package/src/components/HomepageFeaturedRobot/HomepageFeaturedRobot.vue +129 -0
  158. package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.stories.js +153 -0
  159. package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.vue +282 -0
  160. package/src/components/HomepageMissionsCarousel/HomepageMissionsCarouselItem.vue +143 -0
  161. package/src/components/HomepageStats/HomepageStats.stories.js +155 -0
  162. package/src/components/HomepageStats/HomepageStats.vue +362 -0
  163. package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.stories.js +90 -0
  164. package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.vue +156 -0
  165. package/src/components/HomepageTeaserBlock/HomepageTeaserBlockCardImage.vue +58 -0
  166. package/src/components/Icons/Icon360.vue +29 -0
  167. package/src/components/Icons/IconArrow.vue +26 -0
  168. package/src/components/Icons/IconArrows.vue +43 -0
  169. package/src/components/Icons/IconAudio.vue +27 -0
  170. package/src/components/Icons/IconBook.vue +21 -0
  171. package/src/components/Icons/IconBookUser.vue +21 -0
  172. package/src/components/Icons/IconBriefcase.vue +21 -0
  173. package/src/components/Icons/IconCalendar.vue +25 -0
  174. package/src/components/Icons/IconCaret.vue +26 -0
  175. package/src/components/Icons/IconCheckbox.vue +26 -0
  176. package/src/components/Icons/IconCheckboxSelected.vue +35 -0
  177. package/src/components/Icons/IconClose.vue +27 -0
  178. package/src/components/Icons/IconCloseLightbox.vue +25 -0
  179. package/src/components/Icons/IconDownload.vue +31 -0
  180. package/src/components/Icons/IconDropdown.vue +25 -0
  181. package/src/components/Icons/IconEnvelope.vue +21 -0
  182. package/src/components/Icons/IconExpand.vue +28 -0
  183. package/src/components/Icons/IconExternal.vue +25 -0
  184. package/src/components/Icons/IconFilter.vue +25 -0
  185. package/src/components/Icons/IconForwardTen.vue +38 -0
  186. package/src/components/Icons/IconGrid.vue +25 -0
  187. package/src/components/Icons/IconHand.vue +21 -0
  188. package/src/components/Icons/IconInfo.vue +26 -0
  189. package/src/components/Icons/IconLink.vue +27 -0
  190. package/src/components/Icons/IconList.vue +25 -0
  191. package/src/components/Icons/IconLocation.vue +37 -0
  192. package/src/components/Icons/IconMagnifyingGlass.vue +21 -0
  193. package/src/components/Icons/IconMedal.vue +21 -0
  194. package/src/components/Icons/IconMenu.vue +27 -0
  195. package/src/components/Icons/IconMinus.vue +26 -0
  196. package/src/components/Icons/IconMute.vue +27 -0
  197. package/src/components/Icons/IconNext.vue +25 -0
  198. package/src/components/Icons/IconPause.vue +28 -0
  199. package/src/components/Icons/IconPlay.vue +28 -0
  200. package/src/components/Icons/IconPlus.vue +25 -0
  201. package/src/components/Icons/IconPrev.vue +25 -0
  202. package/src/components/Icons/IconRewindTen.vue +42 -0
  203. package/src/components/Icons/IconSearch.vue +25 -0
  204. package/src/components/Icons/IconShare.vue +30 -0
  205. package/src/components/Icons/IconSlideshow.vue +30 -0
  206. package/src/components/Icons/IconSocialEmail.vue +26 -0
  207. package/src/components/Icons/IconSocialFacebook.vue +26 -0
  208. package/src/components/Icons/IconSocialGoogleClassroom.vue +26 -0
  209. package/src/components/Icons/IconSocialInstagram.vue +35 -0
  210. package/src/components/Icons/IconSocialPinterest.vue +26 -0
  211. package/src/components/Icons/IconSocialReddit.vue +25 -0
  212. package/src/components/Icons/IconSocialTwitter.vue +25 -0
  213. package/src/components/Icons/IconSocialYoutube.vue +35 -0
  214. package/src/components/Icons/IconStop.vue +27 -0
  215. package/src/components/Icons/IconTime.vue +25 -0
  216. package/src/components/Icons/IconUniversity.vue +21 -0
  217. package/src/components/Icons/IconUser.vue +26 -0
  218. package/src/components/Icons/IconVolume.vue +27 -0
  219. package/src/components/Icons/Icons.stories.ts +440 -0
  220. package/src/components/ImageDetailContextImage/ImageDetailContextImage.vue +125 -0
  221. package/src/components/LayoutHelper/LayoutHelper.vue +38 -0
  222. package/src/components/LoadingTransition/LoadingTransition.vue +48 -0
  223. package/src/components/LogoCaltech/LogoCaltech.stories.js +39 -0
  224. package/src/components/LogoCaltech/LogoCaltech.vue +29 -0
  225. package/src/components/LogoTribrand/LogoTribrand.stories.js +76 -0
  226. package/src/components/LogoTribrand/LogoTribrand.vue +93 -0
  227. package/src/components/MissionDetailAbout/MissionDetailAbout.stories.js +70 -0
  228. package/src/components/MissionDetailAbout/MissionDetailAbout.vue +204 -0
  229. package/src/components/MissionDetailHero/MissionDetailHero.stories.js +303 -0
  230. package/src/components/MissionDetailHero/MissionDetailHero.vue +292 -0
  231. package/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.js +278 -0
  232. package/src/components/MissionDetailHighlights/MissionDetailHighlights.vue +332 -0
  233. package/src/components/MissionDetailHighlights/MissionDetailHighlightsCarousel.vue +160 -0
  234. package/src/components/MissionDetailHighlights/MissionDetailHighlightsCarouselItem.vue +123 -0
  235. package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.stories.js +43 -0
  236. package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.vue +97 -0
  237. package/src/components/MissionDetailStats/DistanceStats.test.js +133 -0
  238. package/src/components/MissionDetailStats/DistanceStats.vue +250 -0
  239. package/src/components/MissionDetailStats/MissionDetailStats.stories.js +95 -0
  240. package/src/components/MissionDetailStats/MissionDetailStats.test.js +23 -0
  241. package/src/components/MissionDetailStats/MissionDetailStats.vue +187 -0
  242. package/src/components/MissionDetailStats/MissionDetailStatsMicro.vue +52 -0
  243. package/src/components/MissionDetailStats/MissionDetailStatsMini.vue +109 -0
  244. package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.stories.js +55 -0
  245. package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.vue +95 -0
  246. package/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.ts +24 -0
  247. package/src/components/MixinAnimationCaret/MixinAnimationCaret.vue +81 -0
  248. package/src/components/MixinCarousel/MixinCarousel.docs.mdx +33 -0
  249. package/src/components/MixinCarousel/MixinCarousel.stories.js +53 -0
  250. package/src/components/MixinCarousel/MixinCarousel.vue +236 -0
  251. package/src/components/MixinDropdownToggle/MixinDropdownToggle.vue +53 -0
  252. package/src/components/MixinFancybox/MixinFancybox.vue +405 -0
  253. package/src/components/MixinFancybox/MixinFancyboxOpenButton.vue +35 -0
  254. package/src/components/MixinVideoBg/MixinVideoBg.stories.js +23 -0
  255. package/src/components/MixinVideoBg/MixinVideoBg.vue +39 -0
  256. package/src/components/NavDesktop/NavDesktop.stories.js +254 -0
  257. package/src/components/NavDesktop/NavDesktop.vue +355 -0
  258. package/src/components/NavDesktop/NavDesktopDropdown.vue +201 -0
  259. package/src/components/NavDesktop/NavDesktopDropdownContent.vue +87 -0
  260. package/src/components/NavDesktop/NavDesktopDropdownMore.vue +112 -0
  261. package/src/components/NavDesktop/NavDesktopTopHat.vue +56 -0
  262. package/src/components/NavHeading/NavHeading.stories.js +23 -0
  263. package/src/components/NavHeading/NavHeading.vue +40 -0
  264. package/src/components/NavHighlight/NavHighlight.stories.js +42 -0
  265. package/src/components/NavHighlight/NavHighlight.vue +67 -0
  266. package/src/components/NavLinkList/NavLinkList.stories.js +46 -0
  267. package/src/components/NavLinkList/NavLinkList.vue +66 -0
  268. package/src/components/NavLogoLinks/NavLogoLinks.stories.js +22 -0
  269. package/src/components/NavLogoLinks/NavLogoLinks.vue +57 -0
  270. package/src/components/NavMobile/NavMobile.stories.js +231 -0
  271. package/src/components/NavMobile/NavMobile.vue +280 -0
  272. package/src/components/NavMobile/NavMobileDropdown.vue +175 -0
  273. package/src/components/NavMobile/NavMobileLink.vue +69 -0
  274. package/src/components/NavMobile/NavMobileSecondaryDropdown.vue +124 -0
  275. package/src/components/NavSearchForm/NavSearchForm.stories.js +13 -0
  276. package/src/components/NavSearchForm/NavSearchForm.vue +102 -0
  277. package/src/components/NavSecondary/NavSecondary.stories.js +24 -0
  278. package/src/components/NavSecondary/NavSecondary.vue +191 -0
  279. package/src/components/NavSecondary/NavSecondaryDropdown.vue +181 -0
  280. package/src/components/NavSecondary/NavSecondaryDropdownContent.vue +140 -0
  281. package/src/components/NavSecondary/NavSecondaryLink.vue +62 -0
  282. package/src/components/NavSocial/NavSocial.stories.js +20 -0
  283. package/src/components/NavSocial/NavSocial.vue +97 -0
  284. package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.stories.js +60 -0
  285. package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.test.js +30 -0
  286. package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.vue +73 -0
  287. package/src/components/ParallaxContainer/ParallaxContainer.stories.js +47 -0
  288. package/src/components/ParallaxContainer/ParallaxContainer.vue +76 -0
  289. package/src/components/ParallaxElement/ParallaxElement.vue +25 -0
  290. package/src/components/PastEventsCarousel/PastEventsCarousel.vue +86 -0
  291. package/src/components/PodcastEpisodeCard/PodcastEpisodeCard.vue +251 -0
  292. package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.stories.js +235 -0
  293. package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.vue +171 -0
  294. package/src/components/ProfileDetailSectionGroup/ProfileDetailSectionGroup.vue +84 -0
  295. package/src/components/RoboticsDetailStats/RoboticsDetailStats.stories.js +97 -0
  296. package/src/components/RoboticsDetailStats/RoboticsDetailStats.test.js +21 -0
  297. package/src/components/RoboticsDetailStats/RoboticsDetailStats.vue +217 -0
  298. package/src/components/RoboticsDetailStats/RoboticsDetailStatsMini.vue +182 -0
  299. package/src/components/SearchFilterGroup/SearchFilterGroup.stories.js +59 -0
  300. package/src/components/SearchFilterGroup/SearchFilterGroup.vue +221 -0
  301. package/src/components/SearchInput/SearchInput.stories.js +35 -0
  302. package/src/components/SearchInput/SearchInput.vue +93 -0
  303. package/src/components/SearchPagination/SearchPagination.stories.js +55 -0
  304. package/src/components/SearchPagination/SearchPagination.vue +173 -0
  305. package/src/components/SearchResultCard/SearchResultCard.stories.js +57 -0
  306. package/src/components/SearchResultCard/SearchResultCard.vue +282 -0
  307. package/src/components/SearchResultGridItem/SearchResultGridItem.stories.js +70 -0
  308. package/src/components/SearchResultGridItem/SearchResultGridItem.vue +140 -0
  309. package/src/components/SearchResultsList/SearchResultsList.vue +183 -0
  310. package/src/components/SearchSelectMenu/SearchSelectMenu.stories.js +25 -0
  311. package/src/components/SearchSelectMenu/SearchSelectMenu.vue +86 -0
  312. package/src/components/ShareButtons/ShareButtons.stories.js +16 -0
  313. package/src/components/ShareButtons/ShareButtons.vue +132 -0
  314. package/src/components/ShareButtonsEdu/ShareButtonsEdu.stories.js +14 -0
  315. package/src/components/ShareButtonsEdu/ShareButtonsEdu.vue +215 -0
  316. package/src/components/SkipLink/SkipLink.stories.js +9 -0
  317. package/src/components/SkipLink/SkipLink.vue +53 -0
  318. package/src/components/SwimlaneCTA/SwimlaneCTA.stories.mdx +77 -0
  319. package/src/components/SwimlaneCTA/SwimlaneCTA.vue +281 -0
  320. package/src/components/TheFooter/TheFooter.stories.js +602 -0
  321. package/src/components/TheFooter/TheFooter.vue +228 -0
  322. package/src/components/TheFooter/TheFooterSignUp.vue +61 -0
  323. package/src/components/ThumbnailCarousel/ThumbnailCarousel.stories.js +106 -0
  324. package/src/components/ThumbnailCarousel/ThumbnailCarousel.vue +76 -0
  325. package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.stories.js +93 -0
  326. package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.vue +68 -0
  327. package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.stories.js +38 -0
  328. package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.vue +104 -0
  329. package/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.stories.js +84 -0
  330. package/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.vue +112 -0
  331. package/src/components/TopicDetailMore/TopicDetailMore.stories.js +221 -0
  332. package/src/components/TopicDetailMore/TopicDetailMore.vue +124 -0
  333. package/src/components/TopicDetailMore/TopicDetailMoreVisibility.vue +51 -0
  334. package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.stories.js +116 -0
  335. package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.vue +130 -0
  336. package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.stories.js +34 -0
  337. package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.vue +98 -0
  338. package/src/components/YearTicker/YearTicker.stories.js +37 -0
  339. package/src/components/YearTicker/YearTicker.vue +132 -0
  340. package/src/docs/foundation/DynamicTokens.vue +106 -0
  341. package/src/docs/foundation/FontVariants.vue +80 -0
  342. package/src/docs/foundation/color.docs.mdx +112 -0
  343. package/src/docs/foundation/grid.docs.mdx +189 -0
  344. package/src/docs/foundation/grid.stories.js +263 -0
  345. package/src/docs/foundation/grid_layouthelpers.docs.mdx +78 -0
  346. package/src/docs/foundation/grid_layouthelpers.stories.js +53 -0
  347. package/src/docs/foundation/themes.docs.mdx +71 -0
  348. package/src/docs/foundation/themes.stories.js +63 -0
  349. package/src/docs/foundation/typography.docs.mdx +50 -0
  350. package/src/docs/foundation/typography.stories.js +119 -0
  351. package/src/interfaces.ts +129 -0
  352. package/src/main.ts +34 -0
  353. package/src/store/header.ts +40 -0
  354. package/src/store/theme.ts +27 -0
  355. package/src/templates/PageContent/PageContent.stories.js +92 -0
  356. package/src/templates/PageContent/PageContent.vue +140 -0
  357. package/src/templates/PageEventDetail/PageEventDetail.stories.js +104 -0
  358. package/src/templates/PageEventDetail/PageEventDetail.vue +358 -0
  359. package/src/templates/PageNewsDetail/PageNewsDetail.stories.js +158 -0
  360. package/src/templates/PageNewsDetail/PageNewsDetail.vue +242 -0
  361. package/src/templates/edu/PageEduNewsDetail.stories.js +64 -0
  362. package/src/templates/edu/PageEduNewsDetail.vue +155 -0
  363. package/src/templates/www/HomePage/HomePage.vue +30 -0
  364. package/src/utils/dayjs.js +32 -0
  365. package/src/utils/filters.js +33 -0
  366. package/src/utils/mixins.ts +353 -0
  367. package/src/vite-env.d.ts +1 -0
  368. package/tailwind.config.js +24 -0
  369. package/tsconfig.json +29 -0
  370. package/tsconfig.node.json +11 -0
  371. package/vite.config.ts +55 -0
@@ -0,0 +1,104 @@
1
+ <template>
2
+ <nuxt-link
3
+ v-if="data"
4
+ :to="data.url"
5
+ class="TopicDetailMissionCarouselItem group block cursor-pointer"
6
+ >
7
+ <div
8
+ class="can-hover:group-hover:scale-105 relative transition-transform duration-200 ease-in transform scale-100"
9
+ >
10
+ <div class="min-h-66 bg-black">
11
+ <BaseImagePlaceholder
12
+ v-if="data.thumbnailImage && data.thumbnailImage.src"
13
+ aspect-ratio="7:8"
14
+ dark-mode
15
+ no-logo
16
+ >
17
+ <BaseImage
18
+ :src="data.thumbnailImage.src.url"
19
+ :width="data.thumbnailImage.src.width"
20
+ :height="data.thumbnailImage.src.height"
21
+ alt=""
22
+ object-fit-class="cover"
23
+ image-class="w-full h-full"
24
+ loading="lazy"
25
+ />
26
+ </BaseImagePlaceholder>
27
+ <div
28
+ class="gradient-overlay bg-gradient-to-b from-transparent to-black min-h-1/2 absolute inset-x-0 bottom-0"
29
+ ></div>
30
+ </div>
31
+ <div class="absolute inset-x-0 bottom-0">
32
+ <div class="text-contrast p-4 text-white">
33
+ <p
34
+ v-if="data.title"
35
+ class="mb-1 text-xl font-semibold leading-tight"
36
+ >
37
+ {{ data.title }}
38
+ </p>
39
+ <p
40
+ v-if="data.status || data.showClock"
41
+ class="text-subtitle text-jpl-aqua"
42
+ >
43
+ <span class="sr-only">.</span>
44
+ <template v-if="data.showClock">
45
+ {{ clockTypeLabel || data.status }}
46
+ </template>
47
+ <template v-else>
48
+ {{ data.status }}
49
+ </template>
50
+ <span class="sr-only">.</span>
51
+ </p>
52
+ </div>
53
+ <MissionDetailStatsMicro
54
+ v-if="data.showClock"
55
+ class="-mt-1"
56
+ :show-clock="data.showClock"
57
+ :clock-type="data.clockType"
58
+ :start-date-time="data.startDateTime"
59
+ />
60
+ </div>
61
+ </div>
62
+ </nuxt-link>
63
+ </template>
64
+
65
+ <script lang="ts">
66
+ import { defineComponent } from 'vue'
67
+ import { clockTypes } from '../MissionDetailStats/MissionDetailStats.vue'
68
+ import type { ClockType } from '../MissionDetailStats/MissionDetailStats.vue'
69
+ import type { PropType } from 'vue'
70
+ import type { ImageObject } from '../../interfaces'
71
+ import MissionDetailStatsMicro from './../MissionDetailStats/MissionDetailStatsMicro.vue'
72
+ import BaseImage from './../BaseImage/BaseImage.vue'
73
+ import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
74
+
75
+ export interface Slide {
76
+ clockType: ClockType
77
+ showClock: boolean
78
+ startDateTime: string
79
+ status: string
80
+ thumbnailImage: Partial<ImageObject>
81
+ title: string
82
+ url: string
83
+ }
84
+
85
+ export default defineComponent({
86
+ name: 'TopicDetailMissionCarouselItem',
87
+ components: {
88
+ MissionDetailStatsMicro,
89
+ BaseImage,
90
+ BaseImagePlaceholder
91
+ },
92
+ props: {
93
+ data: {
94
+ type: Object as PropType<Slide>,
95
+ required: false
96
+ }
97
+ },
98
+ computed: {
99
+ clockTypeLabel(): string {
100
+ return clockTypes[this.data?.clockType as ClockType] || this.data?.clockType
101
+ }
102
+ }
103
+ })
104
+ </script>
@@ -0,0 +1,84 @@
1
+ import TopicDetailMissionSpotlight from './TopicDetailMissionSpotlight.vue'
2
+ export default {
3
+ title: 'WWW/TopicDetail/TopicDetailMissionSpotlight',
4
+ component: TopicDetailMissionSpotlight,
5
+ decorators: [
6
+ () => ({
7
+ template: `<div id="storyDecorator" class="absolute inset-0"><story/></div>`
8
+ })
9
+ ],
10
+ parameters: {
11
+ html: {
12
+ root: '#storyDecorator'
13
+ },
14
+ viewMode: 'canvas'
15
+ },
16
+ excludeStories: /.*Data$/
17
+ }
18
+
19
+ export const TopicDetailMissionSpotlightData = {
20
+ url: '/missions/slug',
21
+ title: 'GRACE-FO',
22
+ summary: "The GRACE missions measure variations in gravity over Earth's surface. ",
23
+ heroImage: {
24
+ // beach
25
+ src: {
26
+ url: 'https://picsum.photos/id/973/1800/1200',
27
+ width: 1800,
28
+ height: 1200
29
+ },
30
+ // lake
31
+ srcSet:
32
+ 'https://picsum.photos/id/865/768/548 768w, https://picsum.photos/id/865/1024/684 1024w, https://picsum.photos/id/865/1440/770 1440w, https://picsum.photos/id/865/1800/963 1800w',
33
+ // jungle
34
+ screenMd: {
35
+ url: 'https://picsum.photos/id/921/800/640'
36
+ },
37
+ // desert
38
+ screenSm: {
39
+ url: 'https://picsum.photos/id/247/640/900'
40
+ },
41
+ alt: 'Topic detail mission spotlight'
42
+ },
43
+ showClock: true,
44
+ showDistance: true,
45
+ clockType: 'time_in_orbit',
46
+ startDateTime: '2020-10-14 10:04:21+01:00',
47
+ distanceType: 'earth',
48
+ distanceValue: 4986444,
49
+ distanceApiUrls: ''
50
+ }
51
+
52
+ // stories
53
+ export const MissionSpotlight = {
54
+ args: {
55
+ data: TopicDetailMissionSpotlightData
56
+ }
57
+ }
58
+ export const NoClock = {
59
+ args: {
60
+ data: {
61
+ ...TopicDetailMissionSpotlightData,
62
+ showClock: false
63
+ }
64
+ }
65
+ }
66
+
67
+ export const NoDistance = {
68
+ args: {
69
+ data: {
70
+ ...TopicDetailMissionSpotlightData,
71
+ showDistance: false
72
+ }
73
+ }
74
+ }
75
+
76
+ export const NoStats = {
77
+ args: {
78
+ data: {
79
+ ...TopicDetailMissionSpotlightData,
80
+ showClock: false,
81
+ showDistance: false
82
+ }
83
+ }
84
+ }
@@ -0,0 +1,112 @@
1
+ <template>
2
+ <div
3
+ v-if="data"
4
+ class="TopicDetailMissionSpotlight max-w-screen-3xl relative mx-auto"
5
+ >
6
+ <div class="absolute inset-0 z-10 bg-black">
7
+ <picture v-if="data.heroImage && data.heroImage.src">
8
+ <source
9
+ media="(min-width: 768px)"
10
+ :srcset="data.heroImage.srcSet"
11
+ />
12
+ <source
13
+ media="(min-width: 420px)"
14
+ :srcset="data.heroImage.screenMd.url"
15
+ />
16
+ <source :srcset="data.heroImage.screenSm.url" />
17
+ <img
18
+ class="object-cover w-full h-full"
19
+ :src="data.heroImage.src.url"
20
+ :width="data.heroImage.src.width"
21
+ :height="data.heroImage.src.height"
22
+ :alt="data.heroImage.alt"
23
+ />
24
+ </picture>
25
+ </div>
26
+ <div class="content-wrapper lg:flex lg:items-center relative z-20 w-full h-full">
27
+ <div
28
+ class="bg-gradient-to-t lg:bg-gradient-to-l from-transparent-w25 lg:from-transparent xl:from-transparent-w25 to-transparent-black-75 lg:to-transparent-black-75 absolute inset-0"
29
+ ></div>
30
+ <div class="pb-80 lg:pb-14 relative w-full pt-8">
31
+ <div class="lg:BaseGrid lg:pt-0 container mx-auto">
32
+ <div
33
+ class="lg:px-10 2xl:px-0 lg:pt-10 lg:pb-14 xl:col-end-6 col-start-1 col-end-10 px-4 pb-10"
34
+ >
35
+ <h2>
36
+ <span class="text-gray-light-mid text-contrast text-subtitle block mb-3">
37
+ {{ eyebrow }}
38
+ </span>
39
+ <div
40
+ class="lg:text-9xl md:text-8xl text-7xl lg:tracking-tight lg:leading-tighter text-contrast mb-4 font-medium leading-tight text-white"
41
+ >
42
+ {{ data.title }}
43
+ </div>
44
+ </h2>
45
+ <p
46
+ class="text-body-lg lg:mb-10 text-contrast mb-5 font-normal leading-normal text-white"
47
+ >
48
+ {{ data.summary }}
49
+ </p>
50
+ <BaseButton
51
+ variant="primary"
52
+ :to="data.url"
53
+ >Explore</BaseButton
54
+ >
55
+ </div>
56
+ </div>
57
+ <MissionDetailStatsMini
58
+ v-if="data.showClock || data.showDistance"
59
+ :show-clock="data.showClock"
60
+ :show-distance="data.showDistance"
61
+ :clock-type="data.clockType"
62
+ :start-date-time="data.startDateTime"
63
+ :distance-type="data.distanceType"
64
+ :distance-value="data.distanceValue"
65
+ :distance-api-urls="data.distanceApiUrls"
66
+ />
67
+ </div>
68
+ </div>
69
+ </div>
70
+ </template>
71
+ <script lang="ts">
72
+ import { defineComponent } from 'vue'
73
+ import MissionDetailStatsMini from './../MissionDetailStats/MissionDetailStatsMini.vue'
74
+ import BaseButton from './../BaseButton/BaseButton.vue'
75
+
76
+ export default defineComponent({
77
+ name: 'TopicDetailMissionSpotlight',
78
+ components: {
79
+ MissionDetailStatsMini,
80
+ BaseButton
81
+ },
82
+ props: {
83
+ data: {
84
+ type: Object,
85
+ required: false
86
+ }
87
+ },
88
+ data() {
89
+ return {
90
+ eyebrow: 'Mission Spotlight'
91
+ }
92
+ }
93
+ })
94
+ </script>
95
+ <style lang="scss" scoped>
96
+ .TopicDetailMissionSpotlight {
97
+ .content-wrapper {
98
+ @screen lg {
99
+ min-height: 548px; // maintains 1440x770 aspect ratio
100
+ }
101
+ @screen xl {
102
+ min-height: 684px; // maintains 1440x770 aspect ratio
103
+ }
104
+ @screen 2xl {
105
+ min-height: 770px; // 1440x770
106
+ }
107
+ @screen 3xl {
108
+ min-height: 963px; // maintains 1440x770 aspect ratio
109
+ }
110
+ }
111
+ }
112
+ </style>
@@ -0,0 +1,221 @@
1
+ import TopicDetailMore from './TopicDetailMore.vue'
2
+ export default {
3
+ title: 'WWW/TopicDetail/TopicDetailMore',
4
+ component: TopicDetailMore,
5
+ excludeStories: /.*Data$/
6
+ }
7
+
8
+ export const TopicDetailMoreData = {
9
+ moreAboutTopic: [
10
+ {
11
+ __typename: 'ImageDetailPage',
12
+ date: '2020-11-12T23:56:46.346940+00:00',
13
+ label: 'Image',
14
+ thumbnailImage: {
15
+ src: {
16
+ width: '600',
17
+ height: '400',
18
+ url: 'https://picsum.photos/600/400'
19
+ },
20
+ srcSet: 'https://picsum.photos/600/400 320w, https://picsum.photos/600/400 600w,'
21
+ },
22
+ title: 'My Image Detail',
23
+ url: '/images/my-image-detail/'
24
+ },
25
+ {
26
+ __typename: 'News',
27
+ date: '2004-01-03T08:00:00+00:00',
28
+ label: 'News',
29
+ thumbnailImage: {
30
+ src: {
31
+ width: '600',
32
+ height: '400',
33
+ url: 'https://picsum.photos/600/400'
34
+ },
35
+ srcSet: 'https://picsum.photos/600/400 320w, https://picsum.photos/600/400 600w,'
36
+ },
37
+ title: 'Mars Exploration Rover Spirit Mission Status',
38
+ url: '/news/tiny-measurement-gives-big-boost-to-planet-hunt/'
39
+ },
40
+ {
41
+ __typename: 'News',
42
+ date: '2003-05-27T07:00:00+00:00',
43
+ label: 'News',
44
+ thumbnailImage: {
45
+ src: {
46
+ width: '600',
47
+ height: '400',
48
+ url: 'https://picsum.photos/600/400'
49
+ },
50
+ srcSet: 'https://picsum.photos/600/400 320w, https://picsum.photos/600/400 600w,'
51
+ },
52
+ title: 'Theatre in the Rectangle',
53
+ url: '/news/theatre-in-the-rectangle/'
54
+ },
55
+ {
56
+ __typename: 'News',
57
+ date: '2003-05-21T07:00:00+00:00',
58
+ label: 'News',
59
+ thumbnailImage: {
60
+ src: {
61
+ width: '600',
62
+ height: '400',
63
+ url: 'https://picsum.photos/600/400'
64
+ },
65
+ srcSet: 'https://picsum.photos/600/400 320w, https://picsum.photos/600/400 600w,'
66
+ },
67
+ title: 'Frozen Light: Cool NASA Research Holds Promise',
68
+ url: '/news/frozen-light-cool-nasa-research-holds-promise/'
69
+ },
70
+ {
71
+ __typename: 'News',
72
+ date: '2003-05-20T07:00:00+00:00',
73
+ label: 'News',
74
+ thumbnailImage: {
75
+ src: {
76
+ width: '600',
77
+ height: '400',
78
+ url: 'https://picsum.photos/600/400'
79
+ },
80
+ srcSet: 'https://picsum.photos/600/400 320w, https://picsum.photos/600/400 600w,'
81
+ },
82
+ title: 'Newly Discovered Star May Be Third-Closest',
83
+ url: '/news/newly-discovered-star-may-be-third-closest/'
84
+ },
85
+ {
86
+ __typename: 'News',
87
+ date: '2003-05-06T07:00:00+00:00',
88
+ label: 'News',
89
+ thumbnailImage: {
90
+ src: {
91
+ width: '600',
92
+ height: '400',
93
+ url: 'https://picsum.photos/600/400'
94
+ },
95
+ srcSet: 'https://picsum.photos/600/400 320w, https://picsum.photos/600/400 600w,'
96
+ },
97
+ title: 'Galaxy Evolution Explorer Mission Status',
98
+ url: '/news/galaxy-evolution-explorer-mission-status/'
99
+ },
100
+ {
101
+ __typename: 'News',
102
+ date: '2003-04-28T07:00:00+00:00',
103
+ label: 'News',
104
+ thumbnailImage: {
105
+ src: {
106
+ width: '600',
107
+ height: '400',
108
+ url: 'https://picsum.photos/600/400'
109
+ },
110
+ srcSet: 'https://picsum.photos/600/400 320w, https://picsum.photos/600/400 600w,'
111
+ },
112
+ title: 'Galaxy Evolution Explorer On Its Way',
113
+ url: '/news/galaxy-evolution-explorer-on-its-way/'
114
+ },
115
+ {
116
+ __typename: 'News',
117
+ date: '2003-04-22T07:00:00+00:00',
118
+ label: 'News',
119
+ thumbnailImage: {
120
+ src: {
121
+ width: '600',
122
+ height: '400',
123
+ url: 'https://picsum.photos/600/400'
124
+ },
125
+ srcSet: 'https://picsum.photos/600/400 320w, https://picsum.photos/600/400 600w,'
126
+ },
127
+ title: 'Galaxy Evolution Explorer Looks Back in Time',
128
+ url: '/news/galaxy-evolution-explorer-looks-back-in-time/'
129
+ }
130
+ ],
131
+ moreAboutTopicCurated: [
132
+ {
133
+ __typename: 'PageChooserBlock',
134
+ page: {
135
+ label: 'Mission',
136
+ thumbnailImage: {
137
+ src: {
138
+ width: '600',
139
+ height: '400',
140
+ url: 'https://picsum.photos/600/400'
141
+ },
142
+ srcSet: 'https://picsum.photos/600/400 320w, https://picsum.photos/600/400 600w,'
143
+ },
144
+ title: 'Autonomous Sciencecraft Experiment',
145
+ url: '/missions/autonomous-sciencecraft-experiment-ase/'
146
+ }
147
+ },
148
+ {
149
+ __typename: 'PageChooserBlock',
150
+ page: {
151
+ date: '2004-01-04T08:00:00+00:00',
152
+ label: 'News',
153
+ thumbnailImage: {
154
+ src: {
155
+ width: '600',
156
+ height: '400',
157
+ url: 'https://picsum.photos/600/400'
158
+ },
159
+ srcSet: 'https://picsum.photos/600/400 320w, https://picsum.photos/600/400 600w,'
160
+ },
161
+ title: 'Mars Exploration Rover Spirit Mission Status',
162
+ url: '/news/archaeologists-dig-space/'
163
+ }
164
+ },
165
+ {
166
+ __typename: 'ExternalLinkCard',
167
+ date: '2020-11-03',
168
+ label: 'Link Label',
169
+ thumbnailImage: {
170
+ src: {
171
+ width: '600',
172
+ height: '400',
173
+ url: 'https://picsum.photos/600/400'
174
+ },
175
+ srcSet: 'https://picsum.photos/600/400 320w, https://picsum.photos/600/400 600w,'
176
+ },
177
+ title: 'Title for Link Card',
178
+ url: 'https://nasa.gov'
179
+ }
180
+ ]
181
+ }
182
+
183
+ // stories
184
+ export const Default = {
185
+ args: {
186
+ topic: 'Mars',
187
+ more: TopicDetailMoreData.moreAboutTopic,
188
+ moreCurated: TopicDetailMoreData.moreAboutTopicCurated
189
+ },
190
+ render: (args) => ({
191
+ setup() {
192
+ return { args }
193
+ },
194
+ components: { TopicDetailMore },
195
+ template: `<TopicDetailMore v-bind="args"><div class="w-full p-10 bg-black text-white">Slot for Mission Spotlight</div></TopicDetailMore>`
196
+ })
197
+ }
198
+
199
+ export const NoSpotlight = {
200
+ args: {
201
+ topic: 'Mars',
202
+ more: TopicDetailMoreData.moreAboutTopic,
203
+ moreCurated: TopicDetailMoreData.moreAboutTopicCurated
204
+ }
205
+ }
206
+
207
+ export const ShortList = {
208
+ args: {
209
+ topic: 'Mars',
210
+ more: [],
211
+ moreCurated: TopicDetailMoreData.moreAboutTopicCurated
212
+ }
213
+ }
214
+
215
+ export const NoList = {
216
+ args: {
217
+ topic: 'Mars',
218
+ more: [],
219
+ moreCurated: []
220
+ }
221
+ }
@@ -0,0 +1,124 @@
1
+ <template>
2
+ <div class="TopicDetailMore max-w-screen-3xl relative mx-auto">
3
+ <template v-if="theData && theData.length">
4
+ <div class="lg:BaseGrid mt-18 lg:px-0 container px-4 mx-auto mb-12">
5
+ <h2
6
+ class="font-primary text-gray-dark lg:text-6xl col-span-11 col-start-2 text-3xl font-semibold leading-normal tracking-normal uppercase"
7
+ >
8
+ More About {{ topic }}
9
+ </h2>
10
+ </div>
11
+ <template
12
+ v-for="(item, index) in theData"
13
+ :key="index"
14
+ >
15
+ <TopicDetailMoreVisibility>
16
+ <div class="md:BaseGrid lg:px-0 container px-4 mx-auto">
17
+ <TopicDetailMoreItem
18
+ class="md:max-w-none md:mx-0 lg:mb-0 max-w-lg row-span-1 mx-auto mb-10"
19
+ :class="gridPlacement(index)"
20
+ :data="item"
21
+ />
22
+ </div>
23
+ <!-- show slot contents after fourth item -->
24
+ <template v-if="index === 3 && $slots.default">
25
+ <TopicDetailMoreVisibility class="lg:my-28 my-16">
26
+ <slot />
27
+ </TopicDetailMoreVisibility>
28
+ </template>
29
+ </TopicDetailMoreVisibility>
30
+ </template>
31
+ </template>
32
+ <!-- if no moreAbout data or if the data is less then 4 cards, show the slot at the end -->
33
+ <template v-if="$slots.default && (!theData || theData.length < 4)">
34
+ <div :class="{ 'mt-16 lg:mt-28': theData.length }">
35
+ <slot />
36
+ </div>
37
+ </template>
38
+
39
+ <!-- TODO: modify search to filter all by topic. Right now this only uses topic title as the search terms -->
40
+ <!-- TODO: modify "to" to use a route object. Had to change to string to work with BaseButton which needs refactoring to accommodate a route object -->
41
+ <div class="flex justify-center">
42
+ <BaseButton
43
+ class="lg:mt-18 mt-10"
44
+ :aria-label="'More ' + topic"
45
+ variant="secondary"
46
+ :to="`/search?topics=${topic}`"
47
+ >
48
+ More
49
+ <template #icon><IconCaret class="ml-1 text-sm" /></template>
50
+ </BaseButton>
51
+ </div>
52
+ </div>
53
+ </template>
54
+ <script lang="ts">
55
+ import { defineComponent } from 'vue'
56
+ import type { PropType } from 'vue'
57
+ import type { Card } from '../../interfaces'
58
+ import BaseButton from './../BaseButton/BaseButton.vue'
59
+ import IconCaret from './../Icons/IconCaret.vue'
60
+ import TopicDetailMoreVisibility from './../TopicDetailMore/TopicDetailMoreVisibility.vue'
61
+ import TopicDetailMoreItem from './../TopicDetailMoreItem/TopicDetailMoreItem.vue'
62
+
63
+ export default defineComponent({
64
+ name: 'TopicDetailMore',
65
+ components: {
66
+ BaseButton,
67
+ IconCaret,
68
+ TopicDetailMoreVisibility,
69
+ TopicDetailMoreItem
70
+ },
71
+ props: {
72
+ topic: {
73
+ type: String,
74
+ required: false,
75
+ default: 'Topic'
76
+ },
77
+ more: {
78
+ type: Array as PropType<Card[]>,
79
+ required: false
80
+ },
81
+ moreCurated: {
82
+ type: Array as PropType<Card[]>,
83
+ required: false
84
+ }
85
+ },
86
+ computed: {
87
+ theData(): Card[] {
88
+ // combining the two and returning the first 8
89
+ let arr: Card[] = []
90
+ if (this.moreCurated && this.more) {
91
+ arr = this.moreCurated.concat(this.more)
92
+ } else if (this.more) {
93
+ arr = this.more
94
+ }
95
+ return arr.slice(0, 8)
96
+ }
97
+ },
98
+ methods: {
99
+ gridPlacement(index: number) {
100
+ if (index === 0) {
101
+ return 'col-start-2 col-span-6'
102
+ } else if (index === 1) {
103
+ return 'lg:col-start-9 lg:col-span-4 md:col-start-6 md:col-span-6 lg:-mt-28'
104
+ } else if (index === 2) {
105
+ return 'lg:col-start-4 lg:col-span-4 md:col-start-2 md:col-span-6 lg:-mt-28'
106
+ } else if (index === 3) {
107
+ return 'lg:col-start-9 lg:col-span-4 md:col-start-6 md:col-span-6 lg:-mt-28'
108
+ } else if (index === 4) {
109
+ if (!this.$slots.default) {
110
+ return 'col-start-2 col-span-6 lg:-mt-28'
111
+ }
112
+ return 'col-start-2 col-span-6'
113
+ } else if (index === 5) {
114
+ return 'lg:col-start-6 lg:col-span-6 md:col-start-6 md:col-span-6 lg:mt-28'
115
+ } else if (index === 6) {
116
+ return 'lg:col-start-1 lg:col-span-4 md:col-start-2 md:col-span-6 lg:-mt-28'
117
+ } else if (index === 7) {
118
+ return 'lg:col-start-6 lg:col-span-4 md:col-start-6 md:col-span-6 lg:-mt-28'
119
+ }
120
+ return ''
121
+ }
122
+ }
123
+ })
124
+ </script>
@@ -0,0 +1,51 @@
1
+ <template>
2
+ <div
3
+ v-observe-visibility="{
4
+ callback: visibilityChanged,
5
+ throttle: 0,
6
+ once: true
7
+ }"
8
+ class="transition-all duration-1000 ease-out transform"
9
+ :class="isVisible ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-32'"
10
+ >
11
+ <slot />
12
+ </div>
13
+ </template>
14
+ <script lang="ts">
15
+ import { defineComponent } from 'vue'
16
+ import { ObserveVisibility } from 'vue-observe-visibility'
17
+
18
+ export default defineComponent({
19
+ name: 'TopicDetailMoreVisibility',
20
+ directives: {
21
+ ObserveVisibility
22
+ },
23
+ data() {
24
+ return {
25
+ isVisible: false,
26
+ hasIntersectionObserver: true
27
+ }
28
+ },
29
+ mounted() {
30
+ this.featureDetection()
31
+ },
32
+ methods: {
33
+ visibilityChanged(visibility: boolean) {
34
+ if (this.hasIntersectionObserver) {
35
+ this.isVisible = visibility
36
+ }
37
+ },
38
+ featureDetection() {
39
+ if (
40
+ !('IntersectionObserver' in window) ||
41
+ !('IntersectionObserverEntry' in window) ||
42
+ !('intersectionRatio' in window.IntersectionObserverEntry.prototype)
43
+ ) {
44
+ // intersection observer not supported
45
+ this.hasIntersectionObserver = false
46
+ this.isVisible = true
47
+ }
48
+ }
49
+ }
50
+ })
51
+ </script>