@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,201 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="items"
|
|
4
|
+
class="BlockImageCarousel w-full overflow-hidden"
|
|
5
|
+
>
|
|
6
|
+
<div
|
|
7
|
+
ref="BlockImageCarousel"
|
|
8
|
+
class="swiper"
|
|
9
|
+
>
|
|
10
|
+
<div class="swiper-wrapper">
|
|
11
|
+
<slot name="firstSlide"></slot>
|
|
12
|
+
<BlockImageCarouselItem
|
|
13
|
+
v-for="(item, index) in items"
|
|
14
|
+
:key="index"
|
|
15
|
+
:image="item.image"
|
|
16
|
+
:caption="item.caption"
|
|
17
|
+
:display-caption="item.displayCaption"
|
|
18
|
+
:block-id="blockId"
|
|
19
|
+
:show-title="showTitle"
|
|
20
|
+
class="swiper-slide"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="swiper-nav lg:block absolute inset-x-0 top-0 hidden h-0 overflow-hidden z-70">
|
|
24
|
+
<div class="absolute inset-0">
|
|
25
|
+
<div class="absolute bottom-0 right-0 z-10 flex">
|
|
26
|
+
<BaseButton
|
|
27
|
+
class="swiper-prev xl:text-xl border-collapse"
|
|
28
|
+
aria-label="Previous slide"
|
|
29
|
+
>
|
|
30
|
+
<template #icon>
|
|
31
|
+
<IconPrev />
|
|
32
|
+
</template>
|
|
33
|
+
</BaseButton>
|
|
34
|
+
<BaseButton
|
|
35
|
+
class="swiper-next xl:text-xl border-collapse"
|
|
36
|
+
aria-label="Next slide"
|
|
37
|
+
>
|
|
38
|
+
<template #icon>
|
|
39
|
+
<IconNext />
|
|
40
|
+
</template>
|
|
41
|
+
</BaseButton>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="swiper-dots lg:hidden absolute top-0 z-50 w-full text-center">
|
|
46
|
+
<button
|
|
47
|
+
v-for="(_item, index) in itemsMobileNav"
|
|
48
|
+
:key="index"
|
|
49
|
+
class="pointer-events-auto inline-block px-1 py-3 cursor-pointer"
|
|
50
|
+
:aria-label="'Go to slide ' + (hasCover ? index : index + 1)"
|
|
51
|
+
@click="slideTo(hasCover ? index : index + 1)"
|
|
52
|
+
>
|
|
53
|
+
<span
|
|
54
|
+
class="inline-block w-3 h-3 rounded-full"
|
|
55
|
+
:class="currentIndex === index ? 'bg-jpl-red' : 'bg-gray-light-mid'"
|
|
56
|
+
></span>
|
|
57
|
+
</button>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</template>
|
|
62
|
+
<script lang="ts">
|
|
63
|
+
import { defineComponent } from 'vue'
|
|
64
|
+
import type { PropType } from 'vue'
|
|
65
|
+
import Swiper from 'swiper'
|
|
66
|
+
import { A11y, Navigation } from 'swiper/modules'
|
|
67
|
+
import type { SwiperOptions } from 'swiper/types'
|
|
68
|
+
import swiperOptions from '@explorer-1/common/src/js/_swiperOptions'
|
|
69
|
+
import BlockImageCarouselItem from './../BlockImageCarouselItem/BlockImageCarouselItem.vue'
|
|
70
|
+
import IconPrev from './../Icons/IconPrev.vue'
|
|
71
|
+
import IconNext from './../Icons/IconNext.vue'
|
|
72
|
+
import BaseButton from './../BaseButton/BaseButton.vue'
|
|
73
|
+
import type { ImageObject } from '../../interfaces'
|
|
74
|
+
const BlockImageCarouselOptions = swiperOptions.BlockImageCarousel
|
|
75
|
+
|
|
76
|
+
Swiper.use([Navigation, A11y])
|
|
77
|
+
|
|
78
|
+
export default defineComponent({
|
|
79
|
+
name: 'BlockImageCarousel',
|
|
80
|
+
components: {
|
|
81
|
+
BaseButton,
|
|
82
|
+
IconPrev,
|
|
83
|
+
IconNext,
|
|
84
|
+
BlockImageCarouselItem
|
|
85
|
+
},
|
|
86
|
+
props: {
|
|
87
|
+
items: {
|
|
88
|
+
type: Array as PropType<Partial<ImageObject>[]>,
|
|
89
|
+
required: false
|
|
90
|
+
},
|
|
91
|
+
loop: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: true
|
|
94
|
+
},
|
|
95
|
+
// watches this prop if parent component needs to control current slide
|
|
96
|
+
slide: {
|
|
97
|
+
type: Number,
|
|
98
|
+
required: false
|
|
99
|
+
},
|
|
100
|
+
blockId: {
|
|
101
|
+
type: String,
|
|
102
|
+
required: false
|
|
103
|
+
},
|
|
104
|
+
showTitle: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
required: false,
|
|
107
|
+
default: false
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
data(): {
|
|
111
|
+
currentIndex: number
|
|
112
|
+
slider: Swiper | null
|
|
113
|
+
currentCaption: string
|
|
114
|
+
sliderOptions: SwiperOptions
|
|
115
|
+
} {
|
|
116
|
+
return {
|
|
117
|
+
currentIndex: 0,
|
|
118
|
+
currentCaption: '',
|
|
119
|
+
slider: null,
|
|
120
|
+
sliderOptions: {
|
|
121
|
+
...BlockImageCarouselOptions,
|
|
122
|
+
loop: this.loop,
|
|
123
|
+
// this component has custom pagination
|
|
124
|
+
pagination: false,
|
|
125
|
+
on: {
|
|
126
|
+
slideChange: (swiper: Swiper) => {
|
|
127
|
+
// See https://github.com/vuejs/vue/issues/8721.
|
|
128
|
+
;(this as any).updateIndex(swiper.realIndex)
|
|
129
|
+
if (this.loop) {
|
|
130
|
+
// Swap fancybox data attributes in duplicate slides to avoid duplicate thumbnails in fancybox
|
|
131
|
+
// TODO: switch to fancyapp carousel for cleaner integration
|
|
132
|
+
Array.prototype.forEach.call(swiper.slides, function (slide) {
|
|
133
|
+
const fancyboxEl = slide.querySelector('.MixinFancybox')
|
|
134
|
+
if (fancyboxEl) {
|
|
135
|
+
const fancyboxId =
|
|
136
|
+
fancyboxEl.dataset.fancybox || fancyboxEl.dataset.triggerFancybox
|
|
137
|
+
if (slide.classList.contains('swiper-slide-visible')) {
|
|
138
|
+
fancyboxEl.dataset.fancybox = fancyboxId
|
|
139
|
+
fancyboxEl.removeAttribute('data-trigger-fancybox')
|
|
140
|
+
} else if (
|
|
141
|
+
slide.classList.contains('swiper-slide-duplicate') ||
|
|
142
|
+
slide.classList.contains('swiper-slide-duplicate-next')
|
|
143
|
+
) {
|
|
144
|
+
fancyboxEl.dataset.triggerFancybox = fancyboxId
|
|
145
|
+
fancyboxEl.removeAttribute('data-fancybox')
|
|
146
|
+
} else {
|
|
147
|
+
fancyboxEl.dataset.fancybox = fancyboxId
|
|
148
|
+
fancyboxEl.removeAttribute('data-trigger-fancybox')
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
computed: {
|
|
159
|
+
hasCover(): boolean {
|
|
160
|
+
if (this.$slots.firstSlide) {
|
|
161
|
+
return true
|
|
162
|
+
}
|
|
163
|
+
return false
|
|
164
|
+
},
|
|
165
|
+
itemsMobileNav(): Partial<ImageObject>[] | undefined {
|
|
166
|
+
const navArray = this.items
|
|
167
|
+
if (navArray && this.hasCover) {
|
|
168
|
+
navArray.push({ cover: 'hasCover' })
|
|
169
|
+
return navArray
|
|
170
|
+
}
|
|
171
|
+
return navArray
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
watch: {
|
|
175
|
+
slide(value) {
|
|
176
|
+
this.slideTo(value)
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
mounted() {
|
|
180
|
+
this.init()
|
|
181
|
+
},
|
|
182
|
+
methods: {
|
|
183
|
+
init() {
|
|
184
|
+
this.slider = new Swiper(this.$refs.BlockImageCarousel as HTMLElement, this.sliderOptions)
|
|
185
|
+
this.currentIndex = this.slider.realIndex
|
|
186
|
+
},
|
|
187
|
+
updateIndex(val: number) {
|
|
188
|
+
this.currentIndex = val
|
|
189
|
+
},
|
|
190
|
+
slideTo(val: number) {
|
|
191
|
+
if (this.slider) {
|
|
192
|
+
this.slider.slideTo(val)
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
})
|
|
197
|
+
</script>
|
|
198
|
+
<style lang="scss">
|
|
199
|
+
@import 'swiper/swiper-bundle.css';
|
|
200
|
+
@import '@explorer-1/common/src/scss/components/BlockImageCarousel';
|
|
201
|
+
</style>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import BlockImageCarouselItem from './BlockImageCarouselItem.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Blocks/BlockImageCarousel/BlockImageCarouselItem',
|
|
5
|
+
component: BlockImageCarouselItem,
|
|
6
|
+
decorators: [
|
|
7
|
+
() => ({
|
|
8
|
+
template: `<div id="storyDecorator" class="container mx-auto"><story/></div>`
|
|
9
|
+
})
|
|
10
|
+
],
|
|
11
|
+
argTypes: {
|
|
12
|
+
blockId: {
|
|
13
|
+
text: { type: 'string' },
|
|
14
|
+
required: false,
|
|
15
|
+
description:
|
|
16
|
+
'Fancybox: the block id is used to differentiate the fancybox of the items in a carousel from other carousels on the page. Generated by Wagtail. Usually provided by parent component `BlockImageCarousel`.'
|
|
17
|
+
},
|
|
18
|
+
showTitle: {
|
|
19
|
+
text: { type: 'string' },
|
|
20
|
+
required: false,
|
|
21
|
+
description:
|
|
22
|
+
"Fancybox: if the image title should be displayed in the item's fancybox. Usually provided by parent component `BlockImageCarousel`."
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
parameters: {
|
|
26
|
+
html: {
|
|
27
|
+
root: '#storyDecorator'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
excludeStories: /.*Data$/
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// shared data
|
|
34
|
+
export const BlockImageCarouselItemData = {
|
|
35
|
+
item: {
|
|
36
|
+
image: {
|
|
37
|
+
alt: 'Fourth image',
|
|
38
|
+
title: 'Image Title',
|
|
39
|
+
caption:
|
|
40
|
+
'<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vel porttitor urna. Maecenas at est laoreet, sagittis risus a, rutrum ipsum. Quisque tincidunt lacus nunc, dapibus facilisis felis scelerisque sit amet. </p>',
|
|
41
|
+
credit: 'NASA/JPL',
|
|
42
|
+
detailUrl: '/image/placeholder/',
|
|
43
|
+
original: 'https://picsum.photos/869/700',
|
|
44
|
+
src: {
|
|
45
|
+
height: 700,
|
|
46
|
+
url: 'https://picsum.photos/869/700',
|
|
47
|
+
width: 869
|
|
48
|
+
},
|
|
49
|
+
srcSet: 'https://picsum.photos/320/258 320w, https://picsum.photos/869/700 1024w'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const SingleItem = {
|
|
55
|
+
name: 'BlockImageCarouselItem',
|
|
56
|
+
args: {
|
|
57
|
+
image: BlockImageCarouselItemData.item.image,
|
|
58
|
+
caption: '<p>Custom caption.</p>',
|
|
59
|
+
displayCaption: true,
|
|
60
|
+
blockId: 'p9fipftka4',
|
|
61
|
+
showTitle: true
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="theImageData">
|
|
3
|
+
<MixinFancybox
|
|
4
|
+
:src="theImageData.original"
|
|
5
|
+
:caption="theImageData.caption"
|
|
6
|
+
:credit="theImageData.credit"
|
|
7
|
+
:detail-url="theImageData.detailUrl"
|
|
8
|
+
:gallery-name="`carousel-${blockId}`"
|
|
9
|
+
:title="showTitle ? theImageData.title : undefined"
|
|
10
|
+
show-thumbnails
|
|
11
|
+
>
|
|
12
|
+
<BaseImagePlaceholder
|
|
13
|
+
v-if="theImageData"
|
|
14
|
+
aspect-ratio="16:9"
|
|
15
|
+
dark-mode
|
|
16
|
+
>
|
|
17
|
+
<BaseImage
|
|
18
|
+
v-if="theImageData.src"
|
|
19
|
+
:src="theImageData.src.url"
|
|
20
|
+
:srcset="theImageData.srcSet"
|
|
21
|
+
:width="theImageData.src.width"
|
|
22
|
+
:height="theImageData.src.height"
|
|
23
|
+
:alt="theImageData.alt"
|
|
24
|
+
object-fit-class="contain"
|
|
25
|
+
image-class="swiper-lazy"
|
|
26
|
+
loading="lazy"
|
|
27
|
+
/>
|
|
28
|
+
</BaseImagePlaceholder>
|
|
29
|
+
</MixinFancybox>
|
|
30
|
+
<div
|
|
31
|
+
v-if="theImageData && hasCaptionArea"
|
|
32
|
+
class="lg:px-0 lg:pt-3 px-4 pt-10"
|
|
33
|
+
>
|
|
34
|
+
<BaseImageCaption
|
|
35
|
+
class="slide-caption"
|
|
36
|
+
:data="theImageData"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
<script lang="ts">
|
|
42
|
+
import { defineComponent } from 'vue'
|
|
43
|
+
import type { ImageObject } from '../../interfaces'
|
|
44
|
+
import MixinFancybox from './../MixinFancybox/MixinFancybox.vue'
|
|
45
|
+
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
46
|
+
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
47
|
+
import BaseImageCaption from './../BaseImageCaption/BaseImageCaption.vue'
|
|
48
|
+
|
|
49
|
+
export default defineComponent({
|
|
50
|
+
name: 'BlockImageCarouselItem',
|
|
51
|
+
components: {
|
|
52
|
+
MixinFancybox,
|
|
53
|
+
BaseImage,
|
|
54
|
+
BaseImagePlaceholder,
|
|
55
|
+
BaseImageCaption
|
|
56
|
+
},
|
|
57
|
+
props: {
|
|
58
|
+
image: {
|
|
59
|
+
type: Object,
|
|
60
|
+
required: true,
|
|
61
|
+
default: () => ({})
|
|
62
|
+
},
|
|
63
|
+
// if a caption should even be visible
|
|
64
|
+
displayCaption: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: true
|
|
67
|
+
},
|
|
68
|
+
// overrides caption provided with image model
|
|
69
|
+
caption: {
|
|
70
|
+
type: String,
|
|
71
|
+
required: false
|
|
72
|
+
},
|
|
73
|
+
// used to differentiate the fancybox of this carousel from others on the page; generated by Wagtail
|
|
74
|
+
blockId: {
|
|
75
|
+
type: String,
|
|
76
|
+
required: false
|
|
77
|
+
},
|
|
78
|
+
// if image titles should be displayed in the carousel's fancybox
|
|
79
|
+
showTitle: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
required: false,
|
|
82
|
+
default: false
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
computed: {
|
|
86
|
+
theCaption(): string | undefined {
|
|
87
|
+
if (this.caption && this.caption.length > 2 && this.displayCaption) {
|
|
88
|
+
return this.caption
|
|
89
|
+
} else if (
|
|
90
|
+
this.displayCaption &&
|
|
91
|
+
this.image &&
|
|
92
|
+
this.image.caption &&
|
|
93
|
+
this.image.caption.length > 2
|
|
94
|
+
) {
|
|
95
|
+
return this.image.caption
|
|
96
|
+
}
|
|
97
|
+
return undefined
|
|
98
|
+
},
|
|
99
|
+
// reform the data object with the computed caption
|
|
100
|
+
theImageData(): Partial<ImageObject> | null {
|
|
101
|
+
if (this.image) {
|
|
102
|
+
return {
|
|
103
|
+
...this.image,
|
|
104
|
+
caption: this.theCaption
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return null
|
|
108
|
+
},
|
|
109
|
+
hasCaptionArea(): string | boolean {
|
|
110
|
+
if (this.image) {
|
|
111
|
+
return this.theCaption || this.image.credit || this.image.detailUrl
|
|
112
|
+
}
|
|
113
|
+
return false
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
</script>
|
|
118
|
+
<style lang="scss">
|
|
119
|
+
@import '@explorer-1/common/src/scss/components/BlockImageCarouselItem';
|
|
120
|
+
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import BlockImageComparison from './BlockImageComparison.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Blocks/BlockImageComparison',
|
|
5
|
+
component: BlockImageComparison,
|
|
6
|
+
decorators: [
|
|
7
|
+
() => ({
|
|
8
|
+
template: `<div id="storyDecorator" class="container mx-auto"><story/></div>`
|
|
9
|
+
})
|
|
10
|
+
],
|
|
11
|
+
parameters: {
|
|
12
|
+
html: {
|
|
13
|
+
root: '#storyDecorator'
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
excludeStories: /.*Data$/
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const BlockImageComparisonData = {
|
|
20
|
+
blockType: 'ImageComparisonBlock',
|
|
21
|
+
beforeImage: {
|
|
22
|
+
src: {
|
|
23
|
+
url: 'https://picsum.photos/800/450?image=1'
|
|
24
|
+
},
|
|
25
|
+
srcCropped: {
|
|
26
|
+
url: 'https://picsum.photos/1320/1320?image=1'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
afterImage: {
|
|
30
|
+
src: {
|
|
31
|
+
url: 'https://picsum.photos/800/450?image=4'
|
|
32
|
+
},
|
|
33
|
+
srcCropped: {
|
|
34
|
+
url: 'https://picsum.photos/1320/1320?image=4'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
caption: '<p>Catnip test subjects from the JPL Mars Cultivation Lab</p>'
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// stories
|
|
41
|
+
export const Comparison = {
|
|
42
|
+
name: 'BlockImageComparison',
|
|
43
|
+
args: {
|
|
44
|
+
data: BlockImageComparisonData
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="data">
|
|
3
|
+
<client-only placeholder="Loading Image Comparison...">
|
|
4
|
+
<VueCompareImage
|
|
5
|
+
v-if="theBeforeImageSrc && theAfterImageSrc"
|
|
6
|
+
class="h-full animate-fadeIn"
|
|
7
|
+
:left-image="theBeforeImageSrc.url"
|
|
8
|
+
left-image-alt="Left image"
|
|
9
|
+
:right-image="theAfterImageSrc.url"
|
|
10
|
+
right-image-alt="Right image"
|
|
11
|
+
/>
|
|
12
|
+
</client-only>
|
|
13
|
+
<div
|
|
14
|
+
v-if="data.caption && data.caption.length > 2"
|
|
15
|
+
class="text-gray-mid-dark mt-3"
|
|
16
|
+
v-html="data.caption"
|
|
17
|
+
></div>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { defineComponent } from 'vue'
|
|
23
|
+
// import VueCompareImage from 'vue3-compare-image'
|
|
24
|
+
|
|
25
|
+
// const VueCompareImage = process.browser ? require('vue3-compare-image') : null
|
|
26
|
+
|
|
27
|
+
export default defineComponent({
|
|
28
|
+
name: 'BlockImageComparison',
|
|
29
|
+
// components: {
|
|
30
|
+
// VueCompareImage,
|
|
31
|
+
// },
|
|
32
|
+
props: {
|
|
33
|
+
data: {
|
|
34
|
+
type: Object,
|
|
35
|
+
required: true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
computed: {
|
|
39
|
+
theBeforeImageSrc() {
|
|
40
|
+
if (this.data && this.data.beforeImage) {
|
|
41
|
+
if (this.data.constrain && this.data.beforeImage.srcCropped) {
|
|
42
|
+
return this.data.beforeImage.srcCropped
|
|
43
|
+
}
|
|
44
|
+
return this.data.beforeImage.src
|
|
45
|
+
}
|
|
46
|
+
return null
|
|
47
|
+
},
|
|
48
|
+
theAfterImageSrc() {
|
|
49
|
+
if (this.data && this.data.afterImage) {
|
|
50
|
+
if (this.data.constrain && this.data.afterImage.srcCropped) {
|
|
51
|
+
return this.data.afterImage.srcCropped
|
|
52
|
+
}
|
|
53
|
+
return this.data.afterImage.src
|
|
54
|
+
}
|
|
55
|
+
return null
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
</script>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { BlockImageCarouselData } from './../BlockImageCarousel/BlockImageCarousel.stories'
|
|
2
|
+
import BlockImageGallery from './BlockImageGallery.vue'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/Blocks/BlockImageGallery',
|
|
6
|
+
component: BlockImageGallery,
|
|
7
|
+
decorators: [
|
|
8
|
+
() => ({
|
|
9
|
+
template: `<div id="storyDecorator" class="max-w-screen-3xl mx-auto"><story/></div>`
|
|
10
|
+
})
|
|
11
|
+
],
|
|
12
|
+
argTypes: {
|
|
13
|
+
blockId: {
|
|
14
|
+
text: { type: 'string' },
|
|
15
|
+
required: false,
|
|
16
|
+
description:
|
|
17
|
+
'Fancybox: the block id is used to differentiate the fancybox of this gallery from others on the page. Generated by Wagtail.'
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
parameters: {
|
|
22
|
+
html: {
|
|
23
|
+
root: '#storyDecorator'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
excludeStories: /.*Data$/
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const BlockImageGalleryData = {
|
|
30
|
+
label: 'Mars',
|
|
31
|
+
block: {
|
|
32
|
+
id: 'x121p1yuly',
|
|
33
|
+
blockType: 'ImageGalleryBlock',
|
|
34
|
+
galleryTitle: 'Image Gallery',
|
|
35
|
+
galleryDescription:
|
|
36
|
+
'Gallery description, maximus quis nibh eu, luctus ultrices nulla. Curabitur tempus, massa vitae porttitor porttitor, tortor erat tincidunt magna, vulputate varius nulla leo et mauris.',
|
|
37
|
+
coverImage: BlockImageCarouselData[0].image,
|
|
38
|
+
gallerySlides: BlockImageCarouselData.slice(1)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const ImageGalleryData = {
|
|
43
|
+
label: 'Mars',
|
|
44
|
+
'block-id': 'x121p1yuly',
|
|
45
|
+
title: 'Image Gallery',
|
|
46
|
+
description:
|
|
47
|
+
'Gallery description, maximus quis nibh eu, luctus ultrices nulla. Curabitur tempus, massa vitae porttitor porttitor, tortor erat tincidunt magna, vulputate varius nulla leo et mauris.',
|
|
48
|
+
cover: BlockImageCarouselData[0].image,
|
|
49
|
+
items: BlockImageCarouselData.slice(1)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const Gallery = {
|
|
53
|
+
name: 'BlockImageGallery',
|
|
54
|
+
args: ImageGalleryData
|
|
55
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<BlockImageCarousel
|
|
3
|
+
v-if="items"
|
|
4
|
+
class="BlockImageGallery"
|
|
5
|
+
:items="items"
|
|
6
|
+
:loop="false"
|
|
7
|
+
:block-id="blockId"
|
|
8
|
+
>
|
|
9
|
+
<template #firstSlide>
|
|
10
|
+
<MixinFancybox
|
|
11
|
+
v-if="cover"
|
|
12
|
+
:src="cover.original"
|
|
13
|
+
:caption="description"
|
|
14
|
+
:credit="cover.credit"
|
|
15
|
+
:detail-url="cover.detailUrl"
|
|
16
|
+
:title="title"
|
|
17
|
+
:gallery-name="`carousel-${blockId}`"
|
|
18
|
+
show-thumbnails
|
|
19
|
+
class="swiper-slide h-auto"
|
|
20
|
+
>
|
|
21
|
+
<div>
|
|
22
|
+
<div class="bg-gradient-to-b from-transparent-w50 to-black absolute inset-0 z-10">
|
|
23
|
+
<div class="text-contrast lg:p-20 flex items-end w-full h-full p-10 text-white">
|
|
24
|
+
<div class="w-full">
|
|
25
|
+
<p
|
|
26
|
+
v-if="label"
|
|
27
|
+
class="text-subtitle mb-3"
|
|
28
|
+
>
|
|
29
|
+
{{ label }}
|
|
30
|
+
</p>
|
|
31
|
+
<BaseHeading
|
|
32
|
+
v-if="title"
|
|
33
|
+
level="h2"
|
|
34
|
+
>
|
|
35
|
+
{{ title }}
|
|
36
|
+
</BaseHeading>
|
|
37
|
+
<p
|
|
38
|
+
v-if="description"
|
|
39
|
+
class="sm:block text-body-lg lg:w-2/3 xl:w-1/2 hidden mt-5"
|
|
40
|
+
>
|
|
41
|
+
{{ description }}
|
|
42
|
+
</p>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<BaseImagePlaceholder
|
|
47
|
+
v-if="cover && cover.src"
|
|
48
|
+
aspect-ratio="16:9"
|
|
49
|
+
dark-mode
|
|
50
|
+
>
|
|
51
|
+
<BaseImage
|
|
52
|
+
v-if="cover.src"
|
|
53
|
+
:src="cover.src.url"
|
|
54
|
+
:srcset="theSrcSet"
|
|
55
|
+
:width="cover.src.width"
|
|
56
|
+
:height="cover.src.height"
|
|
57
|
+
alt=""
|
|
58
|
+
object-fit-class="cover"
|
|
59
|
+
image-class="swiper-lazy"
|
|
60
|
+
loading="lazy"
|
|
61
|
+
/>
|
|
62
|
+
</BaseImagePlaceholder>
|
|
63
|
+
</div>
|
|
64
|
+
</MixinFancybox>
|
|
65
|
+
</template>
|
|
66
|
+
</BlockImageCarousel>
|
|
67
|
+
</template>
|
|
68
|
+
<script lang="ts">
|
|
69
|
+
import { defineComponent } from 'vue'
|
|
70
|
+
import { mixinGetSrcSet } from './../../utils/mixins'
|
|
71
|
+
import type { PropType } from 'vue'
|
|
72
|
+
import type { ImageObject } from '../../interfaces'
|
|
73
|
+
import MixinFancybox from './../MixinFancybox/MixinFancybox.vue'
|
|
74
|
+
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
75
|
+
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
76
|
+
import BaseHeading from './../BaseHeading/BaseHeading.vue'
|
|
77
|
+
import BlockImageCarousel from './../BlockImageCarousel/BlockImageCarousel.vue'
|
|
78
|
+
|
|
79
|
+
export default defineComponent({
|
|
80
|
+
name: 'BlockImageGallery',
|
|
81
|
+
components: {
|
|
82
|
+
MixinFancybox,
|
|
83
|
+
BaseImage,
|
|
84
|
+
BaseImagePlaceholder,
|
|
85
|
+
BaseHeading,
|
|
86
|
+
BlockImageCarousel
|
|
87
|
+
},
|
|
88
|
+
props: {
|
|
89
|
+
label: {
|
|
90
|
+
type: String,
|
|
91
|
+
required: false
|
|
92
|
+
},
|
|
93
|
+
title: {
|
|
94
|
+
type: String,
|
|
95
|
+
required: false
|
|
96
|
+
},
|
|
97
|
+
description: {
|
|
98
|
+
type: String,
|
|
99
|
+
required: false
|
|
100
|
+
},
|
|
101
|
+
cover: {
|
|
102
|
+
type: Object as PropType<ImageObject>,
|
|
103
|
+
required: false
|
|
104
|
+
},
|
|
105
|
+
items: {
|
|
106
|
+
type: Array as PropType<ImageObject[]>,
|
|
107
|
+
required: false
|
|
108
|
+
},
|
|
109
|
+
blockId: {
|
|
110
|
+
type: String,
|
|
111
|
+
required: false
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
computed: {
|
|
115
|
+
theSrcSet() {
|
|
116
|
+
return this.cover
|
|
117
|
+
? mixinGetSrcSet(this.cover)
|
|
118
|
+
? mixinGetSrcSet(this.cover)
|
|
119
|
+
: this.cover.srcSet
|
|
120
|
+
: ''
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
<style lang="scss">
|
|
127
|
+
@import '@explorer-1/common/src/scss/components/BlockImageGallery';
|
|
128
|
+
</style>
|