@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,68 @@
|
|
|
1
|
+
import { BaseImageCaptionData } from './../BaseImageCaption/BaseImageCaption.stories'
|
|
2
|
+
import BlockInlineImage from './BlockInlineImage.vue'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/Blocks/BlockInlineImage',
|
|
6
|
+
component: BlockInlineImage,
|
|
7
|
+
excludeStories: /.*(Data)$/
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const BlockInlineImageData = {
|
|
11
|
+
block: {
|
|
12
|
+
blockType: 'InlineImageBlock',
|
|
13
|
+
text: `<p>Maecenas luctus finibus arcu, a sodales leo varius quis. Aenean bibendum pellentesque eros, porttitor tempus lectus elementum venenatis. Aliquam erat volutpat. Pellentesque congue sapien lacus, sit amet imperdiet diam pellentesque vitae. In egestas aliquet tellus et pulvinar.</p>
|
|
14
|
+
<p>Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean vestibulum eros sed erat elementum mattis. Etiam fermentum velit id libero vulputate, quis lacinia nunc consequat. Nullam maximus turpis non elementum mattis. Proin volutpat tellus et nibh suscipit posuere. </p>
|
|
15
|
+
<p>Sed ipsum lorem, sodales a lacinia nec, sagittis in erat. Praesent vel est turpis. Suspendisse potenti. Vivamus quis odio ligula. Sed ornare magna elementum nibh tincidunt, non maximus felis lobortis. Cras in quam ornare, egestas nulla et, semper orci. Vivamus sed ornare ipsum. Aenean at tincidunt nunc, at euismod nibh. Integer molestie aliquam risus sed ultrices. </p>`,
|
|
16
|
+
alignTo: 'right',
|
|
17
|
+
image: {
|
|
18
|
+
...BaseImageCaptionData,
|
|
19
|
+
alt: 'Inline image',
|
|
20
|
+
src: {
|
|
21
|
+
height: 500,
|
|
22
|
+
url: 'https://picsum.photos/700/500',
|
|
23
|
+
width: 700
|
|
24
|
+
},
|
|
25
|
+
original: 'https://picsum.photos/1400/1000'
|
|
26
|
+
},
|
|
27
|
+
displayCaption: true
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const AlignRight = {
|
|
32
|
+
args: { data: BlockInlineImageData.block }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const CustomCaption = {
|
|
36
|
+
args: {
|
|
37
|
+
data: {
|
|
38
|
+
...BlockInlineImageData.block,
|
|
39
|
+
caption: '<p>My custom caption.</p>'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const AlignLeft = {
|
|
45
|
+
args: {
|
|
46
|
+
data: {
|
|
47
|
+
...BlockInlineImageData.block,
|
|
48
|
+
alignTo: 'left'
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const PortraitImage = {
|
|
54
|
+
args: {
|
|
55
|
+
data: {
|
|
56
|
+
...BlockInlineImageData.block,
|
|
57
|
+
image: {
|
|
58
|
+
...BaseImageCaptionData,
|
|
59
|
+
alt: 'Inline image',
|
|
60
|
+
src: {
|
|
61
|
+
height: 600,
|
|
62
|
+
url: 'https://picsum.photos//500/600',
|
|
63
|
+
width: 500
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="data"
|
|
4
|
+
class="BlockInlineImage lg:BaseGrid container mx-auto"
|
|
5
|
+
>
|
|
6
|
+
<!-- the image -->
|
|
7
|
+
<div
|
|
8
|
+
v-if="theImageData"
|
|
9
|
+
class="lg:mb-0 lg:w-full sm:w-xl lg:mt-0 lg:pr-4 2xl:pr-0 col-span-5 mx-auto mt-8 mb-8"
|
|
10
|
+
:class="data.alignTo === 'right' ? 'col-start-8 lg:order-2' : 'col-start-1 lg:order-1'"
|
|
11
|
+
>
|
|
12
|
+
<!-- should accommodate any size/shape image without cropping -->
|
|
13
|
+
<MixinFancybox
|
|
14
|
+
v-if="theImageData"
|
|
15
|
+
:src="theImageData.original"
|
|
16
|
+
:caption="theImageData.caption"
|
|
17
|
+
:credit="theImageData.credit"
|
|
18
|
+
:detail-url="theImageData.detailUrl"
|
|
19
|
+
>
|
|
20
|
+
<BaseImagePlaceholder aspect-ratio="none">
|
|
21
|
+
<BaseImage
|
|
22
|
+
v-if="theImageData && theImageData.src"
|
|
23
|
+
:src="theImageData.src.url"
|
|
24
|
+
:srcset="theSrcSet"
|
|
25
|
+
:width="theImageData.src.width"
|
|
26
|
+
:height="theImageData.src.height"
|
|
27
|
+
image-class="w-full h-auto"
|
|
28
|
+
:alt="theImageData.alt"
|
|
29
|
+
loading="lazy"
|
|
30
|
+
/>
|
|
31
|
+
</BaseImagePlaceholder>
|
|
32
|
+
</MixinFancybox>
|
|
33
|
+
<BaseImageCaption
|
|
34
|
+
v-if="hasCaptionArea"
|
|
35
|
+
class="lg:mt-3 mt-2"
|
|
36
|
+
:data="theImageData"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<!-- the text -->
|
|
41
|
+
<div
|
|
42
|
+
v-if="data.text"
|
|
43
|
+
class="flex col-span-5"
|
|
44
|
+
:class="data.alignTo === 'right' ? 'col-start-3 lg:order-1' : 'col-start-6 lg:order-2'"
|
|
45
|
+
>
|
|
46
|
+
<BlockText :text="data.text" />
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script lang="ts">
|
|
52
|
+
import { defineComponent } from 'vue'
|
|
53
|
+
import type { ImageObject } from '../../interfaces'
|
|
54
|
+
import { mixinGetSrcSet } from './../../utils/mixins'
|
|
55
|
+
import MixinFancybox from './../MixinFancybox/MixinFancybox.vue'
|
|
56
|
+
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
57
|
+
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
58
|
+
import BaseImageCaption from './../BaseImageCaption/BaseImageCaption.vue'
|
|
59
|
+
import BlockText from './../BlockText/BlockText.vue'
|
|
60
|
+
|
|
61
|
+
export default defineComponent({
|
|
62
|
+
name: 'BlockInlineImage',
|
|
63
|
+
components: {
|
|
64
|
+
MixinFancybox,
|
|
65
|
+
BlockText,
|
|
66
|
+
BaseImagePlaceholder,
|
|
67
|
+
BaseImage,
|
|
68
|
+
BaseImageCaption
|
|
69
|
+
},
|
|
70
|
+
props: {
|
|
71
|
+
data: {
|
|
72
|
+
type: Object,
|
|
73
|
+
required: false
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
theCaption(): string | undefined {
|
|
78
|
+
if (
|
|
79
|
+
this.data &&
|
|
80
|
+
this.data.caption &&
|
|
81
|
+
this.data.caption.length > 2 &&
|
|
82
|
+
this.data.displayCaption
|
|
83
|
+
) {
|
|
84
|
+
return this.data.caption
|
|
85
|
+
} else if (
|
|
86
|
+
this.data &&
|
|
87
|
+
this.data.image.caption &&
|
|
88
|
+
this.data.image.caption.length > 2 &&
|
|
89
|
+
this.data.displayCaption
|
|
90
|
+
) {
|
|
91
|
+
return this.data.image.caption
|
|
92
|
+
}
|
|
93
|
+
return undefined
|
|
94
|
+
},
|
|
95
|
+
// reform the image data object with the computed caption
|
|
96
|
+
theImageData(): Partial<ImageObject> | null {
|
|
97
|
+
if (this.data?.image) {
|
|
98
|
+
return {
|
|
99
|
+
...this.data?.image,
|
|
100
|
+
caption: this.theCaption
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return null
|
|
104
|
+
},
|
|
105
|
+
hasCaptionArea(): string | false {
|
|
106
|
+
if (this.data && this.data.image) {
|
|
107
|
+
return this.theCaption || this.data.image.credit || this.data.image.detailUrl
|
|
108
|
+
}
|
|
109
|
+
return false
|
|
110
|
+
},
|
|
111
|
+
theSrcSet() {
|
|
112
|
+
return this.theImageData
|
|
113
|
+
? mixinGetSrcSet(this.theImageData)
|
|
114
|
+
? mixinGetSrcSet(this.theImageData)
|
|
115
|
+
: this.theImageData.srcSet
|
|
116
|
+
: undefined
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
</script>
|
|
121
|
+
|
|
122
|
+
<style lang="scss">
|
|
123
|
+
@import '@explorer-1/common/src/scss/components/BlockInlineImage';
|
|
124
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import BlockKeyPoints from './BlockKeyPoints.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Blocks/BlockKeyPoints',
|
|
5
|
+
component: BlockKeyPoints,
|
|
6
|
+
excludeStories: /.*Data$/
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const BlockKeyPointsData = {
|
|
10
|
+
blockType: 'KeyPointBlock',
|
|
11
|
+
heading: 'Key Points',
|
|
12
|
+
listItem: [
|
|
13
|
+
{
|
|
14
|
+
text: '<p>Understanding how greenhouse gases will affect clouds is crucial to forecasting climate change.</p><p>But current computer climate models can’t handle the high resolution needed to simulate cloud dynamics worldwide.</p>'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
text: '<p>A recent study suggests that if greenhouse gases raise the atmosphere’s temperature enough, stratocumulus clouds could disappear, causing a large spike in global temperature.</p>'
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// stories
|
|
23
|
+
export const KeyPoints = {
|
|
24
|
+
name: 'BlockKeyPoints',
|
|
25
|
+
args: {
|
|
26
|
+
data: BlockKeyPointsData
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="data"
|
|
4
|
+
class="BlockKeyPoints border-gray-light-mid lg:py-10 py-6 border-t border-b"
|
|
5
|
+
>
|
|
6
|
+
<BlockHeading
|
|
7
|
+
class="mb-5"
|
|
8
|
+
:data="{ heading: data.heading }"
|
|
9
|
+
/>
|
|
10
|
+
<ul>
|
|
11
|
+
<li
|
|
12
|
+
v-for="(item, index) in data.listItem"
|
|
13
|
+
:key="index"
|
|
14
|
+
class="flex"
|
|
15
|
+
:class="index + 1 === data.listItem.length ? 'mb-0' : 'mb-4'"
|
|
16
|
+
>
|
|
17
|
+
<BlockText
|
|
18
|
+
:text="item.text"
|
|
19
|
+
variant="medium"
|
|
20
|
+
></BlockText>
|
|
21
|
+
</li>
|
|
22
|
+
</ul>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script lang="ts">
|
|
27
|
+
import { defineComponent } from 'vue'
|
|
28
|
+
import BlockHeading from './../BlockHeading/BlockHeading.vue'
|
|
29
|
+
import BlockText from './../BlockText/BlockText.vue'
|
|
30
|
+
|
|
31
|
+
export default defineComponent({
|
|
32
|
+
name: 'BlockKeyPoints',
|
|
33
|
+
components: {
|
|
34
|
+
BlockHeading,
|
|
35
|
+
BlockText
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
data: {
|
|
39
|
+
type: Object,
|
|
40
|
+
required: false
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<style lang="scss">
|
|
47
|
+
@import '@explorer-1/common/src/scss/components/BlockKeyPoints';
|
|
48
|
+
</style>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// the base component should really be a single vue component with a "type" prop where the user can select between card and list, but this works well enough for a demo atm.
|
|
2
|
+
|
|
3
|
+
import BlockLinkCard from './BlockLinkCard.vue'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/Blocks/BlockLinkCard',
|
|
7
|
+
component: BlockLinkCard,
|
|
8
|
+
excludeStories: /.*Data$/,
|
|
9
|
+
decorators: [
|
|
10
|
+
() => ({
|
|
11
|
+
template: `<div id="storyDecorator" class="relative grid grid-cols-2 gap-3 lg:grid-cols-3"><story/></div>`
|
|
12
|
+
})
|
|
13
|
+
],
|
|
14
|
+
argTypes: {
|
|
15
|
+
headingLevel: {
|
|
16
|
+
description:
|
|
17
|
+
'Change the heading level for semantic markup. This does not affect the style of the heading.',
|
|
18
|
+
control: {
|
|
19
|
+
type: 'select',
|
|
20
|
+
options: [null, 'h1', 'h2', 'h3', 'h4', 'h5']
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
parameters: {
|
|
25
|
+
html: {
|
|
26
|
+
root: '#storyDecorator' // to omit decorators from html output
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// shared data
|
|
32
|
+
export const BlockLinkCardData = {
|
|
33
|
+
data: {
|
|
34
|
+
url: '/news/placeholder-slug-1',
|
|
35
|
+
title: 'How engineers at NASA-JPL persevered to develop a ventilator',
|
|
36
|
+
slug: 'placeholder-slug-1',
|
|
37
|
+
label: 'Solar System',
|
|
38
|
+
thumbnailImage: {
|
|
39
|
+
src: {
|
|
40
|
+
url: 'https://picsum.photos/512/288',
|
|
41
|
+
width: 512,
|
|
42
|
+
height: 288
|
|
43
|
+
},
|
|
44
|
+
alt: 'Alt text'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
headingLevel: 'h2',
|
|
48
|
+
startDate: undefined,
|
|
49
|
+
endDate: undefined,
|
|
50
|
+
compact: false
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const SingleItem = {
|
|
54
|
+
args: {
|
|
55
|
+
...BlockLinkCardData
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const SingleItemCompactStyles = {
|
|
60
|
+
args: {
|
|
61
|
+
...BlockLinkCardData,
|
|
62
|
+
headingLevel: 'h2',
|
|
63
|
+
compact: true
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export const Compact = {
|
|
67
|
+
name: 'Compact w/ Custom Props',
|
|
68
|
+
parameters: {
|
|
69
|
+
docs: {
|
|
70
|
+
description: {
|
|
71
|
+
story: "View this story's canvas and controls to see its usage of custom props."
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
args: {
|
|
76
|
+
title: 'Lorem ipsum news title in search results',
|
|
77
|
+
url: '/news/demo',
|
|
78
|
+
externalLink: '',
|
|
79
|
+
label: 'News',
|
|
80
|
+
date: 'Sep. 23, 2010',
|
|
81
|
+
thumbnailImage: {
|
|
82
|
+
src: {
|
|
83
|
+
url: 'https://picsum.photos/512/288',
|
|
84
|
+
width: 512,
|
|
85
|
+
height: 288
|
|
86
|
+
},
|
|
87
|
+
alt: 'Alt text'
|
|
88
|
+
},
|
|
89
|
+
headingLevel: 'h2',
|
|
90
|
+
compact: true
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
export const EventItem = {
|
|
94
|
+
args: {
|
|
95
|
+
...BlockLinkCardData,
|
|
96
|
+
data: {
|
|
97
|
+
...BlockLinkCardData.data,
|
|
98
|
+
startDate: '2021-11-11T00:00:00-08:00',
|
|
99
|
+
endDate: '2021-11-11T23:59:59.999999-08:00'
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<BaseLink
|
|
3
|
+
v-if="theItem"
|
|
4
|
+
variant="none"
|
|
5
|
+
:to="theItem.url ? theItem.url : undefined"
|
|
6
|
+
:href="theItem.externalLink ? theItem.externalLink : undefined"
|
|
7
|
+
class="BlockLinkCard group"
|
|
8
|
+
link-class="block pb-5"
|
|
9
|
+
external-target-blank
|
|
10
|
+
>
|
|
11
|
+
<BaseImagePlaceholder
|
|
12
|
+
aspect-ratio="16:9"
|
|
13
|
+
class="bg-gray-dark relative mb-6 overflow-hidden"
|
|
14
|
+
:class="{ 'lg:mb-10': !compact }"
|
|
15
|
+
dark-mode
|
|
16
|
+
no-logo
|
|
17
|
+
>
|
|
18
|
+
<BaseImage
|
|
19
|
+
v-if="theItem.thumbnailImage && theItem.thumbnailImage.src"
|
|
20
|
+
:src="theItem.thumbnailImage.src.url"
|
|
21
|
+
:width="theItem.thumbnailImage.src.width"
|
|
22
|
+
:height="theItem.thumbnailImage.src.height"
|
|
23
|
+
alt=""
|
|
24
|
+
object-fit-class="cover"
|
|
25
|
+
image-class="can-hover:group-hover:delay-200 can-hover:group-hover:scale-100 absolute top-0 left-0 w-full transition-all duration-200 ease-in transform scale-105"
|
|
26
|
+
loading="lazy"
|
|
27
|
+
/>
|
|
28
|
+
<div v-else></div>
|
|
29
|
+
</BaseImagePlaceholder>
|
|
30
|
+
|
|
31
|
+
<div
|
|
32
|
+
class="transition-translate can-hover:group-hover:delay-200 duration-200 ease-in transform"
|
|
33
|
+
:class="
|
|
34
|
+
compact ? 'can-hover:group-hover:-translate-y-2' : 'can-hover:group-hover:-translate-y-3'
|
|
35
|
+
"
|
|
36
|
+
>
|
|
37
|
+
<div class="flex flex-wrap">
|
|
38
|
+
<p
|
|
39
|
+
v-if="theItem.label || theItem.startDate"
|
|
40
|
+
class="text-subtitle divide-gray-mid flex divide-x"
|
|
41
|
+
:class="compact ? 'mb-2' : 'mb-4'"
|
|
42
|
+
>
|
|
43
|
+
<span
|
|
44
|
+
v-if="theItem.label"
|
|
45
|
+
:class="{ 'pr-2': theItem.startDate }"
|
|
46
|
+
>
|
|
47
|
+
{{ theItem.label }}
|
|
48
|
+
</span>
|
|
49
|
+
<span
|
|
50
|
+
v-if="theItem.startDate"
|
|
51
|
+
:class="{ 'text-gray-mid-dark pl-2': theItem.label }"
|
|
52
|
+
>
|
|
53
|
+
{{ formattedEventDates }}
|
|
54
|
+
</span>
|
|
55
|
+
<span class="sr-only">.</span>
|
|
56
|
+
</p>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<component
|
|
60
|
+
:is="headingLevel || 'p'"
|
|
61
|
+
class="text-gray-dark text-xl font-medium leading-tight tracking-tight"
|
|
62
|
+
:class="{ 'lg:text-3xl': !compact }"
|
|
63
|
+
>
|
|
64
|
+
{{ theItem.title }}
|
|
65
|
+
</component>
|
|
66
|
+
<p
|
|
67
|
+
v-if="theItem.date"
|
|
68
|
+
class="text-gray-mid-dark mt-2"
|
|
69
|
+
>
|
|
70
|
+
{{ theItem.date }}
|
|
71
|
+
</p>
|
|
72
|
+
</div>
|
|
73
|
+
<div
|
|
74
|
+
class="can-hover:block text-action can-hover:-ml-3 can-hover:group-hover:delay-200 can-hover:opacity-0 can-hover:group-hover:ml-0 can-hover:group-hover:opacity-100 hidden -mt-1 text-2xl leading-normal transition-all duration-200 ease-in"
|
|
75
|
+
>
|
|
76
|
+
<IconArrow />
|
|
77
|
+
</div>
|
|
78
|
+
</BaseLink>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<script lang="ts">
|
|
82
|
+
import type { PropType } from 'vue'
|
|
83
|
+
import { defineComponent } from 'vue'
|
|
84
|
+
import type { Card } from '../../interfaces'
|
|
85
|
+
import { mixinFormatEventDates } from './../../utils/mixins'
|
|
86
|
+
import IconArrow from './../Icons/IconArrow.vue'
|
|
87
|
+
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
88
|
+
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
89
|
+
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
90
|
+
import type { HeadingLevel } from './../BaseHeading/BaseHeading.vue'
|
|
91
|
+
|
|
92
|
+
export default defineComponent({
|
|
93
|
+
name: 'BlockLinkCard',
|
|
94
|
+
components: {
|
|
95
|
+
IconArrow,
|
|
96
|
+
BaseLink,
|
|
97
|
+
BaseImage,
|
|
98
|
+
BaseImagePlaceholder
|
|
99
|
+
},
|
|
100
|
+
props: {
|
|
101
|
+
data: {
|
|
102
|
+
type: Object as PropType<Card>,
|
|
103
|
+
required: false
|
|
104
|
+
},
|
|
105
|
+
// override props as needed
|
|
106
|
+
// so we can use this component in search results
|
|
107
|
+
url: {
|
|
108
|
+
type: String,
|
|
109
|
+
required: false
|
|
110
|
+
},
|
|
111
|
+
externalLink: {
|
|
112
|
+
type: String,
|
|
113
|
+
required: false
|
|
114
|
+
},
|
|
115
|
+
thumbnailImage: {
|
|
116
|
+
type: Object,
|
|
117
|
+
required: false
|
|
118
|
+
},
|
|
119
|
+
label: {
|
|
120
|
+
type: String,
|
|
121
|
+
required: false
|
|
122
|
+
},
|
|
123
|
+
title: {
|
|
124
|
+
type: String,
|
|
125
|
+
required: false
|
|
126
|
+
},
|
|
127
|
+
date: {
|
|
128
|
+
type: String,
|
|
129
|
+
required: false
|
|
130
|
+
},
|
|
131
|
+
startDate: {
|
|
132
|
+
type: String,
|
|
133
|
+
required: false
|
|
134
|
+
},
|
|
135
|
+
endDate: {
|
|
136
|
+
type: String,
|
|
137
|
+
required: false
|
|
138
|
+
},
|
|
139
|
+
// if styling should be compact
|
|
140
|
+
compact: {
|
|
141
|
+
type: Boolean,
|
|
142
|
+
default: false
|
|
143
|
+
},
|
|
144
|
+
// if a heading should be used and at what level
|
|
145
|
+
headingLevel: {
|
|
146
|
+
type: (String as PropType<HeadingLevel>) || null,
|
|
147
|
+
required: false
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
computed: {
|
|
151
|
+
// to allow for various data shapes and sources
|
|
152
|
+
// use-case: content pages provide this.data.page with non-page siblings (i.e. external link cards)
|
|
153
|
+
// use-case: search and listing pages pass individual props
|
|
154
|
+
theItem(): Card | undefined {
|
|
155
|
+
if ((this.data as Card)?.page) {
|
|
156
|
+
return (this.data as Card).page
|
|
157
|
+
} else if (this.data) {
|
|
158
|
+
return this.data
|
|
159
|
+
} else if (
|
|
160
|
+
this.url ||
|
|
161
|
+
this.externalLink ||
|
|
162
|
+
this.thumbnailImage ||
|
|
163
|
+
this.label ||
|
|
164
|
+
this.title ||
|
|
165
|
+
this.date ||
|
|
166
|
+
this.startDate ||
|
|
167
|
+
this.endDate
|
|
168
|
+
) {
|
|
169
|
+
// form a custom object
|
|
170
|
+
return {
|
|
171
|
+
url: this.url,
|
|
172
|
+
externalLink: this.externalLink,
|
|
173
|
+
thumbnailImage: this.thumbnailImage,
|
|
174
|
+
label: this.label,
|
|
175
|
+
title: this.title,
|
|
176
|
+
date: this.date,
|
|
177
|
+
startDate: this.startDate,
|
|
178
|
+
endDate: this.endDate
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return undefined
|
|
182
|
+
},
|
|
183
|
+
formattedEventDates() {
|
|
184
|
+
return this.theItem?.startDate
|
|
185
|
+
? mixinFormatEventDates(this.theItem.startDate, this.theItem.endDate)
|
|
186
|
+
: undefined
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
})
|
|
190
|
+
</script>
|
|
191
|
+
<style lang="scss">
|
|
192
|
+
.BlockLinkCard {
|
|
193
|
+
.text-subtitle.divide-x {
|
|
194
|
+
@apply leading-none #{!important};
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
</style>
|