@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,66 @@
1
+ <template>
2
+ <div v-if="data">
3
+ <NavHeading :data="data" />
4
+ <div
5
+ v-if="data.links"
6
+ :class="{ 'auto-col': autoCol }"
7
+ >
8
+ <div
9
+ v-for="(item, index) in data.links"
10
+ :key="index"
11
+ class="mb-0"
12
+ >
13
+ <BaseLink
14
+ variant="none"
15
+ class="block text-lg font-medium leading-tight text-white"
16
+ :href="item.path && !getRouterLink(item) ? item.path : undefined"
17
+ :to="getRouterLink(item) ? getRouterLink(item) : undefined"
18
+ link-class="can-hover:hover:underline inline-block px-2 py-3 -ml-2"
19
+ >
20
+ {{ getLinkText(item) }}
21
+ </BaseLink>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </template>
26
+
27
+ <script lang="ts">
28
+ import { defineComponent } from 'vue'
29
+ import { mixinGetRouterLink, mixinGetLinkText } from './../../utils/mixins'
30
+ import BaseLink from './../BaseLink/BaseLink.vue'
31
+ import NavHeading from './../NavHeading/NavHeading.vue'
32
+ import type { LinkObject } from './../../utils/mixins'
33
+ export default defineComponent({
34
+ name: 'NavLinkList',
35
+ components: {
36
+ BaseLink,
37
+ NavHeading
38
+ },
39
+ props: {
40
+ data: {
41
+ type: Object,
42
+ required: false
43
+ },
44
+ autoCol: {
45
+ type: Boolean,
46
+ required: false,
47
+ default: false
48
+ }
49
+ },
50
+ methods: {
51
+ getRouterLink(link: LinkObject): string | undefined {
52
+ return mixinGetRouterLink(link)
53
+ },
54
+ getLinkText(link: LinkObject): string | undefined {
55
+ return mixinGetLinkText(link)
56
+ }
57
+ }
58
+ })
59
+ </script>
60
+ <style lang="scss" scoped>
61
+ .auto-col {
62
+ @screen lg {
63
+ column-count: 2;
64
+ }
65
+ }
66
+ </style>
@@ -0,0 +1,22 @@
1
+ import LogoColor from '@explorer-1/common/src/images/svg/logo-tribrand-color.svg'
2
+ import NavLogoLinks from './NavLogoLinks.vue'
3
+
4
+ export default {
5
+ title: 'WWW/Header & Footer/Elements/NavLogoLinks',
6
+ component: NavLogoLinks,
7
+ excludeStories: /.*Data$/
8
+ }
9
+
10
+ // TODO: VUE3 -- fix logo image in story
11
+ export const Default = {
12
+ args: {
13
+ src: LogoColor
14
+ },
15
+ render: (args) => ({
16
+ components: { NavLogoLinks },
17
+ setup() {
18
+ return { args }
19
+ },
20
+ template: `<div class="flex"><NavLogoLinks><img :src="src" alt="Logo Image" /></NavLogoLinks></div>`
21
+ })
22
+ }
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <!-- branding -->
3
+ <div class="NavLogoLinks relative">
4
+ <div class="absolute inset-0 flex items-start">
5
+ <BaseLink
6
+ variant="none"
7
+ href="https://www.nasa.gov"
8
+ title="NASA"
9
+ aria-label="NASA"
10
+ class="w-1/4 h-full"
11
+ link-class="block w-auto h-full"
12
+ external-target-blank
13
+ ></BaseLink>
14
+ <BaseLink
15
+ variant="none"
16
+ to="/"
17
+ title="JPL Home"
18
+ aria-label="JPL Home"
19
+ class="flex-grow h-full"
20
+ link-class="block w-full h-full"
21
+ ></BaseLink>
22
+ </div>
23
+ <!-- JPL tribrand logo placed via the default slot -->
24
+ <slot />
25
+ </div>
26
+ </template>
27
+ <script lang="ts">
28
+ /*
29
+ ** This component provides a wrapper for the JPL tribrand logo
30
+ ** that creates overlay links for both the NASA insignia and the JPL homepage
31
+ **
32
+ ** The logo is added via a slot to allow for complex display logic such as in NavDesktop
33
+ */
34
+ import { defineComponent } from 'vue'
35
+ import BaseLink from './../BaseLink/BaseLink.vue'
36
+
37
+ export default defineComponent({
38
+ name: 'NavLogoLinks',
39
+ components: {
40
+ BaseLink
41
+ }
42
+ })
43
+ </script>
44
+ <style lang="scss">
45
+ // In Windows high contrast mode, gives the logo a "link color" background to convey it’s clickable.
46
+ @media (forced-colors: active) {
47
+ .NavLogoLinks img {
48
+ position: relative;
49
+ z-index: 1;
50
+ pointer-events: none;
51
+ }
52
+
53
+ .NavLogoLinks a {
54
+ background-color: linktext;
55
+ }
56
+ }
57
+ </style>
@@ -0,0 +1,231 @@
1
+ import { TheFooterData, MenuFooterPanelData } from './../TheFooter/TheFooter.stories'
2
+ import NavMobile from './NavMobile.vue'
3
+ import NavMobileDropdown from './NavMobileDropdown.vue'
4
+ import NavMobileLink from './NavMobileLink.vue'
5
+
6
+ export default {
7
+ title: 'WWW/Header & Footer/Elements/NavMobile',
8
+ component: NavMobile,
9
+ excludeStories: /.*Data$/,
10
+ parameters: {
11
+ viewMode: 'canvas',
12
+ viewport: {
13
+ defaultViewport: 'mobile2'
14
+ }
15
+ }
16
+ }
17
+
18
+ // data
19
+ export const NavMobileData = {
20
+ mobileBreadcrumb:
21
+ '{"/": [{"path": "http://www.jpl.nasa.gov/", "title": "Asteroid watch"}, {"path": "http://www.jpl.nasa.gov/", "title": "Asteroid fast facts"}, {"path": "http://www.jpl.nasa.gov/", "title": "Meteor shower viewing guide"}, {"path": "http://www.jpl.nasa.gov/", "title": "Yeoman\'s top 10"}, {"path": "http://www.jpl.nasa.gov/", "title": "Glossary of space rocks"}, {"path": "/robotics-at-jpl/", "title": "Robotics"}, {"path": "http://www.jpl.nasa.gov/", "title": "Apps"}, {"path": "/jpl-life/", "title": "JPL Life"}, {"path": "/stars-and-galaxies/", "title": "Stars and Galaxies"}, {"path": "/exoplanets/", "title": "Exoplanets"}, {"path": "/solar-system/", "title": "Solar System"}, {"path": "/asteroids/", "title": "Asteroids"}, {"path": "/comets/", "title": "Comets"}, {"path": "/technology/", "title": "Technology"}, {"path": "/mars/", "title": "Mars"}, {"path": "/earth/", "title": "Earth"}, {"path": "/climate-change/", "title": "Climate Change"}, {"path": "/earthquakes/", "title": "Earthquakes"}, {"path": "/weather/", "title": "Weather"}, {"path": "/robotics/", "title": "Robotics"}], "/missions/": [{"path": "/missions/", "title": "Current"}, {"path": "/missions/", "title": "Past"}, {"path": "/missions/", "title": "Future"}, {"path": "/missions/", "title": "Proposed"}, {"path": "/missions/", "title": "All"}], "/news/": [{"path": "/news/", "title": "All news"}, {"path": "/news/", "title": "Press kits"}, {"path": "/news/", "title": "Fact sheets"}, {"path": "/news/", "title": "Media Information"}, {"path": "/news/", "title": "JPL newsletter"}]}',
22
+ footerNavigation: TheFooterData.footerNavigation,
23
+ footerMoreFromJpl: TheFooterData.footerMoreFromJpl
24
+ }
25
+
26
+ const NavMobileSecondaryNavData = [
27
+ { path: '/custom', title: 'Secondary Nav' },
28
+ {
29
+ path: '/custom/placeholder-1',
30
+ title: 'First subpage'
31
+ },
32
+ {
33
+ path: '/custom/placeholder-2',
34
+ title: 'Second subpage'
35
+ },
36
+ {
37
+ path: '/custom/placeholder-3',
38
+ title: 'Third subpage'
39
+ },
40
+ {
41
+ path: '/custom/placeholder-4',
42
+ title: 'Fourth subpage'
43
+ }
44
+ ]
45
+
46
+ const NavMobileTertiaryNavData = [
47
+ { path: '/go/test-site', title: 'Test Go Site', children: [] },
48
+ {
49
+ path: '/go/test-site/has-children',
50
+ title: 'Has Children',
51
+ children: [
52
+ {
53
+ path: '/go/test-site/has-children/level-3-no-children',
54
+ title: 'Lvl 3 No Children',
55
+ children: []
56
+ },
57
+ {
58
+ path: '/go/test-site/has-children/level-3-has-children',
59
+ title: 'Lvl 3 Has Children',
60
+ children: [
61
+ {
62
+ path: '/go/test-site/has-children/level-3-has-children/level-4-no-children-1',
63
+ title: 'Lvl 4 No Children 1',
64
+ children: []
65
+ },
66
+ {
67
+ path: '/go/test-site/has-children/level-3-has-children/level-4-no-children-2',
68
+ title: 'Lvl 4 No Children 2',
69
+ children: []
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ path: '/go/test-site/has-children/level-3-no-children',
75
+ title: 'Lvl 3 No Children',
76
+ children: []
77
+ }
78
+ ]
79
+ },
80
+ { path: '/go/test-site/no-children-1', title: 'No Children 1', children: [] },
81
+ { path: '/go/test-site/no-children-2', title: 'No Children 2', children: [] },
82
+ {
83
+ path: '/go/test-site/has-children',
84
+ title: 'Has Children',
85
+ children: [
86
+ {
87
+ path: '/go/test-site/has-children/level-3-no-children',
88
+ title: 'Lvl 3 No Children',
89
+ children: []
90
+ },
91
+ {
92
+ path: '/go/test-site/has-children/level-3-has-children',
93
+ title: 'Lvl 3 Has Children',
94
+ children: [
95
+ {
96
+ path: '/go/test-site/has-children/level-3-has-children/level-4-no-children-1',
97
+ title: 'Lvl 4 No Children 1',
98
+ children: []
99
+ },
100
+ {
101
+ path: '/go/test-site/has-children/level-3-has-children/level-4-no-children-2',
102
+ title: 'Lvl 4 No Children 2',
103
+ children: []
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ path: '/go/test-site/has-children/level-3-no-children',
109
+ title: 'Lvl 3 No Children',
110
+ children: []
111
+ }
112
+ ]
113
+ }
114
+ ]
115
+
116
+ export const Nav = {
117
+ args: {
118
+ data: NavMobileData,
119
+ headerVisible: true,
120
+ scrolledUp: false,
121
+ scrollTop: 0
122
+ },
123
+ render: (args) => ({
124
+ components: { NavMobile },
125
+ setup() {
126
+ return { args }
127
+ },
128
+ template: `<NavMobile
129
+ v-bind="args"
130
+ />`
131
+ })
132
+ }
133
+
134
+ export const WithSecondaryNav = {
135
+ args: {
136
+ data: NavMobileData,
137
+ headerVisible: true,
138
+ scrolledUp: false,
139
+ scrollTop: 0,
140
+ staticSecondaryData: NavMobileSecondaryNavData
141
+ },
142
+ render: (args) => ({
143
+ components: { NavMobile },
144
+ setup() {
145
+ return { args }
146
+ },
147
+ template: `<NavMobile
148
+ v-bind="args"
149
+ />`
150
+ })
151
+ }
152
+
153
+ export const WithTertiaryNav = {
154
+ args: {
155
+ data: NavMobileData,
156
+ headerVisible: true,
157
+ scrolledUp: false,
158
+ scrollTop: 0,
159
+ staticSecondaryData: NavMobileTertiaryNavData
160
+ },
161
+ render: (args) => ({
162
+ components: { NavMobile },
163
+ setup() {
164
+ return { args }
165
+ },
166
+ template: `<NavMobile
167
+ v-bind="args"
168
+ />`
169
+ })
170
+ }
171
+
172
+ export const Dropdown = {
173
+ args: {
174
+ data: MenuFooterPanelData
175
+ },
176
+ render: (args) => ({
177
+ components: { NavMobileDropdown },
178
+ setup() {
179
+ return { args }
180
+ },
181
+ template: `<NavMobileDropdown
182
+ v-bind="args"
183
+ />`
184
+ })
185
+ }
186
+
187
+ export const DropdownActive = {
188
+ args: {
189
+ data: MenuFooterPanelData
190
+ },
191
+ render: (args) => ({
192
+ components: { NavMobileDropdown },
193
+ setup() {
194
+ return { args }
195
+ },
196
+ template: `<NavMobileDropdown
197
+ v-bind="args"
198
+ class="-active"
199
+ />`
200
+ })
201
+ }
202
+
203
+ export const DropdownSecondary = {
204
+ args: {
205
+ data: NavMobileSecondaryNavData
206
+ },
207
+ render: (args) => ({
208
+ components: { NavMobileDropdown },
209
+ setup() {
210
+ return { args }
211
+ },
212
+ template: `<NavMobileDropdown
213
+ v-bind="args"
214
+ />`
215
+ })
216
+ }
217
+
218
+ export const Link = {
219
+ args: {
220
+ data: MenuFooterPanelData.links[0]
221
+ },
222
+ render: (args) => ({
223
+ components: { NavMobileLink },
224
+ setup() {
225
+ return { args }
226
+ },
227
+ template: `<NavMobileLink
228
+ v-bind="args"
229
+ />`
230
+ })
231
+ }
@@ -0,0 +1,280 @@
1
+ <template>
2
+ <transition name="headerMobileReveal">
3
+ <div
4
+ v-show="headerVisible"
5
+ class="NavMobile border-gray-light-mid z-50 w-full transition-all duration-150 ease-in bg-white border-b"
6
+ :class="headerClasses"
7
+ >
8
+ <!-- navbar -->
9
+ <div class="relative w-full">
10
+ <div class="h-18 flex items-center justify-between px-5">
11
+ <!-- branding -->
12
+ <NavLogoLinks class="lg:p-0 w-72 z-20 p-2 pl-0 -ml-3">
13
+ <img
14
+ :src="LogoColor"
15
+ alt="JPL Logo"
16
+ width="324"
17
+ height="72"
18
+ />
19
+ </NavLogoLinks>
20
+
21
+ <button
22
+ v-if="data"
23
+ class="text-gray-dark p-4 -mr-4 cursor-pointer"
24
+ :aria-label="menuVisible ? 'Close menu' : 'Open menu'"
25
+ @click="toggleMenu"
26
+ >
27
+ <IconMenu
28
+ v-if="!menuVisible"
29
+ class="text-6xl"
30
+ />
31
+ <IconClose
32
+ v-else
33
+ class="text-3xl"
34
+ />
35
+ </button>
36
+ </div>
37
+ <div
38
+ v-if="menuVisible"
39
+ class="pb-8"
40
+ >
41
+ <!-- search input goes here -->
42
+ <NavSearchForm
43
+ mobile
44
+ class="px-4 my-5"
45
+ @submit-form="closeMenu()"
46
+ />
47
+
48
+ <!-- secondary nav dropdown -->
49
+ <nav
50
+ v-if="hasSecondary"
51
+ aria-label="Secondary"
52
+ >
53
+ <NavMobileDropdown
54
+ :data="staticSecondaryData || headerStore.secondaryNav"
55
+ start-open
56
+ />
57
+ <hr class="border-gray-light-mid pb-4 mb-4 border-0 border-b" />
58
+ </nav>
59
+
60
+ <!-- main nav dropdowns, derived from footer data -->
61
+ <nav aria-label="Main">
62
+ <template v-for="(item, index) in data.footerNavigation">
63
+ <NavMobileDropdown
64
+ v-if="item.titleLink"
65
+ :key="index"
66
+ :class="{
67
+ '-active': checkActive(item.titleLink) && !hasSecondary
68
+ }"
69
+ :data="item"
70
+ :start-open="checkActive(item.titleLink) && !hasSecondary"
71
+ />
72
+ </template>
73
+ </nav>
74
+ <div class="pl-8">
75
+ <nav
76
+ v-if="data.footerMoreFromJpl && data.footerMoreFromJpl.length > 0"
77
+ aria-label="Other JPL Sites"
78
+ class="mt-6"
79
+ >
80
+ <div class="text-subtitle text-primary mb-3">Other JPL Sites</div>
81
+ <NavMobileLink
82
+ v-for="(item, index) in data.footerMoreFromJpl"
83
+ :key="index"
84
+ :data="item"
85
+ />
86
+ </nav>
87
+ <NavSocial class="mt-8" />
88
+ </div>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ </transition>
93
+ </template>
94
+ <script lang="ts">
95
+ // @ts-nocheck
96
+ import { defineComponent } from 'vue'
97
+ import { mapStores } from 'pinia'
98
+ import LogoColor from '@explorer-1/common/src/images/svg/logo-tribrand-color.svg'
99
+ import { useHeaderStore } from './../../store/header'
100
+ import IconMenu from './../Icons/IconMenu.vue'
101
+ import IconClose from './../Icons/IconClose.vue'
102
+ import NavLogoLinks from './../NavLogoLinks/NavLogoLinks.vue'
103
+ import NavMobileDropdown from './../NavMobile/NavMobileDropdown.vue'
104
+ import NavMobileLink from './../NavMobile/NavMobileLink.vue'
105
+ import NavSocial from './../NavSocial/NavSocial.vue'
106
+ import NavSearchForm from './../NavSearchForm/NavSearchForm.vue'
107
+ import type { LinkObject, BreadcrumbObject } from '../../utils/mixins'
108
+ import { mixinIsActivePath } from '../../utils/mixins'
109
+ import type { BreadcrumbPathObject } from '../../interfaces'
110
+
111
+ export default defineComponent({
112
+ name: 'NavMobile',
113
+ components: {
114
+ IconMenu,
115
+ IconClose,
116
+ NavLogoLinks,
117
+ NavMobileDropdown,
118
+ NavMobileLink,
119
+ NavSocial,
120
+ NavSearchForm
121
+ },
122
+ props: {
123
+ data: {
124
+ type: Object || null,
125
+ required: false,
126
+ default: null
127
+ },
128
+ headerVisible: {
129
+ type: Boolean,
130
+ required: false,
131
+ default: false
132
+ },
133
+ scrolledUp: {
134
+ type: Boolean,
135
+ required: false,
136
+ default: false
137
+ },
138
+ scrollTop: {
139
+ type: Number,
140
+ required: false,
141
+ default: 0
142
+ },
143
+ staticSecondaryData: {
144
+ type: Array,
145
+ required: false,
146
+ default: null
147
+ }
148
+ },
149
+ data() {
150
+ return {
151
+ menuVisible: false,
152
+ searchQuery: null,
153
+ LogoColor: LogoColor
154
+ }
155
+ },
156
+ computed: {
157
+ ...mapStores(useHeaderStore),
158
+ // get the breadcrumb JSON string and convert to object. used to determine active class.
159
+ breadcrumb(): BreadcrumbObject | null {
160
+ if (this.data) {
161
+ return JSON.parse(this.data.mobileBreadcrumb)
162
+ }
163
+ return null
164
+ },
165
+ // dynamic classes for header transparency and onScroll effects
166
+ headerClasses() {
167
+ let classes = ''
168
+ // visibility when scrolled
169
+ if (this.scrolledUp && this.headerVisible && this.scrollTop > 0) {
170
+ classes = classes + ' -scrolled'
171
+ }
172
+ if (this.menuVisible) {
173
+ classes = classes + ' inset-0 overflow-auto'
174
+ }
175
+ return classes
176
+ },
177
+ // if current page has a secondary nav that should override behavior of the main nav
178
+ hasSecondary(): boolean {
179
+ if (this.staticSecondaryData || this.headerStore?.secondaryNav) {
180
+ return true
181
+ }
182
+ return false
183
+ }
184
+ },
185
+ watch: {
186
+ $route() {
187
+ // close the menu on route change
188
+ if (this.menuVisible) {
189
+ this.closeMenu()
190
+ }
191
+ }
192
+ },
193
+ mounted() {
194
+ // // TODO: VUE3: find solution for emitting event from slot
195
+ // // TODO: find a cleaner way to do this w/o using mounted or root level events
196
+ // // scoped slots? https://github.com/vuejs/vue/issues/4332
197
+ // this.$root?.$on('linkClicked', this.closeMenu)
198
+ },
199
+ methods: {
200
+ toggleMenu() {
201
+ if (this.menuVisible) {
202
+ this.closeMenu()
203
+ } else {
204
+ this.openMenu()
205
+ }
206
+ },
207
+ closeMenu() {
208
+ if (this.menuVisible) {
209
+ this.menuVisible = false
210
+ this.$emit('closeMobileMenu')
211
+ document.body.classList.remove('overflow-hidden')
212
+ }
213
+ },
214
+ openMenu() {
215
+ if (!this.menuVisible) {
216
+ this.menuVisible = true
217
+ this.$emit('openMobileMenu')
218
+ document.body.classList.add('overflow-hidden')
219
+ }
220
+ },
221
+ // safe way to retrieve url key from nav items. used with breadcrumb to determine active class.
222
+ getUrlKey(item: LinkObject): string | null {
223
+ if (item.linkPage) {
224
+ return item.linkPage.url
225
+ }
226
+ return null
227
+ },
228
+ // to determine active class on menu links and 'more' menu links
229
+ checkActive(item: LinkObject) {
230
+ const urlKey = this.getUrlKey(item)
231
+ if (urlKey && this.breadcrumb && this.breadcrumb.menu_links) {
232
+ // key into the breadcrumbs for each section
233
+ const objArray = this.breadcrumb.menu_links[urlKey]
234
+ // check if any of the paths contained in the array are active
235
+ return objArray.some((el: BreadcrumbPathObject) => {
236
+ return mixinIsActivePath(el.path)
237
+ })
238
+ }
239
+ return false
240
+ }
241
+ }
242
+ })
243
+ </script>
244
+ <style lang="scss">
245
+ .NavMobile {
246
+ @apply absolute top-0 z-50 inset-x-0;
247
+ // styles for default vs transparent header
248
+ // underline color and logo inversion styles handled within their respective components
249
+ &.-scrolled {
250
+ @apply fixed;
251
+ }
252
+ }
253
+ // vue-transition classes
254
+ // may scope this wider if mobile uses the same transition
255
+ .headerMobileReveal-enter-to,
256
+ .headerMobileReveal-enter-active {
257
+ @apply transition-transform transform ease-in-out duration-200;
258
+ }
259
+
260
+ .headerMobileReveal-leave-active,
261
+ .headerMobileReveal-leave-to {
262
+ @apply transition-transform transform ease-out duration-200;
263
+ }
264
+
265
+ .headerMobileReveal-enter-active {
266
+ @apply -translate-y-full;
267
+ }
268
+
269
+ .headerMobileReveal-enter-to {
270
+ @apply translate-y-0;
271
+ }
272
+
273
+ .headerMobileReveal-leave-to {
274
+ @apply translate-y-0;
275
+ }
276
+
277
+ .headerMobileReveal-leave-active {
278
+ @apply -translate-y-full;
279
+ }
280
+ </style>