@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,175 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="NavDropdownMobile"
|
|
4
|
+
class="NavDropdownMobile"
|
|
5
|
+
>
|
|
6
|
+
<MixinDropdownToggle
|
|
7
|
+
:aria-expanded="dropdownVisible ? true : false"
|
|
8
|
+
class="group relative block w-full px-4 py-2 text-xl font-medium text-left"
|
|
9
|
+
:class="{
|
|
10
|
+
'-open': dropdownVisible
|
|
11
|
+
}"
|
|
12
|
+
@toggle-clicked="toggleDropdown()"
|
|
13
|
+
@close-dropdown="closeDropdown()"
|
|
14
|
+
>
|
|
15
|
+
<span
|
|
16
|
+
v-if="data"
|
|
17
|
+
class="block py-0 pl-6 -ml-4 border-l-4"
|
|
18
|
+
>
|
|
19
|
+
{{ (data.length && data[0].title) || getLinkText(data.titleLink) }}
|
|
20
|
+
</span>
|
|
21
|
+
</MixinDropdownToggle>
|
|
22
|
+
|
|
23
|
+
<div v-if="dropdownVisible">
|
|
24
|
+
<div class="mt-1 mb-3">
|
|
25
|
+
<template v-if="data?.links">
|
|
26
|
+
<NavMobileLink
|
|
27
|
+
v-for="(item, index) in data.links"
|
|
28
|
+
:key="index"
|
|
29
|
+
:data="item"
|
|
30
|
+
link-class="pl-12"
|
|
31
|
+
:exact="true"
|
|
32
|
+
/>
|
|
33
|
+
</template>
|
|
34
|
+
<div v-else-if="data?.length > 0">
|
|
35
|
+
<template v-for="(item, index) in data">
|
|
36
|
+
<template v-if="item.children && item.children.length > 0">
|
|
37
|
+
<NavMobileSecondaryDropdown
|
|
38
|
+
:key="index"
|
|
39
|
+
:item="item"
|
|
40
|
+
:index="index"
|
|
41
|
+
/>
|
|
42
|
+
</template>
|
|
43
|
+
<template v-else>
|
|
44
|
+
<NavMobileLink
|
|
45
|
+
:key="index"
|
|
46
|
+
:title="index === 0 ? 'Home' : undefined"
|
|
47
|
+
:data="item"
|
|
48
|
+
link-class="pl-12"
|
|
49
|
+
:exact="index === 0"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
52
|
+
</template>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script lang="ts">
|
|
60
|
+
// @ts-nocheck
|
|
61
|
+
import { defineComponent } from 'vue'
|
|
62
|
+
import type { LinkObject } from '../../utils/mixins'
|
|
63
|
+
import MixinDropdownToggle from './../MixinDropdownToggle/MixinDropdownToggle.vue'
|
|
64
|
+
import NavMobileLink from './../NavMobile/NavMobileLink.vue'
|
|
65
|
+
import NavMobileSecondaryDropdown from './../NavMobile/NavMobileSecondaryDropdown.vue'
|
|
66
|
+
import { mixinGetLinkText } from '../../utils/mixins'
|
|
67
|
+
export default defineComponent({
|
|
68
|
+
name: 'NavMobileDropdown',
|
|
69
|
+
components: {
|
|
70
|
+
MixinDropdownToggle,
|
|
71
|
+
NavMobileLink,
|
|
72
|
+
NavMobileSecondaryDropdown
|
|
73
|
+
},
|
|
74
|
+
props: {
|
|
75
|
+
// expects an object if populated from footer navigation data (default)
|
|
76
|
+
// expects an array when populated by secondary nav overrides
|
|
77
|
+
data: {
|
|
78
|
+
type: [Object, Array],
|
|
79
|
+
required: false
|
|
80
|
+
},
|
|
81
|
+
startOpen: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
required: false,
|
|
84
|
+
default: false
|
|
85
|
+
},
|
|
86
|
+
expandMultiple: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
required: false,
|
|
89
|
+
default: true
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
data(): {
|
|
93
|
+
dropdownVisible: boolean
|
|
94
|
+
theDropdown: HTMLElement | null
|
|
95
|
+
} {
|
|
96
|
+
return {
|
|
97
|
+
dropdownVisible: false,
|
|
98
|
+
theDropdown: null
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
mounted() {
|
|
102
|
+
if (this.startOpen) {
|
|
103
|
+
this.dropdownVisible = true
|
|
104
|
+
}
|
|
105
|
+
this.theDropdown = this.$refs.NavDropdownMobile as HTMLElement
|
|
106
|
+
if (!this.expandMultiple) {
|
|
107
|
+
// TODO: VUE3: find solution for emitting event from slot
|
|
108
|
+
// TODO: find a cleaner way to do this w/o using mounted or root level events
|
|
109
|
+
// scoped slots? https://github.com/vuejs/vue/issues/4332
|
|
110
|
+
// this.$root?.$on('openMobileDropdown', this.closeIfOtherOpened)
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
methods: {
|
|
114
|
+
toggleDropdown() {
|
|
115
|
+
if (this.dropdownVisible) {
|
|
116
|
+
this.closeDropdown()
|
|
117
|
+
} else {
|
|
118
|
+
this.openDropdown()
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
closeDropdown() {
|
|
122
|
+
if (this.dropdownVisible) {
|
|
123
|
+
this.dropdownVisible = false
|
|
124
|
+
this.$root?.$emit('closeMobileDropdown', this.theDropdown)
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
openDropdown() {
|
|
128
|
+
if (!this.dropdownVisible) {
|
|
129
|
+
this.dropdownVisible = true
|
|
130
|
+
this.$root?.$emit('openMobileDropdown', this.theDropdown)
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
// allows all to remain open by default. Can override this with expandMultiple prop
|
|
134
|
+
closeIfOtherOpened(opened: HTMLElement) {
|
|
135
|
+
if (opened !== this.theDropdown) {
|
|
136
|
+
this.closeDropdown()
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
getLinkText(link: LinkObject) {
|
|
140
|
+
return mixinGetLinkText(link)
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
</script>
|
|
145
|
+
<style lang="scss">
|
|
146
|
+
.NavDropdownMobile {
|
|
147
|
+
// pushes the dropdown below the closest parent div that has position:relative (e.g. the header)
|
|
148
|
+
> div {
|
|
149
|
+
&::before {
|
|
150
|
+
content: '';
|
|
151
|
+
@apply relative z-0 w-full h-full block;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
> button {
|
|
156
|
+
> span {
|
|
157
|
+
@apply border-transparent;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&.-open {
|
|
161
|
+
> span {
|
|
162
|
+
@apply border-primary font-bold;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
// parent div is active
|
|
167
|
+
&.-active {
|
|
168
|
+
> button {
|
|
169
|
+
> span {
|
|
170
|
+
@apply border-primary font-bold;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
</style>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<BaseLink
|
|
3
|
+
v-if="data"
|
|
4
|
+
variant="none"
|
|
5
|
+
class="NavMobileLink"
|
|
6
|
+
:link-class="`flex items-center py-2 text-lg leading-tight ${linkClass}`"
|
|
7
|
+
:href="data.path && !getRouterLink(data) ? data.path : undefined"
|
|
8
|
+
:to="getRouterLink(data) ? getRouterLink(data) : undefined"
|
|
9
|
+
:exact="exact"
|
|
10
|
+
>
|
|
11
|
+
<span>{{ title || getLinkText(data) }}</span>
|
|
12
|
+
</BaseLink>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script lang="ts">
|
|
16
|
+
import { defineComponent } from 'vue'
|
|
17
|
+
import { mixinGetRouterLink, mixinGetLinkText } from './../../utils/mixins'
|
|
18
|
+
import type { PropType } from 'vue'
|
|
19
|
+
import type { LinkObject } from './../../utils/mixins'
|
|
20
|
+
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
21
|
+
|
|
22
|
+
export default defineComponent({
|
|
23
|
+
name: 'NavMobileLink',
|
|
24
|
+
components: {
|
|
25
|
+
BaseLink
|
|
26
|
+
},
|
|
27
|
+
props: {
|
|
28
|
+
data: {
|
|
29
|
+
type: Object as PropType<LinkObject>,
|
|
30
|
+
required: false
|
|
31
|
+
},
|
|
32
|
+
// pass a custom title
|
|
33
|
+
title: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: false
|
|
36
|
+
},
|
|
37
|
+
linkClass: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: false
|
|
40
|
+
},
|
|
41
|
+
exact: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
required: false,
|
|
44
|
+
default: false
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
getRouterLink(link: LinkObject): string | undefined {
|
|
49
|
+
return mixinGetRouterLink(link)
|
|
50
|
+
},
|
|
51
|
+
getLinkText(link: LinkObject): string | undefined {
|
|
52
|
+
return mixinGetLinkText(link)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
</script>
|
|
57
|
+
<style lang="scss">
|
|
58
|
+
.NavMobileLink {
|
|
59
|
+
span {
|
|
60
|
+
@apply border-b border-transparent;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.nuxt-link-active {
|
|
64
|
+
span {
|
|
65
|
+
@apply font-medium border-primary #{!important};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="NavMobileSecondaryDropdown relative">
|
|
3
|
+
<MixinDropdownToggle
|
|
4
|
+
:aria-expanded="dropdownVisible ? true : false"
|
|
5
|
+
:path="item.path"
|
|
6
|
+
class="w-full group cursor-pointer pl-12 flex items-center py-2 text-lg leading-tight"
|
|
7
|
+
:class="{
|
|
8
|
+
'-open': dropdownVisible
|
|
9
|
+
}"
|
|
10
|
+
@toggle-clicked="toggleDropdown()"
|
|
11
|
+
@close-dropdown="closeDropdown()"
|
|
12
|
+
>
|
|
13
|
+
<span>{{ index === 0 ? 'Home' : item.title }}</span>
|
|
14
|
+
<IconCaret class="transform rotate-90 text-sm ml-2" />
|
|
15
|
+
</MixinDropdownToggle>
|
|
16
|
+
<template v-if="dropdownVisible">
|
|
17
|
+
<slot>
|
|
18
|
+
<NavSecondaryDropdownContent
|
|
19
|
+
class="relative w-full text-lg"
|
|
20
|
+
:item="item"
|
|
21
|
+
/>
|
|
22
|
+
</slot>
|
|
23
|
+
</template>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script lang="ts">
|
|
28
|
+
import { defineComponent } from 'vue'
|
|
29
|
+
import { mixinIsActivePath } from '../../utils/mixins'
|
|
30
|
+
import IconCaret from './../Icons/IconCaret.vue'
|
|
31
|
+
import MixinDropdownToggle from './../MixinDropdownToggle/MixinDropdownToggle.vue'
|
|
32
|
+
import NavSecondaryDropdownContent from './../NavSecondary/NavSecondaryDropdownContent.vue'
|
|
33
|
+
|
|
34
|
+
export default defineComponent({
|
|
35
|
+
name: 'NavMobileSecondaryDropdown',
|
|
36
|
+
|
|
37
|
+
components: {
|
|
38
|
+
IconCaret,
|
|
39
|
+
MixinDropdownToggle,
|
|
40
|
+
NavSecondaryDropdownContent
|
|
41
|
+
},
|
|
42
|
+
props: {
|
|
43
|
+
// the index from the parent v-for loop
|
|
44
|
+
index: {
|
|
45
|
+
type: Number,
|
|
46
|
+
required: false
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
// the nav item object that includes path, title, and children
|
|
50
|
+
item: {
|
|
51
|
+
type: Object,
|
|
52
|
+
required: true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
data() {
|
|
56
|
+
return {
|
|
57
|
+
dropdownVisible: false
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
computed: {
|
|
61
|
+
startOpen(): Boolean {
|
|
62
|
+
if (this.item) {
|
|
63
|
+
return mixinIsActivePath(this.item.path)
|
|
64
|
+
}
|
|
65
|
+
return false
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
watch: {
|
|
69
|
+
$route() {
|
|
70
|
+
if (this.dropdownVisible) {
|
|
71
|
+
this.closeDropdown()
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
mounted() {
|
|
76
|
+
if (this.startOpen) {
|
|
77
|
+
this.dropdownVisible = true
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
toggleDropdown() {
|
|
82
|
+
console.log('dropdown toggled')
|
|
83
|
+
if (this.dropdownVisible) {
|
|
84
|
+
this.closeDropdown()
|
|
85
|
+
} else {
|
|
86
|
+
this.openDropdown()
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
closeDropdown() {
|
|
90
|
+
if (this.dropdownVisible) {
|
|
91
|
+
this.dropdownVisible = false
|
|
92
|
+
this.$emit('closeDropdown')
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
openDropdown() {
|
|
96
|
+
if (!this.dropdownVisible) {
|
|
97
|
+
this.dropdownVisible = true
|
|
98
|
+
this.$emit('openDropdown')
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
</script>
|
|
104
|
+
<style lang="scss">
|
|
105
|
+
.NavMobileSecondaryDropdown {
|
|
106
|
+
.MixinDropdownToggle {
|
|
107
|
+
span {
|
|
108
|
+
@apply border-b border-transparent;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.-open {
|
|
112
|
+
span {
|
|
113
|
+
@apply border-gray-dark font-normal;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&.-active {
|
|
118
|
+
span {
|
|
119
|
+
@apply font-medium border-primary #{!important};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
</style>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form
|
|
3
|
+
class="NavSearchForm"
|
|
4
|
+
@submit.prevent="submitSearch()"
|
|
5
|
+
>
|
|
6
|
+
<SearchInput
|
|
7
|
+
v-model="searchQuery"
|
|
8
|
+
placeholder="Search JPL"
|
|
9
|
+
:underlined-input="!mobile"
|
|
10
|
+
:underlined-input-value="searchQuery"
|
|
11
|
+
:auto-focus="!mobile"
|
|
12
|
+
:inline="!mobile"
|
|
13
|
+
:default-colors="mobile"
|
|
14
|
+
@esc="clearSearch()"
|
|
15
|
+
/>
|
|
16
|
+
<button
|
|
17
|
+
type="submit"
|
|
18
|
+
class="sr-only"
|
|
19
|
+
aria-label="Submit"
|
|
20
|
+
>
|
|
21
|
+
Search
|
|
22
|
+
</button>
|
|
23
|
+
</form>
|
|
24
|
+
</template>
|
|
25
|
+
<script lang="ts">
|
|
26
|
+
import { defineComponent } from 'vue'
|
|
27
|
+
import SearchInput from './../SearchInput/SearchInput.vue'
|
|
28
|
+
|
|
29
|
+
export default defineComponent({
|
|
30
|
+
name: 'NavSearchForm',
|
|
31
|
+
components: {
|
|
32
|
+
SearchInput
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
mobile: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
searchQuery: undefined
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
methods: {
|
|
46
|
+
clearSearch() {
|
|
47
|
+
this.searchQuery = undefined
|
|
48
|
+
this.$emit('clearSearch')
|
|
49
|
+
},
|
|
50
|
+
submitSearch() {
|
|
51
|
+
this.$emit('submitForm')
|
|
52
|
+
if (this.$router) {
|
|
53
|
+
this.$router.push({
|
|
54
|
+
name: 'search',
|
|
55
|
+
query: { query: this.searchQuery }
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
</script>
|
|
62
|
+
<style lang="scss">
|
|
63
|
+
.NavSearchForm {
|
|
64
|
+
::placeholder {
|
|
65
|
+
@apply text-gray-dark;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.-transparent & {
|
|
69
|
+
::placeholder {
|
|
70
|
+
@apply text-white;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.-transparent.-scrolled & {
|
|
75
|
+
::placeholder {
|
|
76
|
+
@apply text-gray-dark;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
@screen lg {
|
|
80
|
+
// remove the default styling of search field
|
|
81
|
+
input[type='search']::-ms-clear {
|
|
82
|
+
display: none;
|
|
83
|
+
width: 0;
|
|
84
|
+
height: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
input[type='search']::-ms-reveal {
|
|
88
|
+
display: none;
|
|
89
|
+
width: 0;
|
|
90
|
+
height: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* clears the 'X' from Chrome */
|
|
94
|
+
input[type='search']::-webkit-search-decoration,
|
|
95
|
+
input[type='search']::-webkit-search-cancel-button,
|
|
96
|
+
input[type='search']::-webkit-search-results-button,
|
|
97
|
+
input[type='search']::-webkit-search-results-decoration {
|
|
98
|
+
display: none;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import NavSecondary from './NavSecondary.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'WWW/Header & Footer/Elements/NavSecondary',
|
|
5
|
+
component: NavSecondary,
|
|
6
|
+
excludeStories: /.*Data$/,
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: `This component is only visible on large viewports. Mobile secondary nav is handled in the \`NavMobile\` component.`
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const NavSecondaryData = {
|
|
17
|
+
breadcrumb:
|
|
18
|
+
'[{"path": "/go/test-site", "title": "Test Go Site", "children": []}, {"path": "/go/test-site/has-children", "title": "Has Children", "children": [{"path": "/go/test-site/has-children/level-3-has-children", "title": "Lvl 3 Has Children", "children": [{"path": "/go/test-site/has-children/level-3-has-children/level-4-no-children-1", "title": "Lvl 4 No Children 1"}, {"path": "/go/test-site/has-children/level-3-has-children/level-4-no-children-2", "title": "Lvl 4 No Children 2"}]}, {"path": "/go/test-site/has-children/level-3-no-children", "title": "Lvl 3 No Children", "children": []}]}, {"path": "/go/test-site/no-children-1", "title": "No Children 1", "children": []}, {"path": "/go/test-site/no-children-2", "title": "No Children 2", "children": []}, {"path": "/go/test-site/has-children", "title": "Has Children", "children": [{"path": "/go/test-site/has-children/level-3-has-children", "title": "Lvl 3 Has Children", "children": [{"path": "/go/test-site/has-children/level-3-has-children/level-4-no-children-1", "title": "Lvl 4 No Children 1"}, {"path": "/go/test-site/has-children/level-3-has-children/level-4-no-children-2", "title": "Lvl 4 No Children 2"}]}, {"path": "/go/test-site/has-children/level-3-no-children", "title": "Lvl 3 No Children", "children": []}]}]'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const SecondaryNav = {
|
|
22
|
+
name: 'NavSecondary',
|
|
23
|
+
args: { breadcrumb: NavSecondaryData.breadcrumb }
|
|
24
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav
|
|
3
|
+
v-if="enabled"
|
|
4
|
+
ref="NavSecondary"
|
|
5
|
+
aria-label="Secondary"
|
|
6
|
+
class="NavSecondary"
|
|
7
|
+
:class="{ 'has-intro': hasIntro }"
|
|
8
|
+
>
|
|
9
|
+
<div class="max-w-screen-3xl mx-auto">
|
|
10
|
+
<div
|
|
11
|
+
class="nav-secondary-container lg:container lg:px-0 lg:whitespace-normal border-gray-mid text-gray-mid-dark lg:overflow-visible relative px-4 pb-0 mx-auto overflow-x-auto text-sm font-medium whitespace-nowrap border-t border-opacity-50"
|
|
12
|
+
>
|
|
13
|
+
<div class="lg:ml-0 2xl:-mr-3 lg:justify-end flex -ml-3">
|
|
14
|
+
<template v-for="(item, index) in theBreadcrumb">
|
|
15
|
+
<template v-if="item.children && item.children.length > 0">
|
|
16
|
+
<NavSecondaryDropdown
|
|
17
|
+
:key="index"
|
|
18
|
+
:item="item"
|
|
19
|
+
:index="index"
|
|
20
|
+
:is-last="theBreadcrumb && index === theBreadcrumb.length - 1"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
<template v-else>
|
|
24
|
+
<NavSecondaryLink
|
|
25
|
+
:key="index"
|
|
26
|
+
:item="item"
|
|
27
|
+
:index="index"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
30
|
+
</template>
|
|
31
|
+
<slot></slot>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</nav>
|
|
36
|
+
</template>
|
|
37
|
+
<script lang="ts">
|
|
38
|
+
import { defineComponent } from 'vue'
|
|
39
|
+
import { mapStores } from 'pinia'
|
|
40
|
+
import { useHeaderStore } from './../../store/header'
|
|
41
|
+
import NavSecondaryDropdown from './NavSecondaryDropdown.vue'
|
|
42
|
+
import NavSecondaryLink from './NavSecondaryLink.vue'
|
|
43
|
+
import { mixinHighlightPrimary, mixinUpdateSecondary } from './../../utils/mixins'
|
|
44
|
+
import type { BreadcrumbPathObject } from './../../interfaces'
|
|
45
|
+
|
|
46
|
+
export default defineComponent({
|
|
47
|
+
/** The complexity of this component is due to the need for it to be populated from multiple data sources
|
|
48
|
+
** SecondaryNav will first check to see if there is a navigation override from the data fetched for this specific page (data.breadcrumb and store.header.secondaryNav)
|
|
49
|
+
** If there is no breadcrumb override, then it will fallback to using the breadcrumbs derived form the active global nav item (store.header.globalChildren)
|
|
50
|
+
** store.header.secondaryNav reverts to null on route changes, so the breadcrumb override is re-evaluted on every page
|
|
51
|
+
*/
|
|
52
|
+
components: {
|
|
53
|
+
NavSecondaryDropdown,
|
|
54
|
+
NavSecondaryLink
|
|
55
|
+
},
|
|
56
|
+
props: {
|
|
57
|
+
breadcrumb: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: false
|
|
60
|
+
},
|
|
61
|
+
hasIntro: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
required: false,
|
|
64
|
+
default: false
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
data() {
|
|
68
|
+
return {
|
|
69
|
+
isSticky: false
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
computed: {
|
|
73
|
+
...mapStores(useHeaderStore),
|
|
74
|
+
theBreadcrumb(): [BreadcrumbPathObject] | undefined {
|
|
75
|
+
if (this.breadcrumb) {
|
|
76
|
+
// we also want to update the store to override secondary nav
|
|
77
|
+
mixinUpdateSecondary(JSON.parse(this.breadcrumb))
|
|
78
|
+
return JSON.parse(this.breadcrumb)
|
|
79
|
+
} else if (this.headerStore) {
|
|
80
|
+
return this.headerStore.globalChildren
|
|
81
|
+
}
|
|
82
|
+
return undefined
|
|
83
|
+
},
|
|
84
|
+
enabled(): Boolean {
|
|
85
|
+
if ((this.theBreadcrumb && this.theBreadcrumb.length > 1) || this.$slots.default) {
|
|
86
|
+
return true
|
|
87
|
+
}
|
|
88
|
+
return false
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
mounted() {
|
|
92
|
+
if (this.enabled) {
|
|
93
|
+
// if there is a secondary nav displayed, then don't highlight the primary active item
|
|
94
|
+
mixinHighlightPrimary(false)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (
|
|
98
|
+
!('IntersectionObserver' in window) ||
|
|
99
|
+
!('IntersectionObserverEntry' in window) ||
|
|
100
|
+
!('intersectionRatio' in window.IntersectionObserverEntry.prototype)
|
|
101
|
+
) {
|
|
102
|
+
// intersection observer not supported
|
|
103
|
+
} else if (this.enabled) {
|
|
104
|
+
this.checkSticky()
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
methods: {
|
|
108
|
+
isExternal(path: string): boolean {
|
|
109
|
+
if (path && path.startsWith('http')) {
|
|
110
|
+
return true
|
|
111
|
+
}
|
|
112
|
+
return false
|
|
113
|
+
},
|
|
114
|
+
checkSticky() {
|
|
115
|
+
const stickyElement = this.$refs.NavSecondary as HTMLElement
|
|
116
|
+
// we need both observers for when the global nav is/isn't showing
|
|
117
|
+
const observer = new IntersectionObserver(
|
|
118
|
+
([e]) => {
|
|
119
|
+
e.target.classList.toggle('-is-sticky', e.intersectionRatio < 1)
|
|
120
|
+
},
|
|
121
|
+
{ threshold: [1] }
|
|
122
|
+
)
|
|
123
|
+
const observerOffset = new IntersectionObserver(
|
|
124
|
+
([e]) => {
|
|
125
|
+
e.target.classList.toggle('-is-sticky-offset', e.intersectionRatio < 1)
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
threshold: [1],
|
|
129
|
+
// would prefer to use rems but intersection observer only works with % or px
|
|
130
|
+
rootMargin: '-113px 0px 0px 0px'
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
observer.observe(stickyElement)
|
|
134
|
+
observerOffset.observe(stickyElement)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
</script>
|
|
139
|
+
<style lang="scss">
|
|
140
|
+
.NavSecondary {
|
|
141
|
+
top: -1px; // for intersection observer to work
|
|
142
|
+
@apply sticky z-50 w-full bg-white border-b border-gray-mid border-opacity-0 transition-border-opacity duration-150 ease-in;
|
|
143
|
+
@apply hidden;
|
|
144
|
+
@screen lg {
|
|
145
|
+
@apply block;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&.has-intro {
|
|
149
|
+
.nav-secondary-container {
|
|
150
|
+
@apply border-gray-mid border-opacity-0;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&.-is-sticky {
|
|
155
|
+
@apply border-gray-mid border-opacity-50;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.secondary-root {
|
|
159
|
+
.nuxt-link-exact-active {
|
|
160
|
+
span {
|
|
161
|
+
@apply text-primary font-semibold #{!important};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// for that nice horizontal scroll on mobile
|
|
167
|
+
.overflow-x-auto {
|
|
168
|
+
scrollbar-width: thin;
|
|
169
|
+
|
|
170
|
+
&::-webkit-scrollbar {
|
|
171
|
+
display: none;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// change sticky point if global nav is showing
|
|
176
|
+
.header-sticky-showing & {
|
|
177
|
+
@apply top-18;
|
|
178
|
+
|
|
179
|
+
&.-is-sticky-offset {
|
|
180
|
+
@apply border-gray-mid border-opacity-50 transition-all;
|
|
181
|
+
|
|
182
|
+
.nav-secondary-container {
|
|
183
|
+
@apply border-gray-mid border-opacity-50;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
@screen lg {
|
|
187
|
+
@apply top-28;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
</style>
|