@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,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="shadow-jpl relative h-full"
|
|
4
|
+
:class="{ 'flex items-center min-h-32': !image }"
|
|
5
|
+
>
|
|
6
|
+
<div
|
|
7
|
+
v-if="image"
|
|
8
|
+
class="h-auto"
|
|
9
|
+
>
|
|
10
|
+
<BaseImagePlaceholder
|
|
11
|
+
aspect-ratio="16:9"
|
|
12
|
+
dark-mode
|
|
13
|
+
>
|
|
14
|
+
<BaseImage
|
|
15
|
+
v-if="image.src"
|
|
16
|
+
:src="image.src.url"
|
|
17
|
+
:srcset="theSrcSet"
|
|
18
|
+
:alt="image.alt"
|
|
19
|
+
:width="image.src.width"
|
|
20
|
+
:height="image.src.height"
|
|
21
|
+
object-fit-class="cover"
|
|
22
|
+
loading="lazy"
|
|
23
|
+
/>
|
|
24
|
+
</BaseImagePlaceholder>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="px-6 py-6">
|
|
27
|
+
<div class="text-primary text-subtitle">
|
|
28
|
+
{{ type }}
|
|
29
|
+
</div>
|
|
30
|
+
<hr
|
|
31
|
+
aria-hidden="true"
|
|
32
|
+
class="bg-primary text-primary w-8 h-2px border-0 my-2"
|
|
33
|
+
/>
|
|
34
|
+
<BaseHeading
|
|
35
|
+
size="h5"
|
|
36
|
+
level="h3"
|
|
37
|
+
class="mt-4 mb-2"
|
|
38
|
+
>
|
|
39
|
+
{{ title }}
|
|
40
|
+
</BaseHeading>
|
|
41
|
+
<p class="text-body-sm">{{ text }}</p>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
<script lang="ts">
|
|
46
|
+
import { defineComponent } from 'vue'
|
|
47
|
+
import { mixinGetSrcSet } from './../../utils/mixins'
|
|
48
|
+
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
49
|
+
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
50
|
+
import BaseHeading from './../BaseHeading/BaseHeading.vue'
|
|
51
|
+
|
|
52
|
+
export default defineComponent({
|
|
53
|
+
name: 'BlockCard',
|
|
54
|
+
components: {
|
|
55
|
+
BaseImagePlaceholder,
|
|
56
|
+
BaseImage,
|
|
57
|
+
BaseHeading
|
|
58
|
+
},
|
|
59
|
+
props: {
|
|
60
|
+
type: {
|
|
61
|
+
type: String,
|
|
62
|
+
required: false,
|
|
63
|
+
default: 'Factoid'
|
|
64
|
+
},
|
|
65
|
+
title: {
|
|
66
|
+
type: String,
|
|
67
|
+
required: false
|
|
68
|
+
},
|
|
69
|
+
text: {
|
|
70
|
+
type: String,
|
|
71
|
+
required: false
|
|
72
|
+
},
|
|
73
|
+
image: {
|
|
74
|
+
type: Object,
|
|
75
|
+
required: false
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
computed: {
|
|
79
|
+
theSrcSet() {
|
|
80
|
+
return this.image
|
|
81
|
+
? mixinGetSrcSet(this.image)
|
|
82
|
+
? mixinGetSrcSet(this.image)
|
|
83
|
+
: this.image.srcSet
|
|
84
|
+
: undefined
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
</script>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import BlockCardGroup from './BlockCardGroup.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Blocks/BlockCardGroup',
|
|
5
|
+
component: BlockCardGroup,
|
|
6
|
+
excludeStories: /.*Data$/
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const BlockCardGroupData = [
|
|
10
|
+
{
|
|
11
|
+
type: 'Factoid 1',
|
|
12
|
+
title: 'Nimble Limbs',
|
|
13
|
+
description:
|
|
14
|
+
'The robot has four limbs, each with seven degrees of freedom. The robot has four limbs, each with seven degrees of freedom. The robot has four limbs, each with seven degrees of freedom.',
|
|
15
|
+
image: {
|
|
16
|
+
alt: 'Fourth image',
|
|
17
|
+
src: {
|
|
18
|
+
height: 400,
|
|
19
|
+
url: 'https://picsum.photos/800/400',
|
|
20
|
+
width: 800
|
|
21
|
+
},
|
|
22
|
+
srcSet: 'https://picsum.photos/400/200 320w, https://picsum.photos/800/400 1024w'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
type: 'Factoid 2',
|
|
27
|
+
title: 'Nimble Limbs',
|
|
28
|
+
description: 'The robot has four limbs, each with seven degrees of freedom.',
|
|
29
|
+
image: {
|
|
30
|
+
alt: 'Fourth image',
|
|
31
|
+
src: {
|
|
32
|
+
height: 400,
|
|
33
|
+
url: 'https://picsum.photos/800/400',
|
|
34
|
+
width: 800
|
|
35
|
+
},
|
|
36
|
+
srcSet: 'https://picsum.photos/400/200 320w, https://picsum.photos/800/400 1024w'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: 'Factoid 3',
|
|
41
|
+
title: 'Nimble Limbs',
|
|
42
|
+
description:
|
|
43
|
+
'Proin sapien nulla, consequat et aliquam tristique, sollicitudin vitae lorem. Etiam nec vestibulum ante, semper blandit tortor. Nam id bibendum leo. Suspendisse a cursus felis, eget tristique nibh. Proin facilisis tortor eget pulvinar cursus.',
|
|
44
|
+
image: null
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'Factoid 4',
|
|
48
|
+
title: 'Nimble Limbs',
|
|
49
|
+
description: 'The robot has four limbs, each with seven degrees of freedom.',
|
|
50
|
+
image: {
|
|
51
|
+
alt: 'Fourth image',
|
|
52
|
+
src: {
|
|
53
|
+
height: 400,
|
|
54
|
+
url: 'https://picsum.photos/800/400',
|
|
55
|
+
width: 800
|
|
56
|
+
},
|
|
57
|
+
srcSet: 'https://picsum.photos/400/200 320w, https://picsum.photos/800/400 1024w'
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'Factoid 5',
|
|
62
|
+
title: 'Nimble Limbs',
|
|
63
|
+
description: 'The robot has four limbs, each with seven degrees of freedom.',
|
|
64
|
+
image: null
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
export const Group = {
|
|
69
|
+
name: 'BlockCardGroup',
|
|
70
|
+
args: { facts: BlockCardGroupData }
|
|
71
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="facts"
|
|
4
|
+
class="BlockCardGroup"
|
|
5
|
+
>
|
|
6
|
+
<div class="md:grid md:grid-cols-2 lg:grid-cols-3 3xl:grid-cols-4 hidden gap-8">
|
|
7
|
+
<BlockCard
|
|
8
|
+
v-for="(fact, index) of facts"
|
|
9
|
+
:key="`fact-${index}`"
|
|
10
|
+
class="col-span-1"
|
|
11
|
+
:type="fact.type"
|
|
12
|
+
:title="fact.title"
|
|
13
|
+
:text="fact.description"
|
|
14
|
+
:image="fact.image"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
<MixinCarousel
|
|
18
|
+
class="md:hidden sm:px-10 sm:-ml-10 py-10 -mt-10"
|
|
19
|
+
indent="col-1"
|
|
20
|
+
:slides-per-view="3"
|
|
21
|
+
no-links
|
|
22
|
+
>
|
|
23
|
+
<BlockCard
|
|
24
|
+
v-for="(fact, index) of facts"
|
|
25
|
+
:key="index"
|
|
26
|
+
:title="fact.title"
|
|
27
|
+
:text="fact.description"
|
|
28
|
+
:image="fact.image"
|
|
29
|
+
class="swiper-slide mb-5"
|
|
30
|
+
/>
|
|
31
|
+
</MixinCarousel>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
<script lang="ts">
|
|
35
|
+
import { defineComponent } from 'vue'
|
|
36
|
+
import type { PropType } from 'vue'
|
|
37
|
+
import type { ImageObject } from '../../interfaces'
|
|
38
|
+
import BlockCard from './../BlockCard/BlockCard.vue'
|
|
39
|
+
import MixinCarousel from './../MixinCarousel/MixinCarousel.vue'
|
|
40
|
+
|
|
41
|
+
interface Fact {
|
|
42
|
+
title: string
|
|
43
|
+
type: string
|
|
44
|
+
description: string
|
|
45
|
+
image: Partial<ImageObject>
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default defineComponent({
|
|
49
|
+
name: 'BlockCardGroup',
|
|
50
|
+
components: {
|
|
51
|
+
MixinCarousel,
|
|
52
|
+
BlockCard
|
|
53
|
+
},
|
|
54
|
+
props: {
|
|
55
|
+
facts: {
|
|
56
|
+
type: Array as PropType<Fact[]>,
|
|
57
|
+
required: false
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
</script>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import IconExternal from './../Icons/IconExternal.vue'
|
|
2
|
+
import BlockCircleImageCard from './BlockCircleImageCard.vue'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/Blocks/BlockCircleImageCard',
|
|
6
|
+
component: BlockCircleImageCard,
|
|
7
|
+
decorators: [
|
|
8
|
+
() => ({
|
|
9
|
+
template: `<div class="relative max-w-xl mx-auto container"><story/></div>`
|
|
10
|
+
})
|
|
11
|
+
],
|
|
12
|
+
argTypes: {
|
|
13
|
+
imageOnRight: {
|
|
14
|
+
control: {
|
|
15
|
+
type: 'boolean'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
parameters: {
|
|
20
|
+
slots: {
|
|
21
|
+
icon: {
|
|
22
|
+
description: 'Icon slot',
|
|
23
|
+
components: { IconExternal },
|
|
24
|
+
template: `<IconExternal v-if="args.icon" />`
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
excludeStories: /.*Data$/
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const BlockCircleImageCardData = {
|
|
32
|
+
title: 'First Flight of Technology for Returning Warheads from Space',
|
|
33
|
+
label: 'September 20, 1956',
|
|
34
|
+
secondaryLabel: 'Re-entry test vehicle program',
|
|
35
|
+
image: {
|
|
36
|
+
src: {
|
|
37
|
+
url: 'https://picsum.photos/130/130',
|
|
38
|
+
width: 130,
|
|
39
|
+
height: 130
|
|
40
|
+
},
|
|
41
|
+
srcSet: 'https://picsum.photos/90/90 320w, https://picsum.photos/130/130 1024w',
|
|
42
|
+
alt: 'Alt text for image'
|
|
43
|
+
},
|
|
44
|
+
imageOnRight: true,
|
|
45
|
+
icon: true
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const Default = {
|
|
49
|
+
args: {
|
|
50
|
+
...BlockCircleImageCardData,
|
|
51
|
+
icon: false
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const WithIcon = { args: BlockCircleImageCardData }
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="tag"
|
|
4
|
+
class="BlockCircleImageCard bg-white shadow-jpl h-full flex-grow"
|
|
5
|
+
:class="{ imageOnRight: imageOnRight }"
|
|
6
|
+
@click="$emit('click')"
|
|
7
|
+
>
|
|
8
|
+
<BaseImagePlaceholder
|
|
9
|
+
v-if="image"
|
|
10
|
+
transparent-mode
|
|
11
|
+
>
|
|
12
|
+
<!-- It’s important the image has no alt text so we can invert the card’s visual order without it changing the reading order. -->
|
|
13
|
+
<BaseImage
|
|
14
|
+
v-if="image.src"
|
|
15
|
+
:src="image.src.url"
|
|
16
|
+
:srcset="theSrcSet"
|
|
17
|
+
alt=""
|
|
18
|
+
:width="image.src.width"
|
|
19
|
+
:height="image.src.height"
|
|
20
|
+
image-class="rounded-full border-4 border-white"
|
|
21
|
+
object-fit-class="cover"
|
|
22
|
+
loading="lazy"
|
|
23
|
+
/>
|
|
24
|
+
</BaseImagePlaceholder>
|
|
25
|
+
<div class="p-8 flex-grow">
|
|
26
|
+
<div class="flex">
|
|
27
|
+
<div class="text-gray-dark text-subtitle mb-3">
|
|
28
|
+
{{ label }}
|
|
29
|
+
</div>
|
|
30
|
+
<span class="ml-auto">
|
|
31
|
+
<slot name="icon"></slot>
|
|
32
|
+
</span>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="text-gray-mid-dark text-subtitle">
|
|
35
|
+
{{ secondaryLabel }}
|
|
36
|
+
</div>
|
|
37
|
+
<BaseHeading
|
|
38
|
+
size="h5"
|
|
39
|
+
level="h3"
|
|
40
|
+
class="mt-3"
|
|
41
|
+
>
|
|
42
|
+
{{ title }}
|
|
43
|
+
</BaseHeading>
|
|
44
|
+
</div>
|
|
45
|
+
</component>
|
|
46
|
+
</template>
|
|
47
|
+
<script lang="ts">
|
|
48
|
+
import { defineComponent } from 'vue'
|
|
49
|
+
import { mixinGetSrcSet } from './../../utils/mixins'
|
|
50
|
+
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
51
|
+
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
52
|
+
import BaseHeading from './../BaseHeading/BaseHeading.vue'
|
|
53
|
+
|
|
54
|
+
export default defineComponent({
|
|
55
|
+
name: 'BlockCircleImageCard',
|
|
56
|
+
components: {
|
|
57
|
+
BaseImagePlaceholder,
|
|
58
|
+
BaseImage,
|
|
59
|
+
BaseHeading
|
|
60
|
+
},
|
|
61
|
+
props: {
|
|
62
|
+
tag: {
|
|
63
|
+
type: String,
|
|
64
|
+
required: false,
|
|
65
|
+
default: 'div'
|
|
66
|
+
},
|
|
67
|
+
title: {
|
|
68
|
+
type: String,
|
|
69
|
+
required: true
|
|
70
|
+
},
|
|
71
|
+
label: {
|
|
72
|
+
type: String,
|
|
73
|
+
required: false
|
|
74
|
+
},
|
|
75
|
+
secondaryLabel: {
|
|
76
|
+
type: String,
|
|
77
|
+
required: false
|
|
78
|
+
},
|
|
79
|
+
image: {
|
|
80
|
+
type: Object,
|
|
81
|
+
required: false
|
|
82
|
+
},
|
|
83
|
+
imageOnRight: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
required: false,
|
|
86
|
+
default: false
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
computed: {
|
|
90
|
+
theSrcSet() {
|
|
91
|
+
return this.image
|
|
92
|
+
? mixinGetSrcSet(this.image)
|
|
93
|
+
? mixinGetSrcSet(this.image)
|
|
94
|
+
: this.image.srcSet
|
|
95
|
+
: undefined
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
</script>
|
|
100
|
+
<style lang="scss">
|
|
101
|
+
@import '@explorer-1/common/src/scss/components/BlockCircleImageCard';
|
|
102
|
+
|
|
103
|
+
@media (forced-colors: active) {
|
|
104
|
+
.BlockCircleImageCard {
|
|
105
|
+
border: 1px solid;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.BlockCircleImageCard {
|
|
110
|
+
@apply md:z-40;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.BlockCircleImageCard .IconExternal {
|
|
114
|
+
@apply w-6 h-6 text-gray-mid-dark;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.BlockCircleImageCard .IconPlay {
|
|
118
|
+
@apply w-7 h-7 bg-jpl-red text-white;
|
|
119
|
+
}
|
|
120
|
+
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import BlockCta from './BlockCta.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Blocks/BlockCta',
|
|
5
|
+
component: BlockCta,
|
|
6
|
+
excludeStories: /.*Data$/
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// data
|
|
10
|
+
export const BlockCtaData = {
|
|
11
|
+
blockType: 'CTABlock',
|
|
12
|
+
heading: 'Sign up to our newsletter to get the latest JPL News',
|
|
13
|
+
text: 'Sign Up',
|
|
14
|
+
page: {
|
|
15
|
+
url: '/placeholder'
|
|
16
|
+
},
|
|
17
|
+
externalLink: ''
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const Default = {
|
|
21
|
+
args: {
|
|
22
|
+
data: BlockCtaData
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const ExternalLink = {
|
|
27
|
+
args: {
|
|
28
|
+
data: {
|
|
29
|
+
heading: BlockCtaData.heading,
|
|
30
|
+
text: BlockCtaData.text,
|
|
31
|
+
page: '',
|
|
32
|
+
externalLink: 'http://www.jpl.nasa.gov'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="bg-gray-light edu:bg-stars edu:bg-primary md:mx-0 sm:py-8 md:py-10 md:px-0 sm:mx-20 px-6 py-6 text-center"
|
|
4
|
+
>
|
|
5
|
+
<div class="md:mx-16 xl:mx-24">
|
|
6
|
+
<p class="text-h6 edu:text-white edu:font-extrabold">{{ data.heading }}</p>
|
|
7
|
+
</div>
|
|
8
|
+
<BaseButton
|
|
9
|
+
v-if="data.page"
|
|
10
|
+
:variant="buttonVariant"
|
|
11
|
+
:to="data.page.url"
|
|
12
|
+
class="md:mt-5 md:mb-2 mt-4 mb-1"
|
|
13
|
+
>
|
|
14
|
+
{{ data.text }}
|
|
15
|
+
</BaseButton>
|
|
16
|
+
<BaseButton
|
|
17
|
+
v-else-if="data.externalLink"
|
|
18
|
+
:variant="buttonVariant"
|
|
19
|
+
:href="data.externalLink"
|
|
20
|
+
class="md:mt-5 md:mb-2 mt-4 mb-1"
|
|
21
|
+
>
|
|
22
|
+
{{ data.text }}
|
|
23
|
+
<template #icon><IconExternal class="ml-2 text-sm" /></template>
|
|
24
|
+
<!-- TODO: replace with external link icon once icons are available -->
|
|
25
|
+
</BaseButton>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<script lang="ts">
|
|
29
|
+
import { defineComponent } from 'vue'
|
|
30
|
+
import { mapStores } from 'pinia'
|
|
31
|
+
import { useThemeStore } from '../../store/theme'
|
|
32
|
+
import BaseButton from './../BaseButton/BaseButton.vue'
|
|
33
|
+
import IconExternal from './../Icons/IconExternal.vue'
|
|
34
|
+
|
|
35
|
+
export default defineComponent({
|
|
36
|
+
name: 'BlockCta',
|
|
37
|
+
components: {
|
|
38
|
+
BaseButton,
|
|
39
|
+
IconExternal
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
data: {
|
|
43
|
+
type: Object,
|
|
44
|
+
required: true,
|
|
45
|
+
default: () => ({})
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
computed: {
|
|
49
|
+
...mapStores(useThemeStore),
|
|
50
|
+
buttonVariant() {
|
|
51
|
+
return this.themeStore.theme === 'ThemeEdu' ? 'dark' : 'primary'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
</script>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import BlockHeading from './BlockHeading.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Blocks/BlockHeading',
|
|
5
|
+
component: BlockHeading,
|
|
6
|
+
excludeStories: /.*Data$/
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const BlockHeadingData = {
|
|
10
|
+
blockType: 'HeadingBlock',
|
|
11
|
+
heading: 'Heading Text',
|
|
12
|
+
level: 'h3',
|
|
13
|
+
size: 'h3'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// stories
|
|
17
|
+
export const Heading = {
|
|
18
|
+
name: 'BlockHeading',
|
|
19
|
+
args: {
|
|
20
|
+
data: BlockHeadingData
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<BaseHeading
|
|
3
|
+
v-if="data"
|
|
4
|
+
:level="data.level"
|
|
5
|
+
:size="data.size"
|
|
6
|
+
>
|
|
7
|
+
{{ data.heading }}
|
|
8
|
+
</BaseHeading>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { defineComponent } from 'vue'
|
|
13
|
+
import BaseHeading from './../BaseHeading/BaseHeading.vue'
|
|
14
|
+
|
|
15
|
+
export default defineComponent({
|
|
16
|
+
name: 'BlockHeading',
|
|
17
|
+
components: {
|
|
18
|
+
BaseHeading
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
data: {
|
|
22
|
+
type: Object,
|
|
23
|
+
required: false
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
</script>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import BlockIframeEmbed from './BlockIframeEmbed.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Blocks/BlockIframeEmbed',
|
|
5
|
+
component: BlockIframeEmbed,
|
|
6
|
+
decorators: [
|
|
7
|
+
() => ({
|
|
8
|
+
template: `<div id="storyDecorator" class="mx-auto max-w-screen-md"><story/></div>`
|
|
9
|
+
})
|
|
10
|
+
],
|
|
11
|
+
parameters: {
|
|
12
|
+
html: {
|
|
13
|
+
root: '#storyDecorator'
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
excludeStories: /.*Data$/
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const BlockIframeEmbedData = {
|
|
20
|
+
blockType: 'IframeEmbedBlock',
|
|
21
|
+
title: 'Eyes Perserverance Embed',
|
|
22
|
+
caption: `
|
|
23
|
+
<p>With three giant blades stretching out some 66 feet (20 meters) from its cylindrical, six-sided body, the Juno spacecraft is a dynamic engineering marvel, spinning to keep itself stable as it makes oval-shaped orbits around Jupiter. View the full interactive experience at <a href="https://eyes.nasa.gov/apps/orrery/#/home">Eyes on the Solar System</a>.</p>
|
|
24
|
+
`,
|
|
25
|
+
url: `https://eyes.nasa.gov/apps/orrery/#/sc_perseverance`
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const Default = {
|
|
29
|
+
args: {
|
|
30
|
+
data: BlockIframeEmbedData
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export const LazyLoad = {
|
|
34
|
+
args: {
|
|
35
|
+
data: BlockIframeEmbedData
|
|
36
|
+
},
|
|
37
|
+
decorators: () => ({
|
|
38
|
+
template: `<div style="padding-top:3000px"><story/></div>`
|
|
39
|
+
})
|
|
40
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="data">
|
|
3
|
+
<template v-if="data.height">
|
|
4
|
+
<iframe
|
|
5
|
+
v-if="data.url"
|
|
6
|
+
ref="BlockIframeEmbed"
|
|
7
|
+
loading="lazy"
|
|
8
|
+
class="w-full border-none"
|
|
9
|
+
:class="{ lazyload: !lazyNative }"
|
|
10
|
+
:title="data.title"
|
|
11
|
+
:data-src="data.url"
|
|
12
|
+
width="90%"
|
|
13
|
+
:height="data.height"
|
|
14
|
+
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
15
|
+
allowfullscreen
|
|
16
|
+
></iframe>
|
|
17
|
+
</template>
|
|
18
|
+
<template v-else>
|
|
19
|
+
<BaseImagePlaceholder
|
|
20
|
+
v-if="data.url"
|
|
21
|
+
aspect-ratio="16:9"
|
|
22
|
+
dark-mode
|
|
23
|
+
>
|
|
24
|
+
<div>
|
|
25
|
+
<iframe
|
|
26
|
+
ref="BlockIframeEmbed"
|
|
27
|
+
loading="lazy"
|
|
28
|
+
class="w-full border-none"
|
|
29
|
+
:class="{ lazyload: !lazyNative }"
|
|
30
|
+
:title="data.title"
|
|
31
|
+
:data-src="data.url"
|
|
32
|
+
width="90%"
|
|
33
|
+
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
34
|
+
allowfullscreen
|
|
35
|
+
></iframe>
|
|
36
|
+
</div>
|
|
37
|
+
</BaseImagePlaceholder>
|
|
38
|
+
</template>
|
|
39
|
+
<div
|
|
40
|
+
v-if="data.caption && data.caption.length > 2"
|
|
41
|
+
class="lg:px-0 p-4 pb-0"
|
|
42
|
+
>
|
|
43
|
+
<BaseImageCaption :data="data" />
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
<script lang="ts">
|
|
48
|
+
import { defineComponent } from 'vue'
|
|
49
|
+
import BaseImageCaption from './../BaseImageCaption/BaseImageCaption.vue'
|
|
50
|
+
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
51
|
+
|
|
52
|
+
export default defineComponent({
|
|
53
|
+
name: 'BlockIframeEmbed',
|
|
54
|
+
components: { BaseImageCaption, BaseImagePlaceholder },
|
|
55
|
+
props: {
|
|
56
|
+
data: {
|
|
57
|
+
type: Object,
|
|
58
|
+
required: false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
data() {
|
|
62
|
+
return {
|
|
63
|
+
lazyNative: true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
mounted() {
|
|
67
|
+
this.featureDetectIframeLazyLoad()
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
featureDetectIframeLazyLoad() {
|
|
71
|
+
if ('loading' in HTMLIFrameElement.prototype) {
|
|
72
|
+
const iframe = this.$refs.BlockIframeEmbed as HTMLIFrameElement
|
|
73
|
+
this.lazyNative = true
|
|
74
|
+
// move data-src attribute to src
|
|
75
|
+
if (iframe.dataset.src) {
|
|
76
|
+
iframe.src = iframe.dataset.src
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
this.lazyNative = false
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
</script>
|