@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,70 @@
|
|
|
1
|
+
import SearchResultGridItem from './SearchResultGridItem.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Search/SearchResultGridItem',
|
|
5
|
+
component: SearchResultGridItem,
|
|
6
|
+
decorators: [
|
|
7
|
+
() => ({
|
|
8
|
+
template: `<div id="storyDecorator" class="relative grid grid-cols-2 gap-3 lg:grid-cols-3"><story/></div>`
|
|
9
|
+
})
|
|
10
|
+
],
|
|
11
|
+
argTypes: {
|
|
12
|
+
headingLevel: {
|
|
13
|
+
description:
|
|
14
|
+
'Change the heading level for semantic markup. This does not affect the style of the heading.',
|
|
15
|
+
control: {
|
|
16
|
+
type: 'select',
|
|
17
|
+
options: [null, 'h1', 'h2', 'h3', 'h4', 'h5']
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
parameters: {
|
|
22
|
+
html: {
|
|
23
|
+
root: '#storyDecorator'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
excludeStories: /.*Data$/
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const SearchResultGridCardData = {
|
|
30
|
+
page: {
|
|
31
|
+
content_type: '',
|
|
32
|
+
url: '/topics/placeholder-slug-1',
|
|
33
|
+
type: 'news',
|
|
34
|
+
topic: 'Moon',
|
|
35
|
+
date: 'May 22, 2018',
|
|
36
|
+
title: 'How engineers at NASA-JPL persevered to develop a ventilator',
|
|
37
|
+
image: {
|
|
38
|
+
src: {
|
|
39
|
+
url: 'https://picsum.photos/490/490',
|
|
40
|
+
width: 490,
|
|
41
|
+
height: 490
|
|
42
|
+
},
|
|
43
|
+
alt: 'Alt text'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
headingLevel: 'h2'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const StandardResult = {
|
|
50
|
+
args: {
|
|
51
|
+
...SearchResultGridCardData.page,
|
|
52
|
+
pageContentType: SearchResultGridCardData.page.content_type
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const NewsResult = {
|
|
57
|
+
args: {
|
|
58
|
+
...SearchResultGridCardData.page,
|
|
59
|
+
pageContentType: 'news_news',
|
|
60
|
+
headingLevel: 'h2'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const MissionResult = {
|
|
65
|
+
args: {
|
|
66
|
+
...SearchResultGridCardData.page,
|
|
67
|
+
pageContentType: 'missions_mission',
|
|
68
|
+
headingLevel: 'h2'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<BlockLinkCard
|
|
4
|
+
v-if="pageContentType === 'news_news'"
|
|
5
|
+
:url="url"
|
|
6
|
+
:title="title"
|
|
7
|
+
:label="topic"
|
|
8
|
+
:thumbnail-image="image"
|
|
9
|
+
:date="date"
|
|
10
|
+
:heading-level="headingLevel"
|
|
11
|
+
compact
|
|
12
|
+
/>
|
|
13
|
+
|
|
14
|
+
<BlockLinkTile
|
|
15
|
+
v-else-if="pageContentType === 'missions_mission'"
|
|
16
|
+
:url="url"
|
|
17
|
+
:title="title"
|
|
18
|
+
:thumbnail-image="image"
|
|
19
|
+
:heading-level="headingLevel"
|
|
20
|
+
compact
|
|
21
|
+
/>
|
|
22
|
+
|
|
23
|
+
<BaseLink
|
|
24
|
+
v-else
|
|
25
|
+
variant="none"
|
|
26
|
+
:to="url"
|
|
27
|
+
class="relative mb-6"
|
|
28
|
+
link-class="group block"
|
|
29
|
+
>
|
|
30
|
+
<div
|
|
31
|
+
v-if="image"
|
|
32
|
+
class="w-full"
|
|
33
|
+
>
|
|
34
|
+
<BaseImagePlaceholder aspect-ratio="1:1">
|
|
35
|
+
<BaseImage
|
|
36
|
+
v-if="image.src"
|
|
37
|
+
:src="image.src.url"
|
|
38
|
+
:width="image.src.width"
|
|
39
|
+
:height="image.src.height"
|
|
40
|
+
alt=""
|
|
41
|
+
class="sm:object-cover object-cover"
|
|
42
|
+
loading="lazy"
|
|
43
|
+
/>
|
|
44
|
+
<div
|
|
45
|
+
v-if="splitDate"
|
|
46
|
+
class="ThemeVariantLight absolute top-0 left-0 z-10 px-4 py-4 text-center text-white lg:py-6 bg-primary"
|
|
47
|
+
>
|
|
48
|
+
<div class="font-extrabold text-8xl leading-tight tracking-wider">
|
|
49
|
+
{{ splitDate.day }}
|
|
50
|
+
</div>
|
|
51
|
+
<div class="text-subtitle">
|
|
52
|
+
{{ splitDate.monthAndYear }}
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</BaseImagePlaceholder>
|
|
56
|
+
</div>
|
|
57
|
+
<component
|
|
58
|
+
:is="headingLevel || 'p'"
|
|
59
|
+
class="text-lg leading-normal mt-2 lg:mt-3 font-normal tracking-normal text-gray-dark can-hover:group-hover:text-gray-mid-dark"
|
|
60
|
+
>
|
|
61
|
+
<span>
|
|
62
|
+
{{ title }}
|
|
63
|
+
</span>
|
|
64
|
+
</component>
|
|
65
|
+
</BaseLink>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script lang="ts">
|
|
70
|
+
import type { PropType } from 'vue'
|
|
71
|
+
import { defineComponent } from 'vue'
|
|
72
|
+
import { mixinFormatSplitEventDates } from '../../utils/mixins'
|
|
73
|
+
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
74
|
+
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
75
|
+
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
76
|
+
import BlockLinkCard from './../BlockLinkCard/BlockLinkCard.vue'
|
|
77
|
+
import BlockLinkTile from './../BlockLinkTile/BlockLinkTile.vue'
|
|
78
|
+
import type { HeadingLevel } from './../BaseHeading/BaseHeading.vue'
|
|
79
|
+
|
|
80
|
+
export default defineComponent({
|
|
81
|
+
name: 'SearchResultGridItem',
|
|
82
|
+
components: {
|
|
83
|
+
BaseLink,
|
|
84
|
+
BaseImage,
|
|
85
|
+
BaseImagePlaceholder,
|
|
86
|
+
BlockLinkCard,
|
|
87
|
+
BlockLinkTile
|
|
88
|
+
},
|
|
89
|
+
props: {
|
|
90
|
+
url: {
|
|
91
|
+
type: String,
|
|
92
|
+
required: false
|
|
93
|
+
},
|
|
94
|
+
type: {
|
|
95
|
+
type: String,
|
|
96
|
+
required: false
|
|
97
|
+
},
|
|
98
|
+
topic: {
|
|
99
|
+
type: String,
|
|
100
|
+
required: false
|
|
101
|
+
},
|
|
102
|
+
date: {
|
|
103
|
+
type: String,
|
|
104
|
+
required: false
|
|
105
|
+
},
|
|
106
|
+
startDate: {
|
|
107
|
+
type: String,
|
|
108
|
+
required: false
|
|
109
|
+
},
|
|
110
|
+
endDate: {
|
|
111
|
+
type: String,
|
|
112
|
+
required: false
|
|
113
|
+
},
|
|
114
|
+
title: {
|
|
115
|
+
type: String,
|
|
116
|
+
required: false
|
|
117
|
+
},
|
|
118
|
+
image: {
|
|
119
|
+
type: Object,
|
|
120
|
+
required: false
|
|
121
|
+
},
|
|
122
|
+
headingLevel: {
|
|
123
|
+
type: (String as PropType<HeadingLevel>) || null,
|
|
124
|
+
required: false
|
|
125
|
+
},
|
|
126
|
+
pageContentType: {
|
|
127
|
+
type: String,
|
|
128
|
+
required: false
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
computed: {
|
|
132
|
+
splitDate(): { day: string; monthAndYear: string } | null {
|
|
133
|
+
if (this.startDate) {
|
|
134
|
+
return mixinFormatSplitEventDates(this.startDate, this.endDate)
|
|
135
|
+
}
|
|
136
|
+
return null
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
})
|
|
140
|
+
</script>
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- results container-->
|
|
3
|
+
<ol
|
|
4
|
+
id="search_results"
|
|
5
|
+
aria-label="Search results"
|
|
6
|
+
:class="{ 'grid grid-cols-12 gap-5': grid }"
|
|
7
|
+
>
|
|
8
|
+
<li
|
|
9
|
+
v-for="(page, index) of results"
|
|
10
|
+
:key="page.id"
|
|
11
|
+
:class="{
|
|
12
|
+
'md:col-span-6 lg:col-span-4 xl:col-span-3 col-span-12 gap-5': grid && !condenseGrid,
|
|
13
|
+
'md:col-span-6 lg:col-span-4 col-span-12 gap-5': grid && condenseGrid
|
|
14
|
+
}"
|
|
15
|
+
>
|
|
16
|
+
<template v-if="!grid">
|
|
17
|
+
<SearchResultCard
|
|
18
|
+
:is-events="isEvents"
|
|
19
|
+
:is-profiles="isProfiles"
|
|
20
|
+
:url="page.url"
|
|
21
|
+
:type="page.type"
|
|
22
|
+
:topic="page.topic"
|
|
23
|
+
:image="page.image"
|
|
24
|
+
:date="page.date"
|
|
25
|
+
:start-date="page.startDate"
|
|
26
|
+
:end-date="page.endDate"
|
|
27
|
+
:start-time="page.startTime"
|
|
28
|
+
:end-time="page.endTime"
|
|
29
|
+
:location="page.location"
|
|
30
|
+
:title="page.title"
|
|
31
|
+
:summary="page.summary"
|
|
32
|
+
:featured="featureFirstResult ? index === 0 && currentPage === 1 : false"
|
|
33
|
+
heading-level="h2"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
36
|
+
<template v-else>
|
|
37
|
+
<SearchResultGridItem
|
|
38
|
+
:page-content-type="page.content_type"
|
|
39
|
+
:url="page.url"
|
|
40
|
+
:type="page.type"
|
|
41
|
+
:topic="page.topic"
|
|
42
|
+
:image="page.image"
|
|
43
|
+
:date="page.date"
|
|
44
|
+
:start-date="page.startDate"
|
|
45
|
+
:end-date="page.endDate"
|
|
46
|
+
:start-time="page.startTime"
|
|
47
|
+
:end-time="page.endTime"
|
|
48
|
+
:title="page.title"
|
|
49
|
+
heading-level="h2"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
52
|
+
</li>
|
|
53
|
+
</ol>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script lang="ts">
|
|
57
|
+
import { defineComponent } from 'vue'
|
|
58
|
+
import type { ElasticSearchPage } from '../../interfaces'
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
import dayjs from './../../utils/dayjs'
|
|
61
|
+
import SearchResultCard from './../SearchResultCard/SearchResultCard.vue'
|
|
62
|
+
import SearchResultGridItem from './../SearchResultGridItem/SearchResultGridItem.vue'
|
|
63
|
+
|
|
64
|
+
export default defineComponent({
|
|
65
|
+
name: 'SearchResultsList',
|
|
66
|
+
components: {
|
|
67
|
+
SearchResultCard,
|
|
68
|
+
SearchResultGridItem
|
|
69
|
+
},
|
|
70
|
+
props: {
|
|
71
|
+
isEvents: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: false
|
|
74
|
+
},
|
|
75
|
+
isProfiles: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false
|
|
78
|
+
},
|
|
79
|
+
grid: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: false
|
|
82
|
+
},
|
|
83
|
+
// condense the grid if the sidebar is showing
|
|
84
|
+
condenseGrid: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: false
|
|
87
|
+
},
|
|
88
|
+
pages: [Array, Object],
|
|
89
|
+
searchQueryResult: [Array, Object],
|
|
90
|
+
featureFirstResult: [Boolean],
|
|
91
|
+
currentPage: {
|
|
92
|
+
type: Number,
|
|
93
|
+
default: 1,
|
|
94
|
+
required: false
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
computed: {
|
|
98
|
+
results(): ElasticSearchPage[] {
|
|
99
|
+
function parseType(type: string): string {
|
|
100
|
+
return type.toLowerCase().replace('.', '_')
|
|
101
|
+
}
|
|
102
|
+
function parseDate(date: string): string {
|
|
103
|
+
return dayjs(date).format('ll')
|
|
104
|
+
}
|
|
105
|
+
interface Page {
|
|
106
|
+
[key: string]: any
|
|
107
|
+
}
|
|
108
|
+
return this.pages
|
|
109
|
+
? this.pages
|
|
110
|
+
.filter((page: Page) => {
|
|
111
|
+
return 'url' in page._source
|
|
112
|
+
})
|
|
113
|
+
.map((page: Page) => {
|
|
114
|
+
// helpers
|
|
115
|
+
const handle = parseType(page._source.content_type[0])
|
|
116
|
+
// image field is different for image detail page
|
|
117
|
+
const image =
|
|
118
|
+
typeof page._source[handle + '__thumbnail_image'] !== 'undefined' &&
|
|
119
|
+
page._source[handle + '__thumbnail_image'] !== null
|
|
120
|
+
? page._source[handle + '__thumbnail_image']
|
|
121
|
+
: page._source[handle + '__image']
|
|
122
|
+
// date field is different for mission and event detail pages
|
|
123
|
+
let date
|
|
124
|
+
let topic =
|
|
125
|
+
handle === 'missions_mission'
|
|
126
|
+
? page._source[handle + '__status_filter']
|
|
127
|
+
: page._source.topic_labels_filter?.length
|
|
128
|
+
? page._source.topic_labels_filter[0]
|
|
129
|
+
: null
|
|
130
|
+
const pageType = page._source[handle + '__label']
|
|
131
|
+
if (handle === 'events_eventpage') {
|
|
132
|
+
date = 'Event date: ' + parseDate(page._source[handle + '__start_datetime'])
|
|
133
|
+
} else if (handle === 'missions_mission') {
|
|
134
|
+
date = page._source.display_date_filter
|
|
135
|
+
? 'Launch date: ' + page._source.display_date_filter
|
|
136
|
+
: typeof page._source.publication_date_filter !== 'undefined'
|
|
137
|
+
? 'Published: ' + parseDate(page._source.publication_date_filter)
|
|
138
|
+
: 'Published: ' + parseDate(page._source.first_published_at_filter)
|
|
139
|
+
} else if (handle === 'profiles_profilepage') {
|
|
140
|
+
topic = page._source[handle + '__go_site_name']
|
|
141
|
+
date = null
|
|
142
|
+
} else {
|
|
143
|
+
date =
|
|
144
|
+
typeof page._source.publication_date_filter !== 'undefined'
|
|
145
|
+
? parseDate(page._source.publication_date_filter)
|
|
146
|
+
: parseDate(page._source.first_published_at_filter)
|
|
147
|
+
}
|
|
148
|
+
page.content_type = handle
|
|
149
|
+
page.id = page._id
|
|
150
|
+
page.score = page._score
|
|
151
|
+
page.url = page._source.url
|
|
152
|
+
page.title = page._source.title
|
|
153
|
+
page.type = pageType
|
|
154
|
+
page.topic = topic
|
|
155
|
+
// properties for event's page
|
|
156
|
+
page.location =
|
|
157
|
+
handle === 'events_eventpage' ? page._source[handle + '__location'] : null
|
|
158
|
+
page.startDate =
|
|
159
|
+
handle === 'events_eventpage' ? page._source[handle + '__start_datetime'] : null
|
|
160
|
+
page.endDate =
|
|
161
|
+
handle === 'events_eventpage' ? page._source[handle + '__end_datetime'] : null
|
|
162
|
+
page.startTime =
|
|
163
|
+
handle === 'events_eventpage' ? page._source[handle + '__start_time_string'] : null
|
|
164
|
+
// properties that are different for profiles page
|
|
165
|
+
page.summary =
|
|
166
|
+
handle === 'profiles_profilepage'
|
|
167
|
+
? page._source[handle + '__job_title']
|
|
168
|
+
: page._source[handle + '__summary']
|
|
169
|
+
page.date = date
|
|
170
|
+
if (image) {
|
|
171
|
+
page.image = {
|
|
172
|
+
src: {
|
|
173
|
+
url: image.thumbnail_image
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return page
|
|
178
|
+
})
|
|
179
|
+
: undefined
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
})
|
|
183
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import SearchSelectMenu from './SearchSelectMenu.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Search/SearchSelectMenu',
|
|
5
|
+
component: SearchSelectMenu
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const SortBy = {
|
|
9
|
+
args: {
|
|
10
|
+
title: 'Sort by',
|
|
11
|
+
options: [
|
|
12
|
+
{ text: 'Relevance', value: 'score' },
|
|
13
|
+
{
|
|
14
|
+
text: 'Latest',
|
|
15
|
+
value: 'latestDate'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
text: 'Oldest',
|
|
19
|
+
value: 'oldestDate'
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
groupKey: 'sortBy',
|
|
23
|
+
selectValue: ''
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<label
|
|
4
|
+
class="sr-only"
|
|
5
|
+
:for="generateId()"
|
|
6
|
+
>{{ title }}</label
|
|
7
|
+
>
|
|
8
|
+
<select
|
|
9
|
+
:id="generateId()"
|
|
10
|
+
v-model="selectValueHandler"
|
|
11
|
+
class="border-0 text-primary can-hover:hover:text-primary-dark font-secondary font-semibold tracking-wider uppercase align-middle"
|
|
12
|
+
>
|
|
13
|
+
<option
|
|
14
|
+
disabled
|
|
15
|
+
value=""
|
|
16
|
+
>
|
|
17
|
+
{{ title }}
|
|
18
|
+
</option>
|
|
19
|
+
<option
|
|
20
|
+
v-for="option in options"
|
|
21
|
+
:key="option.value"
|
|
22
|
+
:value="option.value"
|
|
23
|
+
>
|
|
24
|
+
{{ option.text }}
|
|
25
|
+
</option>
|
|
26
|
+
</select>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
<script lang="ts">
|
|
30
|
+
// @ts-nocheck
|
|
31
|
+
export default {
|
|
32
|
+
name: 'SearchSelectMenu',
|
|
33
|
+
props: {
|
|
34
|
+
selectValue: String,
|
|
35
|
+
title: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: false
|
|
38
|
+
},
|
|
39
|
+
groupKey: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true
|
|
42
|
+
},
|
|
43
|
+
options: {
|
|
44
|
+
type: Array,
|
|
45
|
+
required: true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
emits: ['update:selectValue'],
|
|
49
|
+
computed: {
|
|
50
|
+
// to sync both ways parent <--> child
|
|
51
|
+
// ensures accurate filter visual state when using URL query strings
|
|
52
|
+
selectValueHandler: {
|
|
53
|
+
get() {
|
|
54
|
+
return this.selectValue
|
|
55
|
+
},
|
|
56
|
+
set(newValue) {
|
|
57
|
+
this.$emit('update:selectValue', newValue)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
watch: {
|
|
62
|
+
selectValue: {
|
|
63
|
+
// update URL with filter parameters
|
|
64
|
+
handler(e) {
|
|
65
|
+
let query = Object.assign({}, this.$route.query)
|
|
66
|
+
if (e.length > 0) {
|
|
67
|
+
query = {
|
|
68
|
+
...this.$route.query,
|
|
69
|
+
[this.groupKey]: e.toString()
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
// clear the param from the URL if no value is passed
|
|
73
|
+
delete query[this.groupKey]
|
|
74
|
+
}
|
|
75
|
+
// ensures history is saved with each change to filters
|
|
76
|
+
this.$router.push({ query })
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
generateId() {
|
|
82
|
+
return `select_${this.groupKey}`
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import ShareButtons from './ShareButtons.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/ShareButtons',
|
|
5
|
+
component: ShareButtons,
|
|
6
|
+
excludeStories: /.*Data$/
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// data
|
|
10
|
+
export const BlockShareButtonsData = {
|
|
11
|
+
title: 'Title of the story',
|
|
12
|
+
url: '/news/slug',
|
|
13
|
+
inline: false
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const Default = { args: BlockShareButtonsData }
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="ShareButtons relative flex flex-row items-start border-collapse"
|
|
4
|
+
:class="{ 'lg:absolute lg:top-0 lg:left-0 lg:flex-col': !inline }"
|
|
5
|
+
>
|
|
6
|
+
<BaseButton
|
|
7
|
+
variant="social"
|
|
8
|
+
class="-facebook w-12 h-12 text-2xl"
|
|
9
|
+
:href="facebookLink"
|
|
10
|
+
aria-label="Share to Facebook"
|
|
11
|
+
target="_blank"
|
|
12
|
+
rel="noopener"
|
|
13
|
+
>
|
|
14
|
+
<template #icon>
|
|
15
|
+
<IconSocialFacebook />
|
|
16
|
+
</template>
|
|
17
|
+
</BaseButton>
|
|
18
|
+
|
|
19
|
+
<BaseButton
|
|
20
|
+
variant="social"
|
|
21
|
+
class="-twitter w-12 h-12 -ml-px text-2xl"
|
|
22
|
+
:class="{ 'lg:ml-0 lg:-mt-px': !inline }"
|
|
23
|
+
:href="twitterLink"
|
|
24
|
+
aria-label="Share to X"
|
|
25
|
+
target="_blank"
|
|
26
|
+
rel="noopener"
|
|
27
|
+
>
|
|
28
|
+
<template #icon>
|
|
29
|
+
<IconSocialTwitter />
|
|
30
|
+
</template>
|
|
31
|
+
</BaseButton>
|
|
32
|
+
|
|
33
|
+
<BaseButton
|
|
34
|
+
variant="social"
|
|
35
|
+
class="-reddit w-12 h-12 -ml-px text-2xl"
|
|
36
|
+
:class="{ 'lg:ml-0 lg:-mt-px': !inline }"
|
|
37
|
+
:href="redditLink"
|
|
38
|
+
aria-label="Share to Reddit"
|
|
39
|
+
target="_blank"
|
|
40
|
+
rel="noopener"
|
|
41
|
+
>
|
|
42
|
+
<template #icon>
|
|
43
|
+
<IconSocialReddit />
|
|
44
|
+
</template>
|
|
45
|
+
</BaseButton>
|
|
46
|
+
|
|
47
|
+
<BaseButton
|
|
48
|
+
variant="social"
|
|
49
|
+
class="w-12 h-12 -ml-px text-2xl"
|
|
50
|
+
:class="{ 'lg:ml-0 lg:-mt-px': !inline }"
|
|
51
|
+
:href="mailLink"
|
|
52
|
+
aria-label="Share via Email"
|
|
53
|
+
target="_blank"
|
|
54
|
+
rel="noopener"
|
|
55
|
+
>
|
|
56
|
+
<template #icon>
|
|
57
|
+
<IconSocialEmail />
|
|
58
|
+
</template>
|
|
59
|
+
</BaseButton>
|
|
60
|
+
</div>
|
|
61
|
+
</template>
|
|
62
|
+
<script lang="ts">
|
|
63
|
+
import { defineComponent } from 'vue'
|
|
64
|
+
import { mixinCanonicalUrl } from './../../utils/mixins'
|
|
65
|
+
import BaseButton from './../BaseButton/BaseButton.vue'
|
|
66
|
+
import IconSocialFacebook from './../Icons/IconSocialFacebook.vue'
|
|
67
|
+
import IconSocialTwitter from './../Icons/IconSocialTwitter.vue'
|
|
68
|
+
import IconSocialReddit from './../Icons/IconSocialReddit.vue'
|
|
69
|
+
import IconSocialEmail from './../Icons/IconSocialEmail.vue'
|
|
70
|
+
|
|
71
|
+
export default defineComponent({
|
|
72
|
+
name: 'ShareButtons',
|
|
73
|
+
components: {
|
|
74
|
+
BaseButton,
|
|
75
|
+
IconSocialFacebook,
|
|
76
|
+
IconSocialTwitter,
|
|
77
|
+
IconSocialReddit,
|
|
78
|
+
IconSocialEmail
|
|
79
|
+
},
|
|
80
|
+
props: {
|
|
81
|
+
title: {
|
|
82
|
+
type: String,
|
|
83
|
+
required: true
|
|
84
|
+
},
|
|
85
|
+
url: {
|
|
86
|
+
type: String,
|
|
87
|
+
required: true
|
|
88
|
+
},
|
|
89
|
+
inline: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
required: false,
|
|
92
|
+
default: false
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
computed: {
|
|
96
|
+
encodedTitle(): string {
|
|
97
|
+
return encodeURIComponent(this.title)
|
|
98
|
+
},
|
|
99
|
+
encodedURL(): string {
|
|
100
|
+
return encodeURIComponent(mixinCanonicalUrl(this.url))
|
|
101
|
+
},
|
|
102
|
+
facebookLink(): string {
|
|
103
|
+
// See: https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.5
|
|
104
|
+
// https://www.facebook.com/dialog/feed?app_id=${appID}&link=${this.encodedURL}
|
|
105
|
+
// If we don't want an app id, this article describes an alternate way:
|
|
106
|
+
// https://css-tricks.com/simple-social-sharing-links/
|
|
107
|
+
// e.g. https://www.facebook.com/sharer.php?u=${this.encodedURL}
|
|
108
|
+
return `https://www.facebook.com/dialog/feed?app_id=361412888534196&link=${this.encodedURL}`
|
|
109
|
+
},
|
|
110
|
+
twitterLink(): string {
|
|
111
|
+
const handle = encodeURIComponent('NASAJPL')
|
|
112
|
+
return `https://twitter.com/share?url=${this.encodedURL}&text=${this.encodedTitle}&via=${handle}`
|
|
113
|
+
},
|
|
114
|
+
redditLink(): string {
|
|
115
|
+
return `https://reddit.com/submit?url=${this.encodedURL}&title=${this.encodedTitle}`
|
|
116
|
+
},
|
|
117
|
+
mailLink(): string {
|
|
118
|
+
return `mailto:?body=${this.encodedTitle}:%20${this.encodedURL}&subject=${this.encodedTitle}`
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
</script>
|
|
123
|
+
<style lang="scss" scoped>
|
|
124
|
+
.ShareButtons {
|
|
125
|
+
.BaseButton {
|
|
126
|
+
@apply relative;
|
|
127
|
+
@include hover {
|
|
128
|
+
@apply z-10;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import ShareButtonsEdu from './ShareButtonsEdu.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/EDU/ShareButtonsEdu',
|
|
5
|
+
component: ShareButtonsEdu
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const Default = {
|
|
9
|
+
name: 'Share Buttons',
|
|
10
|
+
args: {
|
|
11
|
+
url: 'https://jpl.nasa.gov/edu/news/nasas-ingenuity-mars-helicopter-recharges-its-batteries-in-flight',
|
|
12
|
+
title: "NASA's Ingenuity Mars Helicopter Recharges Its Batteries in Flight"
|
|
13
|
+
}
|
|
14
|
+
}
|