@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.
- package/LICENSE +21 -0
- package/README.md +9 -0
- package/components.d.ts +215 -0
- package/index.html +18 -0
- package/lib/main.ts +78 -0
- package/package.json +54 -0
- package/postcss.config.js +7 -0
- package/public/edu/.gitkeep +0 -0
- package/public/edu/explorer-1/bg-stars-edu.png +0 -0
- package/public/edu/explorer-1/bg-stars.jpg +0 -0
- package/public/explorer-1/bg-stars-edu.png +0 -0
- package/public/explorer-1/bg-stars.jpg +0 -0
- package/src/App.vue +30 -0
- package/src/assets/fonts/README.md +12 -0
- package/src/assets/fonts/archivo-narrow/ArchivoNarrow-Bold.woff2 +0 -0
- package/src/assets/fonts/archivo-narrow/ArchivoNarrow-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/archivo-narrow/ArchivoNarrow-SemiBold.woff2 +0 -0
- package/src/assets/fonts/archivo-narrow/ArchivoNarrow-SemiBoldItalic.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-Bold.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-ExtraBold.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-Medium.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-Regular.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-RegularItalic.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-SemiBold.woff2 +0 -0
- package/src/assets/fonts/metropolis/Metropolis-SemiBoldItalic.woff2 +0 -0
- package/src/assets/scss/styles.scss +1 -0
- package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.stories.js +156 -0
- package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.vue +156 -0
- package/src/components/BackToTop/BackToTop.stories.js +24 -0
- package/src/components/BackToTop/BackToTop.vue +76 -0
- package/src/components/BaseAudio/BaseAudio.stories.js +29 -0
- package/src/components/BaseAudio/BaseAudio.vue +359 -0
- package/src/components/BaseButton/BaseButton.stories.ts +65 -0
- package/src/components/BaseButton/BaseButton.vue +114 -0
- package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.stories.mdx +68 -0
- package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue +101 -0
- package/src/components/BaseHeading/BaseHeading.stories.js +75 -0
- package/src/components/BaseHeading/BaseHeading.vue +58 -0
- package/src/components/BaseImage/BaseImage.stories.ts +52 -0
- package/src/components/BaseImage/BaseImage.vue +120 -0
- package/src/components/BaseImageCaption/BaseImageCaption.stories.js +27 -0
- package/src/components/BaseImageCaption/BaseImageCaption.vue +51 -0
- package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.stories.js +73 -0
- package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.vue +90 -0
- package/src/components/BaseLightboxCloseButton/BaseLightboxCloseButton.vue +45 -0
- package/src/components/BaseLightboxOpenButton/BaseLightboxOpenButton.vue +46 -0
- package/src/components/BaseLink/BaseLink.stories.js +47 -0
- package/src/components/BaseLink/BaseLink.vue +227 -0
- package/src/components/BaseModal/BaseModal.stories.js +90 -0
- package/src/components/BaseModal/BaseModal.vue +54 -0
- package/src/components/BaseModal/BaseModalDialog.vue +59 -0
- package/src/components/BasePlaceholder/BasePlaceholder.stories.js +29 -0
- package/src/components/BasePlaceholder/BasePlaceholder.vue +30 -0
- package/src/components/BaseRadioGroup/BaseRadioGroup.stories.mdx +68 -0
- package/src/components/BaseRadioGroup/BaseRadioGroup.vue +102 -0
- package/src/components/BaseSwimlane/BaseSwimlane.stories.mdx +64 -0
- package/src/components/BaseSwimlane/BaseSwimlane.vue +204 -0
- package/src/components/BaseTag/BaseTag.stories.js +34 -0
- package/src/components/BaseTag/BaseTag.vue +36 -0
- package/src/components/BaseTimer/BaseTimer.stories.js +78 -0
- package/src/components/BaseTimer/BaseTimer.test.js +15 -0
- package/src/components/BaseTimer/BaseTimer.vue +270 -0
- package/src/components/BaseUnitToggle/BaseUnitToggle.stories.js +86 -0
- package/src/components/BaseUnitToggle/BaseUnitToggle.test.js +26 -0
- package/src/components/BaseUnitToggle/BaseUnitToggle.vue +255 -0
- package/src/components/BaseVideo/BaseVideo.stories.js +31 -0
- package/src/components/BaseVideo/BaseVideo.vue +73 -0
- package/src/components/BlockAnchor/BlockAnchor.vue +38 -0
- package/src/components/BlockAudio/BlockAudio.stories.js +29 -0
- package/src/components/BlockAudio/BlockAudio.vue +78 -0
- package/src/components/BlockCard/BlockCard.stories.js +24 -0
- package/src/components/BlockCard/BlockCard.vue +88 -0
- package/src/components/BlockCardGroup/BlockCardGroup.stories.js +71 -0
- package/src/components/BlockCardGroup/BlockCardGroup.vue +61 -0
- package/src/components/BlockCircleImageCard/BlockCircleImageCard.stories.js +55 -0
- package/src/components/BlockCircleImageCard/BlockCircleImageCard.vue +120 -0
- package/src/components/BlockCta/BlockCta.stories.js +35 -0
- package/src/components/BlockCta/BlockCta.vue +55 -0
- package/src/components/BlockHeading/BlockHeading.stories.js +22 -0
- package/src/components/BlockHeading/BlockHeading.vue +27 -0
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.stories.js +40 -0
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +84 -0
- package/src/components/BlockImage/BlockImage.stories.js +137 -0
- package/src/components/BlockImage/BlockImage.vue +48 -0
- package/src/components/BlockImage/BlockImageFullBleed.vue +119 -0
- package/src/components/BlockImage/BlockImageStandard.vue +106 -0
- package/src/components/BlockImageCarousel/BlockImageCarousel.stories.js +108 -0
- package/src/components/BlockImageCarousel/BlockImageCarousel.vue +201 -0
- package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.stories.js +63 -0
- package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +120 -0
- package/src/components/BlockImageComparison/BlockImageComparison.stories.js +46 -0
- package/src/components/BlockImageComparison/BlockImageComparison.vue +59 -0
- package/src/components/BlockImageGallery/BlockImageGallery.stories.js +55 -0
- package/src/components/BlockImageGallery/BlockImageGallery.vue +128 -0
- package/src/components/BlockInlineImage/BlockInlineImage.stories.js +68 -0
- package/src/components/BlockInlineImage/BlockInlineImage.vue +124 -0
- package/src/components/BlockKeyPoints/BlockKeyPoints.stories.js +28 -0
- package/src/components/BlockKeyPoints/BlockKeyPoints.vue +48 -0
- package/src/components/BlockLinkCard/BlockLinkCard.stories.js +102 -0
- package/src/components/BlockLinkCard/BlockLinkCard.vue +197 -0
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.js +217 -0
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +68 -0
- package/src/components/BlockLinkTile/BlockLinkTile.stories.js +72 -0
- package/src/components/BlockLinkTile/BlockLinkTile.vue +193 -0
- package/src/components/BlockListCards/BlockListCards.stories.js +69 -0
- package/src/components/BlockListCards/BlockListCards.vue +129 -0
- package/src/components/BlockQuote/BlockQuote.stories.js +84 -0
- package/src/components/BlockQuote/BlockQuote.vue +87 -0
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.stories.js +60 -0
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +77 -0
- package/src/components/BlockRelatedLinks/RelatedLink.vue +85 -0
- package/src/components/BlockStreamfield/BlockStreamfield.stories.js +88 -0
- package/src/components/BlockStreamfield/BlockStreamfield.vue +333 -0
- package/src/components/BlockTable/BlockTable.stories.js +20 -0
- package/src/components/BlockTable/BlockTable.vue +73 -0
- package/src/components/BlockTeaser/BlockTeaser.stories.js +74 -0
- package/src/components/BlockTeaser/BlockTeaser.test.js +12 -0
- package/src/components/BlockTeaser/BlockTeaser.vue +174 -0
- package/src/components/BlockText/BlockText.stories.js +21 -0
- package/src/components/BlockText/BlockText.vue +44 -0
- package/src/components/BlockTwitterEmbed/BlockTwitterEmbed.stories.js +19 -0
- package/src/components/BlockTwitterEmbed/BlockTwitterEmbed.vue +61 -0
- package/src/components/BlockVideo/BlockVideo.stories.js +23 -0
- package/src/components/BlockVideo/BlockVideo.vue +41 -0
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.stories.js +20 -0
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +71 -0
- package/src/components/CalendarButton/CalendarButton.stories.js +36 -0
- package/src/components/CalendarButton/CalendarButton.vue +86 -0
- package/src/components/DetailHeadline/DetailHeadline.stories.js +48 -0
- package/src/components/DetailHeadline/DetailHeadline.vue +143 -0
- package/src/components/DsnWidget/DsnWidget.stories.js +29 -0
- package/src/components/DsnWidget/DsnWidget.vue +96 -0
- package/src/components/EventCard/EventCard.vue +188 -0
- package/src/components/EventDetailHero/EventDetailHero.stories.js +53 -0
- package/src/components/EventDetailHero/EventDetailHero.vue +64 -0
- package/src/components/FormContact/FormContact.stories.js +16 -0
- package/src/components/FormContact/FormContact.vue +202 -0
- package/src/components/FormNewsletterSignup/FormNewsletterSignup.stories.js +16 -0
- package/src/components/FormNewsletterSignup/FormNewsletterSignup.vue +355 -0
- package/src/components/HeroLarge/HeroLarge.stories.js +46 -0
- package/src/components/HeroLarge/HeroLarge.vue +93 -0
- package/src/components/HeroListingIndex/HeroListingIndex.stories.js +156 -0
- package/src/components/HeroListingIndex/HeroListingIndex.vue +80 -0
- package/src/components/HeroMedia/HeroMedia.stories.js +135 -0
- package/src/components/HeroMedia/HeroMedia.vue +174 -0
- package/src/components/HeroMedium/HeroMedium.stories.js +73 -0
- package/src/components/HeroMedium/HeroMedium.vue +166 -0
- package/src/components/HomepageCarousel/HomepageCarousel.stories.js +112 -0
- package/src/components/HomepageCarousel/HomepageCarousel.vue +382 -0
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.stories.js +60 -0
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +168 -0
- package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.stories.js +35 -0
- package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.vue +39 -0
- package/src/components/HomepageFeaturedRobot/HomepageFeaturedRobot.stories.js +93 -0
- package/src/components/HomepageFeaturedRobot/HomepageFeaturedRobot.vue +129 -0
- package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.stories.js +153 -0
- package/src/components/HomepageMissionsCarousel/HomepageMissionsCarousel.vue +282 -0
- package/src/components/HomepageMissionsCarousel/HomepageMissionsCarouselItem.vue +143 -0
- package/src/components/HomepageStats/HomepageStats.stories.js +155 -0
- package/src/components/HomepageStats/HomepageStats.vue +362 -0
- package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.stories.js +90 -0
- package/src/components/HomepageTeaserBlock/HomepageTeaserBlock.vue +156 -0
- package/src/components/HomepageTeaserBlock/HomepageTeaserBlockCardImage.vue +58 -0
- package/src/components/Icons/Icon360.vue +29 -0
- package/src/components/Icons/IconArrow.vue +26 -0
- package/src/components/Icons/IconArrows.vue +43 -0
- package/src/components/Icons/IconAudio.vue +27 -0
- package/src/components/Icons/IconBook.vue +21 -0
- package/src/components/Icons/IconBookUser.vue +21 -0
- package/src/components/Icons/IconBriefcase.vue +21 -0
- package/src/components/Icons/IconCalendar.vue +25 -0
- package/src/components/Icons/IconCaret.vue +26 -0
- package/src/components/Icons/IconCheckbox.vue +26 -0
- package/src/components/Icons/IconCheckboxSelected.vue +35 -0
- package/src/components/Icons/IconClose.vue +27 -0
- package/src/components/Icons/IconCloseLightbox.vue +25 -0
- package/src/components/Icons/IconDownload.vue +31 -0
- package/src/components/Icons/IconDropdown.vue +25 -0
- package/src/components/Icons/IconEnvelope.vue +21 -0
- package/src/components/Icons/IconExpand.vue +28 -0
- package/src/components/Icons/IconExternal.vue +25 -0
- package/src/components/Icons/IconFilter.vue +25 -0
- package/src/components/Icons/IconForwardTen.vue +38 -0
- package/src/components/Icons/IconGrid.vue +25 -0
- package/src/components/Icons/IconHand.vue +21 -0
- package/src/components/Icons/IconInfo.vue +26 -0
- package/src/components/Icons/IconLink.vue +27 -0
- package/src/components/Icons/IconList.vue +25 -0
- package/src/components/Icons/IconLocation.vue +37 -0
- package/src/components/Icons/IconMagnifyingGlass.vue +21 -0
- package/src/components/Icons/IconMedal.vue +21 -0
- package/src/components/Icons/IconMenu.vue +27 -0
- package/src/components/Icons/IconMinus.vue +26 -0
- package/src/components/Icons/IconMute.vue +27 -0
- package/src/components/Icons/IconNext.vue +25 -0
- package/src/components/Icons/IconPause.vue +28 -0
- package/src/components/Icons/IconPlay.vue +28 -0
- package/src/components/Icons/IconPlus.vue +25 -0
- package/src/components/Icons/IconPrev.vue +25 -0
- package/src/components/Icons/IconRewindTen.vue +42 -0
- package/src/components/Icons/IconSearch.vue +25 -0
- package/src/components/Icons/IconShare.vue +30 -0
- package/src/components/Icons/IconSlideshow.vue +30 -0
- package/src/components/Icons/IconSocialEmail.vue +26 -0
- package/src/components/Icons/IconSocialFacebook.vue +26 -0
- package/src/components/Icons/IconSocialGoogleClassroom.vue +26 -0
- package/src/components/Icons/IconSocialInstagram.vue +35 -0
- package/src/components/Icons/IconSocialPinterest.vue +26 -0
- package/src/components/Icons/IconSocialReddit.vue +25 -0
- package/src/components/Icons/IconSocialTwitter.vue +25 -0
- package/src/components/Icons/IconSocialYoutube.vue +35 -0
- package/src/components/Icons/IconStop.vue +27 -0
- package/src/components/Icons/IconTime.vue +25 -0
- package/src/components/Icons/IconUniversity.vue +21 -0
- package/src/components/Icons/IconUser.vue +26 -0
- package/src/components/Icons/IconVolume.vue +27 -0
- package/src/components/Icons/Icons.stories.ts +440 -0
- package/src/components/ImageDetailContextImage/ImageDetailContextImage.vue +125 -0
- package/src/components/LayoutHelper/LayoutHelper.vue +38 -0
- package/src/components/LoadingTransition/LoadingTransition.vue +48 -0
- package/src/components/LogoCaltech/LogoCaltech.stories.js +39 -0
- package/src/components/LogoCaltech/LogoCaltech.vue +29 -0
- package/src/components/LogoTribrand/LogoTribrand.stories.js +76 -0
- package/src/components/LogoTribrand/LogoTribrand.vue +93 -0
- package/src/components/MissionDetailAbout/MissionDetailAbout.stories.js +70 -0
- package/src/components/MissionDetailAbout/MissionDetailAbout.vue +204 -0
- package/src/components/MissionDetailHero/MissionDetailHero.stories.js +303 -0
- package/src/components/MissionDetailHero/MissionDetailHero.vue +292 -0
- package/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.js +278 -0
- package/src/components/MissionDetailHighlights/MissionDetailHighlights.vue +332 -0
- package/src/components/MissionDetailHighlights/MissionDetailHighlightsCarousel.vue +160 -0
- package/src/components/MissionDetailHighlights/MissionDetailHighlightsCarouselItem.vue +123 -0
- package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.stories.js +43 -0
- package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.vue +97 -0
- package/src/components/MissionDetailStats/DistanceStats.test.js +133 -0
- package/src/components/MissionDetailStats/DistanceStats.vue +250 -0
- package/src/components/MissionDetailStats/MissionDetailStats.stories.js +95 -0
- package/src/components/MissionDetailStats/MissionDetailStats.test.js +23 -0
- package/src/components/MissionDetailStats/MissionDetailStats.vue +187 -0
- package/src/components/MissionDetailStats/MissionDetailStatsMicro.vue +52 -0
- package/src/components/MissionDetailStats/MissionDetailStatsMini.vue +109 -0
- package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.stories.js +55 -0
- package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.vue +95 -0
- package/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.ts +24 -0
- package/src/components/MixinAnimationCaret/MixinAnimationCaret.vue +81 -0
- package/src/components/MixinCarousel/MixinCarousel.docs.mdx +33 -0
- package/src/components/MixinCarousel/MixinCarousel.stories.js +53 -0
- package/src/components/MixinCarousel/MixinCarousel.vue +236 -0
- package/src/components/MixinDropdownToggle/MixinDropdownToggle.vue +53 -0
- package/src/components/MixinFancybox/MixinFancybox.vue +405 -0
- package/src/components/MixinFancybox/MixinFancyboxOpenButton.vue +35 -0
- package/src/components/MixinVideoBg/MixinVideoBg.stories.js +23 -0
- package/src/components/MixinVideoBg/MixinVideoBg.vue +39 -0
- package/src/components/NavDesktop/NavDesktop.stories.js +254 -0
- package/src/components/NavDesktop/NavDesktop.vue +355 -0
- package/src/components/NavDesktop/NavDesktopDropdown.vue +201 -0
- package/src/components/NavDesktop/NavDesktopDropdownContent.vue +87 -0
- package/src/components/NavDesktop/NavDesktopDropdownMore.vue +112 -0
- package/src/components/NavDesktop/NavDesktopTopHat.vue +56 -0
- package/src/components/NavHeading/NavHeading.stories.js +23 -0
- package/src/components/NavHeading/NavHeading.vue +40 -0
- package/src/components/NavHighlight/NavHighlight.stories.js +42 -0
- package/src/components/NavHighlight/NavHighlight.vue +67 -0
- package/src/components/NavLinkList/NavLinkList.stories.js +46 -0
- package/src/components/NavLinkList/NavLinkList.vue +66 -0
- package/src/components/NavLogoLinks/NavLogoLinks.stories.js +22 -0
- package/src/components/NavLogoLinks/NavLogoLinks.vue +57 -0
- package/src/components/NavMobile/NavMobile.stories.js +231 -0
- package/src/components/NavMobile/NavMobile.vue +280 -0
- package/src/components/NavMobile/NavMobileDropdown.vue +175 -0
- package/src/components/NavMobile/NavMobileLink.vue +69 -0
- package/src/components/NavMobile/NavMobileSecondaryDropdown.vue +124 -0
- package/src/components/NavSearchForm/NavSearchForm.stories.js +13 -0
- package/src/components/NavSearchForm/NavSearchForm.vue +102 -0
- package/src/components/NavSecondary/NavSecondary.stories.js +24 -0
- package/src/components/NavSecondary/NavSecondary.vue +191 -0
- package/src/components/NavSecondary/NavSecondaryDropdown.vue +181 -0
- package/src/components/NavSecondary/NavSecondaryDropdownContent.vue +140 -0
- package/src/components/NavSecondary/NavSecondaryLink.vue +62 -0
- package/src/components/NavSocial/NavSocial.stories.js +20 -0
- package/src/components/NavSocial/NavSocial.vue +97 -0
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.stories.js +60 -0
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.test.js +30 -0
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.vue +73 -0
- package/src/components/ParallaxContainer/ParallaxContainer.stories.js +47 -0
- package/src/components/ParallaxContainer/ParallaxContainer.vue +76 -0
- package/src/components/ParallaxElement/ParallaxElement.vue +25 -0
- package/src/components/PastEventsCarousel/PastEventsCarousel.vue +86 -0
- package/src/components/PodcastEpisodeCard/PodcastEpisodeCard.vue +251 -0
- package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.stories.js +235 -0
- package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.vue +171 -0
- package/src/components/ProfileDetailSectionGroup/ProfileDetailSectionGroup.vue +84 -0
- package/src/components/RoboticsDetailStats/RoboticsDetailStats.stories.js +97 -0
- package/src/components/RoboticsDetailStats/RoboticsDetailStats.test.js +21 -0
- package/src/components/RoboticsDetailStats/RoboticsDetailStats.vue +217 -0
- package/src/components/RoboticsDetailStats/RoboticsDetailStatsMini.vue +182 -0
- package/src/components/SearchFilterGroup/SearchFilterGroup.stories.js +59 -0
- package/src/components/SearchFilterGroup/SearchFilterGroup.vue +221 -0
- package/src/components/SearchInput/SearchInput.stories.js +35 -0
- package/src/components/SearchInput/SearchInput.vue +93 -0
- package/src/components/SearchPagination/SearchPagination.stories.js +55 -0
- package/src/components/SearchPagination/SearchPagination.vue +173 -0
- package/src/components/SearchResultCard/SearchResultCard.stories.js +57 -0
- package/src/components/SearchResultCard/SearchResultCard.vue +282 -0
- package/src/components/SearchResultGridItem/SearchResultGridItem.stories.js +70 -0
- package/src/components/SearchResultGridItem/SearchResultGridItem.vue +140 -0
- package/src/components/SearchResultsList/SearchResultsList.vue +183 -0
- package/src/components/SearchSelectMenu/SearchSelectMenu.stories.js +25 -0
- package/src/components/SearchSelectMenu/SearchSelectMenu.vue +86 -0
- package/src/components/ShareButtons/ShareButtons.stories.js +16 -0
- package/src/components/ShareButtons/ShareButtons.vue +132 -0
- package/src/components/ShareButtonsEdu/ShareButtonsEdu.stories.js +14 -0
- package/src/components/ShareButtonsEdu/ShareButtonsEdu.vue +215 -0
- package/src/components/SkipLink/SkipLink.stories.js +9 -0
- package/src/components/SkipLink/SkipLink.vue +53 -0
- package/src/components/SwimlaneCTA/SwimlaneCTA.stories.mdx +77 -0
- package/src/components/SwimlaneCTA/SwimlaneCTA.vue +281 -0
- package/src/components/TheFooter/TheFooter.stories.js +602 -0
- package/src/components/TheFooter/TheFooter.vue +228 -0
- package/src/components/TheFooter/TheFooterSignUp.vue +61 -0
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.stories.js +106 -0
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.vue +76 -0
- package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.stories.js +93 -0
- package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.vue +68 -0
- package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.stories.js +38 -0
- package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.vue +104 -0
- package/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.stories.js +84 -0
- package/src/components/TopicDetailMissionSpotlight/TopicDetailMissionSpotlight.vue +112 -0
- package/src/components/TopicDetailMore/TopicDetailMore.stories.js +221 -0
- package/src/components/TopicDetailMore/TopicDetailMore.vue +124 -0
- package/src/components/TopicDetailMore/TopicDetailMoreVisibility.vue +51 -0
- package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.stories.js +116 -0
- package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.vue +130 -0
- package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.stories.js +34 -0
- package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.vue +98 -0
- package/src/components/YearTicker/YearTicker.stories.js +37 -0
- package/src/components/YearTicker/YearTicker.vue +132 -0
- package/src/docs/foundation/DynamicTokens.vue +106 -0
- package/src/docs/foundation/FontVariants.vue +80 -0
- package/src/docs/foundation/color.docs.mdx +112 -0
- package/src/docs/foundation/grid.docs.mdx +189 -0
- package/src/docs/foundation/grid.stories.js +263 -0
- package/src/docs/foundation/grid_layouthelpers.docs.mdx +78 -0
- package/src/docs/foundation/grid_layouthelpers.stories.js +53 -0
- package/src/docs/foundation/themes.docs.mdx +71 -0
- package/src/docs/foundation/themes.stories.js +63 -0
- package/src/docs/foundation/typography.docs.mdx +50 -0
- package/src/docs/foundation/typography.stories.js +119 -0
- package/src/interfaces.ts +129 -0
- package/src/main.ts +34 -0
- package/src/store/header.ts +40 -0
- package/src/store/theme.ts +27 -0
- package/src/templates/PageContent/PageContent.stories.js +92 -0
- package/src/templates/PageContent/PageContent.vue +140 -0
- package/src/templates/PageEventDetail/PageEventDetail.stories.js +104 -0
- package/src/templates/PageEventDetail/PageEventDetail.vue +358 -0
- package/src/templates/PageNewsDetail/PageNewsDetail.stories.js +158 -0
- package/src/templates/PageNewsDetail/PageNewsDetail.vue +242 -0
- package/src/templates/edu/PageEduNewsDetail.stories.js +64 -0
- package/src/templates/edu/PageEduNewsDetail.vue +155 -0
- package/src/templates/www/HomePage/HomePage.vue +30 -0
- package/src/utils/dayjs.js +32 -0
- package/src/utils/filters.js +33 -0
- package/src/utils/mixins.ts +353 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +24 -0
- package/tsconfig.json +29 -0
- package/tsconfig.node.json +11 -0
- package/vite.config.ts +55 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { defineComponent } from 'vue'
|
|
3
|
+
import IconExpand from '@explorer-1/vue/src/components/Icons/IconExpand.vue'
|
|
4
|
+
|
|
5
|
+
export default defineComponent({
|
|
6
|
+
name: 'MixinFancyboxOpenButton',
|
|
7
|
+
components: {
|
|
8
|
+
IconExpand
|
|
9
|
+
}
|
|
10
|
+
})
|
|
11
|
+
</script>
|
|
12
|
+
<template>
|
|
13
|
+
<div
|
|
14
|
+
ref="FancyboxOpenButton"
|
|
15
|
+
class="MixinFancyboxOpenButton"
|
|
16
|
+
role="presentation"
|
|
17
|
+
>
|
|
18
|
+
<div class="BaseButton -primary -icon-only pointer-events-none">
|
|
19
|
+
<span class="icon">
|
|
20
|
+
<IconExpand />
|
|
21
|
+
</span>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<style lang="scss">
|
|
27
|
+
.MixinFancyboxOpenButton {
|
|
28
|
+
// scoped styles for Fancybox Opener button
|
|
29
|
+
@apply relative pointer-events-none cursor-pointer z-10;
|
|
30
|
+
|
|
31
|
+
.BaseButton {
|
|
32
|
+
@apply -top-px -right-px absolute focus:outline-none xl:text-xl inline-block;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseVideoData } from './../BaseVideo/BaseVideo.stories'
|
|
2
|
+
import MixinVideoBg from './MixinVideoBg.vue'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Mixins/MixinVideoBg',
|
|
6
|
+
component: MixinVideoBg,
|
|
7
|
+
excludeStories: /.*Data$/,
|
|
8
|
+
decorators: [
|
|
9
|
+
() => ({
|
|
10
|
+
template: `<div id="storyDecorator" class="absolute inset-0"><story/></div>`
|
|
11
|
+
})
|
|
12
|
+
],
|
|
13
|
+
parameters: {
|
|
14
|
+
html: {
|
|
15
|
+
root: '#storyDecorator'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const Base = {
|
|
21
|
+
name: 'MixinVideoBg',
|
|
22
|
+
args: { video: BaseVideoData }
|
|
23
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<video
|
|
3
|
+
v-if="video && video.file"
|
|
4
|
+
loop
|
|
5
|
+
muted
|
|
6
|
+
playsinline
|
|
7
|
+
autoplay
|
|
8
|
+
preload="auto"
|
|
9
|
+
class="object-cover w-full h-full"
|
|
10
|
+
>
|
|
11
|
+
<source
|
|
12
|
+
v-if="video.fileWebm"
|
|
13
|
+
:src="video.fileWebm"
|
|
14
|
+
type="video/webm"
|
|
15
|
+
/>
|
|
16
|
+
<source
|
|
17
|
+
:src="video.file"
|
|
18
|
+
type="video/mp4"
|
|
19
|
+
/>
|
|
20
|
+
<source
|
|
21
|
+
v-if="video.fileOgg"
|
|
22
|
+
:src="video.fileOgg"
|
|
23
|
+
type="video/ogg"
|
|
24
|
+
/>
|
|
25
|
+
</video>
|
|
26
|
+
</template>
|
|
27
|
+
<script lang="ts">
|
|
28
|
+
import { defineComponent } from 'vue'
|
|
29
|
+
|
|
30
|
+
export default defineComponent({
|
|
31
|
+
name: 'MixinVideoBg',
|
|
32
|
+
props: {
|
|
33
|
+
video: {
|
|
34
|
+
type: Object,
|
|
35
|
+
required: false
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
</script>
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { MenuHighlightColumnData } from './../NavHighlight/NavHighlight.stories'
|
|
2
|
+
import { MenuLinkColumnWithHeaderData } from './../NavLinkList/NavLinkList.stories'
|
|
3
|
+
import NavDesktop from './NavDesktop.vue'
|
|
4
|
+
import NavDesktopTopHat from './NavDesktopTopHat.vue'
|
|
5
|
+
import NavDesktopDropdown from './NavDesktopDropdown.vue'
|
|
6
|
+
import NavDesktopDropdownContent from './NavDesktopDropdownContent.vue'
|
|
7
|
+
import NavDesktopDropdownMore from './NavDesktopDropdownMore.vue'
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: 'WWW/Header & Footer/Elements/NavDesktop',
|
|
11
|
+
component: NavDesktop,
|
|
12
|
+
excludeStories: /.*Data$/,
|
|
13
|
+
parameters: {
|
|
14
|
+
viewMode: 'canvas'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const NavDesktopTopHatData = {
|
|
19
|
+
topHat: [
|
|
20
|
+
{
|
|
21
|
+
linkPage: {
|
|
22
|
+
title: 'Home',
|
|
23
|
+
url: '/'
|
|
24
|
+
},
|
|
25
|
+
title: 'JPL',
|
|
26
|
+
path: null
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
linkPage: null,
|
|
30
|
+
title: 'Career',
|
|
31
|
+
path: 'https://jpl.jobs/'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
linkPage: null,
|
|
35
|
+
title: 'Science and Technology',
|
|
36
|
+
path: 'https://scienceandtechnology.jpl.nasa.gov/'
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// combined dropdown data
|
|
42
|
+
export const NavDesktopDropdownContentData = {
|
|
43
|
+
blockType: 'MenuPanel',
|
|
44
|
+
titleLink: {
|
|
45
|
+
linkPage: {
|
|
46
|
+
title: 'About',
|
|
47
|
+
url: '/about/'
|
|
48
|
+
},
|
|
49
|
+
title: null
|
|
50
|
+
},
|
|
51
|
+
menuColumns: [
|
|
52
|
+
MenuHighlightColumnData,
|
|
53
|
+
{
|
|
54
|
+
blockType: 'MenuDescriptionColumn',
|
|
55
|
+
description: 'Lorem ipsum dolor sit amet.',
|
|
56
|
+
title: 'About'
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
...MenuLinkColumnWithHeaderData,
|
|
60
|
+
heading: null,
|
|
61
|
+
headingPage: null
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
...MenuLinkColumnWithHeaderData,
|
|
65
|
+
heading: null,
|
|
66
|
+
headingPage: null
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
// combined dropdown data for "more" menu
|
|
71
|
+
export const NavDesktopDropdownMoreData = {
|
|
72
|
+
blockType: 'MenuMorePanel',
|
|
73
|
+
titleText: 'More',
|
|
74
|
+
strapline:
|
|
75
|
+
'JPL is a unique research facility that carries out robotic space and Earth science missions.',
|
|
76
|
+
menuColumns: [
|
|
77
|
+
{
|
|
78
|
+
blockType: 'MenuDescriptionColumn',
|
|
79
|
+
description: 'Lorem ipsum dolor sit amet.',
|
|
80
|
+
title: 'About'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
...MenuLinkColumnWithHeaderData,
|
|
84
|
+
heading: 'More from JPL',
|
|
85
|
+
headingPage: null
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
...MenuLinkColumnWithHeaderData,
|
|
89
|
+
heading: 'Explore Topics',
|
|
90
|
+
headingPage: null
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
blockType: 'MenuMoreHighlightsColumn',
|
|
94
|
+
heading: 'Discover',
|
|
95
|
+
headingPage: null,
|
|
96
|
+
highlights: [MenuHighlightColumnData, MenuHighlightColumnData]
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// combined header data // desktop and mobile
|
|
102
|
+
|
|
103
|
+
export const NavDesktopData = {
|
|
104
|
+
breadcrumb:
|
|
105
|
+
'{"/": [{"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"}]}',
|
|
106
|
+
...NavDesktopTopHatData,
|
|
107
|
+
primaryNavigation: [
|
|
108
|
+
NavDesktopDropdownContentData,
|
|
109
|
+
{
|
|
110
|
+
...NavDesktopDropdownContentData,
|
|
111
|
+
titleLink: {
|
|
112
|
+
linkPage: {
|
|
113
|
+
title: 'Missions',
|
|
114
|
+
url: '/missions/'
|
|
115
|
+
},
|
|
116
|
+
title: null
|
|
117
|
+
},
|
|
118
|
+
menuColumns: [
|
|
119
|
+
MenuHighlightColumnData,
|
|
120
|
+
{
|
|
121
|
+
blockType: 'MenuDescriptionColumn',
|
|
122
|
+
description: 'Lorem ipsum dolor sit amet.',
|
|
123
|
+
title: 'Missions'
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
...MenuLinkColumnWithHeaderData,
|
|
127
|
+
heading: null,
|
|
128
|
+
headingPage: null
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
...MenuLinkColumnWithHeaderData,
|
|
132
|
+
heading: null,
|
|
133
|
+
headingPage: null
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
...NavDesktopDropdownContentData,
|
|
139
|
+
titleLink: {
|
|
140
|
+
linkPage: {
|
|
141
|
+
title: 'News',
|
|
142
|
+
url: '/news/'
|
|
143
|
+
},
|
|
144
|
+
title: null
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
...NavDesktopDropdownContentData,
|
|
149
|
+
titleLink: {
|
|
150
|
+
linkPage: {
|
|
151
|
+
title: 'Galleries',
|
|
152
|
+
url: '/galleries/'
|
|
153
|
+
},
|
|
154
|
+
title: null
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
...NavDesktopDropdownContentData,
|
|
159
|
+
titleLink: {
|
|
160
|
+
linkPage: {
|
|
161
|
+
title: 'Engage',
|
|
162
|
+
url: '/engage/'
|
|
163
|
+
},
|
|
164
|
+
title: null
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
NavDesktopDropdownMoreData
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export const Nav = {
|
|
172
|
+
args: {
|
|
173
|
+
data: NavDesktopData,
|
|
174
|
+
headerVisible: true,
|
|
175
|
+
scrolledUp: false,
|
|
176
|
+
scrollTop: 0,
|
|
177
|
+
invertOverride: false
|
|
178
|
+
},
|
|
179
|
+
render: (args) => ({
|
|
180
|
+
components: { NavDesktop },
|
|
181
|
+
setup() {
|
|
182
|
+
return { args }
|
|
183
|
+
},
|
|
184
|
+
template: `<NavDesktop v-bind="args" />`
|
|
185
|
+
})
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export const NavInverted = {
|
|
189
|
+
args: {
|
|
190
|
+
data: NavDesktopData,
|
|
191
|
+
headerVisible: true,
|
|
192
|
+
scrolledUp: false,
|
|
193
|
+
scrollTop: 0,
|
|
194
|
+
invertOverride: true
|
|
195
|
+
},
|
|
196
|
+
render: (args) => ({
|
|
197
|
+
components: { NavDesktop },
|
|
198
|
+
setup() {
|
|
199
|
+
return { args }
|
|
200
|
+
},
|
|
201
|
+
template: `<div class="absolute inset-0">
|
|
202
|
+
<div style="height:2500px" class="nav-offset bg-dark-blue">
|
|
203
|
+
<NavDesktop v-bind="args" />
|
|
204
|
+
<div v-if="invertOverride" class="-nav-offset max-w-screen-3xl mx-auto">
|
|
205
|
+
<img class="w-full h-auto block" src="https://picsum.photos/1600/900" alt="Example Hero" />
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
</div>`
|
|
209
|
+
})
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export const TopHat = {
|
|
213
|
+
args: { data: NavDesktopData.topHat },
|
|
214
|
+
render: (args) => ({
|
|
215
|
+
components: { NavDesktopTopHat },
|
|
216
|
+
setup() {
|
|
217
|
+
return { args }
|
|
218
|
+
},
|
|
219
|
+
template: `<NavDesktopTopHat v-bind="args" />`
|
|
220
|
+
})
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export const Dropdown = {
|
|
224
|
+
args: { data: NavDesktopDropdownContentData },
|
|
225
|
+
render: (args) => ({
|
|
226
|
+
components: { NavDesktopDropdown, NavDesktopDropdownContent },
|
|
227
|
+
setup() {
|
|
228
|
+
return { args }
|
|
229
|
+
},
|
|
230
|
+
template: `<div class="relative"><NavDesktopDropdown><template #dropdownLabel>Label Text</template><NavDesktopDropdownContent v-bind="args" /></NavDesktopDropdown></div>`
|
|
231
|
+
})
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export const DropdownContent = {
|
|
235
|
+
args: { data: NavDesktopDropdownContentData },
|
|
236
|
+
render: (args) => ({
|
|
237
|
+
components: { NavDesktopDropdownContent },
|
|
238
|
+
setup() {
|
|
239
|
+
return { args }
|
|
240
|
+
},
|
|
241
|
+
template: `<NavDesktopDropdownContent v-bind="args" />`
|
|
242
|
+
})
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export const DropdownMore = {
|
|
246
|
+
args: { data: NavDesktopDropdownMoreData },
|
|
247
|
+
render: (args) => ({
|
|
248
|
+
components: { NavDesktopDropdownMore },
|
|
249
|
+
setup() {
|
|
250
|
+
return { args }
|
|
251
|
+
},
|
|
252
|
+
template: `<NavDesktopDropdownMore v-bind="args" />`
|
|
253
|
+
})
|
|
254
|
+
}
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="NavDesktop z-50 w-full duration-150 ease-in"
|
|
4
|
+
:class="{
|
|
5
|
+
'sticky top-0': scrolledUp,
|
|
6
|
+
relative: !scrolledUp,
|
|
7
|
+
'transition-colors': scrollTop === 0, // smooth bg transition if going from opaque to transparent at top of page
|
|
8
|
+
'transition-transform': scrollTop > 0 && scrolledCurrentPage, // If not at the top of the page, just transition the transform to prevents content from peeking through on header reveal.
|
|
9
|
+
'transform -translate-y-full': !scrolledUp && !headerVisible,
|
|
10
|
+
'-scrolled transform translate-y-0': scrolledUp && headerVisible && scrollTop > 0,
|
|
11
|
+
'-transparent': invert,
|
|
12
|
+
'-hasSecondary': !headerStore?.highlightPrimary
|
|
13
|
+
}"
|
|
14
|
+
>
|
|
15
|
+
<!-- navbar -->
|
|
16
|
+
<div class="header-bg max-w-screen-3xl absolute inset-0 mx-auto"></div>
|
|
17
|
+
<div class="px-4">
|
|
18
|
+
<div class="h-28 container flex items-center justify-between mx-auto">
|
|
19
|
+
<!-- branding -->
|
|
20
|
+
<NavLogoLinks class="z-20 flex flex-shrink-0 my-2 -ml-1">
|
|
21
|
+
<img
|
|
22
|
+
v-if="scrolledUp && headerVisible && scrollTop > 0"
|
|
23
|
+
:src="LogoColor"
|
|
24
|
+
alt="JPL Logo"
|
|
25
|
+
width="324"
|
|
26
|
+
height="72"
|
|
27
|
+
/>
|
|
28
|
+
<img
|
|
29
|
+
v-else-if="invert"
|
|
30
|
+
:src="LogoWhite"
|
|
31
|
+
alt="JPL Logo"
|
|
32
|
+
width="324"
|
|
33
|
+
height="72"
|
|
34
|
+
/>
|
|
35
|
+
<img
|
|
36
|
+
v-else
|
|
37
|
+
:src="LogoColor"
|
|
38
|
+
alt="JPL Logo"
|
|
39
|
+
width="324"
|
|
40
|
+
height="72"
|
|
41
|
+
/>
|
|
42
|
+
</NavLogoLinks>
|
|
43
|
+
<!-- main nav with dropdowns -->
|
|
44
|
+
<nav
|
|
45
|
+
v-if="data"
|
|
46
|
+
aria-label="Main"
|
|
47
|
+
class="main-navigation flex items-center justify-end w-full"
|
|
48
|
+
>
|
|
49
|
+
<div
|
|
50
|
+
v-show="!searchVisible"
|
|
51
|
+
class="flex flex-wrap items-center justify-end"
|
|
52
|
+
>
|
|
53
|
+
<template v-for="(item, index) in data.primaryNavigation">
|
|
54
|
+
<NavDesktopDropdown
|
|
55
|
+
v-if="item.blockType === 'MenuPanel' && item.titleLink"
|
|
56
|
+
:key="index"
|
|
57
|
+
:class="{ '-active': checkActive(item.titleLink) }"
|
|
58
|
+
:parent-scrolled="scrollTop"
|
|
59
|
+
>
|
|
60
|
+
<template #dropdownLabel>
|
|
61
|
+
{{ getLinkText(item.titleLink) }}
|
|
62
|
+
</template>
|
|
63
|
+
<NavDesktopDropdownContent :data="item" />
|
|
64
|
+
</NavDesktopDropdown>
|
|
65
|
+
<NavDesktopDropdown
|
|
66
|
+
v-else-if="item.blockType === 'MenuMorePanel'"
|
|
67
|
+
:key="`MenuMorePanel${index}`"
|
|
68
|
+
:class="{ '-active': checkActiveMore() }"
|
|
69
|
+
:parent-scrolled="scrollTop"
|
|
70
|
+
>
|
|
71
|
+
<template #dropdownLabel>
|
|
72
|
+
{{ item.titleText }}
|
|
73
|
+
</template>
|
|
74
|
+
<NavDesktopDropdownMore :data="item" />
|
|
75
|
+
</NavDesktopDropdown>
|
|
76
|
+
</template>
|
|
77
|
+
</div>
|
|
78
|
+
<!-- search -->
|
|
79
|
+
<div
|
|
80
|
+
class="relative z-20 flex items-center w-auto"
|
|
81
|
+
:class="{ 'w-2/3': searchVisible }"
|
|
82
|
+
>
|
|
83
|
+
<button
|
|
84
|
+
v-if="!searchVisible"
|
|
85
|
+
aria-label="Open Search"
|
|
86
|
+
class="p-4 -mr-4 text-lg cursor-pointer"
|
|
87
|
+
@click="toggleSearch()"
|
|
88
|
+
>
|
|
89
|
+
<IconSearch />
|
|
90
|
+
</button>
|
|
91
|
+
<div
|
|
92
|
+
v-else
|
|
93
|
+
class="flex items-center w-full"
|
|
94
|
+
>
|
|
95
|
+
<NavSearchForm
|
|
96
|
+
class="w-full"
|
|
97
|
+
@clear-search="closeSearch()"
|
|
98
|
+
@submit-form="closeSearch()"
|
|
99
|
+
/>
|
|
100
|
+
<button
|
|
101
|
+
aria-label="Close Search"
|
|
102
|
+
class="p-4 -mr-4 cursor-pointer"
|
|
103
|
+
@click="closeSearch()"
|
|
104
|
+
>
|
|
105
|
+
<IconClose class="text-sm" />
|
|
106
|
+
</button>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</nav>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</template>
|
|
114
|
+
<script lang="ts">
|
|
115
|
+
// @ts-nocheck
|
|
116
|
+
import { defineComponent } from 'vue'
|
|
117
|
+
import { mapStores } from 'pinia'
|
|
118
|
+
import { useHeaderStore } from './../../store/header'
|
|
119
|
+
import NavDesktopDropdown from './../NavDesktop/NavDesktopDropdown.vue'
|
|
120
|
+
import NavDesktopDropdownContent from './../NavDesktop/NavDesktopDropdownContent.vue'
|
|
121
|
+
import NavDesktopDropdownMore from './../NavDesktop/NavDesktopDropdownMore.vue'
|
|
122
|
+
import NavLogoLinks from './../NavLogoLinks/NavLogoLinks.vue'
|
|
123
|
+
import NavSearchForm from './../NavSearchForm/NavSearchForm.vue'
|
|
124
|
+
import IconSearch from './../Icons/IconSearch.vue'
|
|
125
|
+
import IconClose from './../Icons/IconClose.vue'
|
|
126
|
+
import type { LinkObject, BreadcrumbObject } from './../../utils/mixins'
|
|
127
|
+
import LogoColor from '@explorer-1/common/src/images/svg/logo-tribrand-color.svg'
|
|
128
|
+
import LogoWhite from '@explorer-1/common/src/images/svg/logo-tribrand-white.svg'
|
|
129
|
+
import type { BreadcrumbPathObject } from '../../interfaces'
|
|
130
|
+
import {
|
|
131
|
+
mixinIsActivePath,
|
|
132
|
+
mixinGetLinkText,
|
|
133
|
+
mixinUpdateGlobalChildren,
|
|
134
|
+
mixinUpdateSecondary
|
|
135
|
+
} from './../../utils/mixins'
|
|
136
|
+
|
|
137
|
+
export default defineComponent({
|
|
138
|
+
name: 'NavDesktop',
|
|
139
|
+
components: {
|
|
140
|
+
NavDesktopDropdown,
|
|
141
|
+
NavDesktopDropdownContent,
|
|
142
|
+
NavDesktopDropdownMore,
|
|
143
|
+
NavLogoLinks,
|
|
144
|
+
NavSearchForm,
|
|
145
|
+
IconSearch,
|
|
146
|
+
IconClose
|
|
147
|
+
},
|
|
148
|
+
props: {
|
|
149
|
+
data: {
|
|
150
|
+
type: Object || null,
|
|
151
|
+
required: false,
|
|
152
|
+
default: null
|
|
153
|
+
},
|
|
154
|
+
// this will override the initial display state (used in storybook)
|
|
155
|
+
invertOverride: {
|
|
156
|
+
type: Boolean,
|
|
157
|
+
required: false
|
|
158
|
+
},
|
|
159
|
+
headerVisible: {
|
|
160
|
+
type: Boolean,
|
|
161
|
+
required: false,
|
|
162
|
+
default: false
|
|
163
|
+
},
|
|
164
|
+
scrolled: {
|
|
165
|
+
type: Boolean,
|
|
166
|
+
required: false,
|
|
167
|
+
default: false
|
|
168
|
+
},
|
|
169
|
+
scrolledUp: {
|
|
170
|
+
type: Boolean,
|
|
171
|
+
required: false,
|
|
172
|
+
default: false
|
|
173
|
+
},
|
|
174
|
+
scrollTop: {
|
|
175
|
+
type: Number,
|
|
176
|
+
required: false,
|
|
177
|
+
default: 0
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
data() {
|
|
181
|
+
return {
|
|
182
|
+
searchVisible: false,
|
|
183
|
+
// scrolledCurrentPage is used to track if a user has scrolled on the current page.
|
|
184
|
+
// This is used in transition logic to avoid distracting animations on route changes
|
|
185
|
+
// without this check, the nav would swoop in/out on a route change if it was visible before the route change occured (e.g. partially scrolled up on a page)
|
|
186
|
+
scrolledCurrentPage: false,
|
|
187
|
+
LogoColor: LogoColor,
|
|
188
|
+
LogoWhite: LogoWhite
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
computed: {
|
|
192
|
+
...mapStores(useHeaderStore),
|
|
193
|
+
// get the breadcrumb JSON string and convert to object. used to determine active class.
|
|
194
|
+
breadcrumb(): BreadcrumbObject | null {
|
|
195
|
+
if (this.data) {
|
|
196
|
+
return JSON.parse(this.data.breadcrumb)
|
|
197
|
+
}
|
|
198
|
+
return null
|
|
199
|
+
},
|
|
200
|
+
// dynamic classes for header transparency and onScroll effects
|
|
201
|
+
invert(): boolean {
|
|
202
|
+
const highContrast =
|
|
203
|
+
typeof window !== 'undefined' // client-side only
|
|
204
|
+
? window.matchMedia('(forced-colors: active)').matches
|
|
205
|
+
: false
|
|
206
|
+
// storybook-safe
|
|
207
|
+
const headerTransparent = this.headerStore ? this.headerStore?.headerTransparent : false
|
|
208
|
+
return !highContrast && (headerTransparent || this.invertOverride)
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
watch: {
|
|
213
|
+
scrollTop(newVal) {
|
|
214
|
+
if (newVal > 0) {
|
|
215
|
+
this.scrolledCurrentPage = true
|
|
216
|
+
} else {
|
|
217
|
+
this.scrolledCurrentPage = false
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
$route() {
|
|
221
|
+
// close the search on route change
|
|
222
|
+
if (this.searchVisible) {
|
|
223
|
+
this.closeSearch()
|
|
224
|
+
}
|
|
225
|
+
// update header transparency
|
|
226
|
+
if (this.headerStore) {
|
|
227
|
+
this.headerStore.makeTransparent(false)
|
|
228
|
+
// to reset if active primary nav item should be highlighted
|
|
229
|
+
// content pages can override this a la carte
|
|
230
|
+
this.headerStore.updateHighlightPrimary(true)
|
|
231
|
+
// clear secondary nav each time
|
|
232
|
+
mixinUpdateSecondary(null)
|
|
233
|
+
}
|
|
234
|
+
// reset scrolledCurrentPage on route change
|
|
235
|
+
this.scrolledCurrentPage = false
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
methods: {
|
|
239
|
+
// safe way to retrieve url key from nav items. used with breadcrumb to determine active class.
|
|
240
|
+
getUrlKey(item: LinkObject): string | null {
|
|
241
|
+
if (item.linkPage) {
|
|
242
|
+
return item.linkPage.url
|
|
243
|
+
}
|
|
244
|
+
return null
|
|
245
|
+
},
|
|
246
|
+
// to determine active class on menu links and 'more' menu links
|
|
247
|
+
checkActive(item: LinkObject) {
|
|
248
|
+
const urlKey = this.getUrlKey(item)
|
|
249
|
+
if (urlKey && this.breadcrumb && this.breadcrumb.menu_links) {
|
|
250
|
+
// key into the breadcrumbs for each section
|
|
251
|
+
const objArray = this.breadcrumb.menu_links[urlKey]
|
|
252
|
+
// check if any of the paths contained in the array are active
|
|
253
|
+
const isActive = objArray.some((el: BreadcrumbPathObject) => mixinIsActivePath(el.path))
|
|
254
|
+
if (isActive) {
|
|
255
|
+
mixinUpdateGlobalChildren(this.breadcrumb.menu_links[urlKey])
|
|
256
|
+
}
|
|
257
|
+
return isActive
|
|
258
|
+
}
|
|
259
|
+
return false
|
|
260
|
+
},
|
|
261
|
+
checkActiveMore() {
|
|
262
|
+
if (this.breadcrumb && this.breadcrumb.more) {
|
|
263
|
+
// get the more menu array
|
|
264
|
+
const arr = this.breadcrumb.more
|
|
265
|
+
// check if array contains current path
|
|
266
|
+
const isActive = arr.some((el: BreadcrumbPathObject) => mixinIsActivePath(el.path))
|
|
267
|
+
if (isActive) {
|
|
268
|
+
// clear the secondary nav store when visiting a breadcrumb page
|
|
269
|
+
// ensures blank secondary nav unless explicitly set via content page "Promote" settings
|
|
270
|
+
mixinUpdateGlobalChildren(null)
|
|
271
|
+
}
|
|
272
|
+
return isActive
|
|
273
|
+
}
|
|
274
|
+
return false
|
|
275
|
+
},
|
|
276
|
+
toggleSearch() {
|
|
277
|
+
this.searchVisible ? this.closeSearch() : this.openSearch()
|
|
278
|
+
},
|
|
279
|
+
closeSearch() {
|
|
280
|
+
if (this.searchVisible) {
|
|
281
|
+
this.searchVisible = false
|
|
282
|
+
this.$emit('closeSearch')
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
openSearch() {
|
|
286
|
+
if (!this.searchVisible) {
|
|
287
|
+
this.searchVisible = true
|
|
288
|
+
this.$emit('openSearch')
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
getLinkText(item: LinkObject) {
|
|
292
|
+
return mixinGetLinkText(item)
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
})
|
|
296
|
+
</script>
|
|
297
|
+
<style lang="scss">
|
|
298
|
+
.NavDesktop {
|
|
299
|
+
@apply border-b border-transparent;
|
|
300
|
+
// styles for default vs transparent header
|
|
301
|
+
// underline color and logo inversion styles handled within their respective components
|
|
302
|
+
> .header-bg {
|
|
303
|
+
@apply bg-white;
|
|
304
|
+
|
|
305
|
+
.main-navigation {
|
|
306
|
+
> * {
|
|
307
|
+
@apply text-gray-dark;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
&.-transparent {
|
|
313
|
+
@apply bg-transparent;
|
|
314
|
+
|
|
315
|
+
> .header-bg {
|
|
316
|
+
@apply bg-gradient-to-b from-transparent-black-75 to-transparent bg-transparent;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.main-navigation {
|
|
320
|
+
> * {
|
|
321
|
+
@apply text-white;
|
|
322
|
+
|
|
323
|
+
.NavDesktopDropdown > button {
|
|
324
|
+
// mimics .text-contrast class
|
|
325
|
+
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
&.-scrolled {
|
|
332
|
+
@apply border-b border-gray-mid border-opacity-50 bg-white;
|
|
333
|
+
|
|
334
|
+
&.-transparent {
|
|
335
|
+
> .header-bg {
|
|
336
|
+
@apply opacity-0 bg-white;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.main-navigation {
|
|
340
|
+
> * {
|
|
341
|
+
@apply text-gray-dark;
|
|
342
|
+
|
|
343
|
+
.NavDesktopDropdown > button {
|
|
344
|
+
text-shadow: none;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
&.-hasSecondary {
|
|
351
|
+
@apply border-0 border-transparent;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
</style>
|