@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,333 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="data"
|
|
4
|
+
class="BlockStreamfield"
|
|
5
|
+
:class="layoutClass"
|
|
6
|
+
>
|
|
7
|
+
<template v-for="(block, index) in data">
|
|
8
|
+
<LayoutHelper
|
|
9
|
+
v-if="block.blockType == 'HeadingBlock'"
|
|
10
|
+
:key="`headingBlock${index}`"
|
|
11
|
+
indent="col-3"
|
|
12
|
+
class="mb-5"
|
|
13
|
+
>
|
|
14
|
+
<BlockHeading :data="block" />
|
|
15
|
+
</LayoutHelper>
|
|
16
|
+
|
|
17
|
+
<!-- custom margin bottom that matches BlockText styles if followed by InlineImageBlock -->
|
|
18
|
+
<LayoutHelper
|
|
19
|
+
v-else-if="block.blockType == 'RichTextBlock'"
|
|
20
|
+
:key="`richText${index}`"
|
|
21
|
+
indent="col-3"
|
|
22
|
+
:class="seamlessText(index) ? 'lg:mb-8 mb-5' : 'lg:mb-18 mb-10'"
|
|
23
|
+
>
|
|
24
|
+
<BlockText :text="block.value" />
|
|
25
|
+
</LayoutHelper>
|
|
26
|
+
|
|
27
|
+
<!-- custom margin bottom that matches BlockText styles if followed by RichTextBlock -->
|
|
28
|
+
<BlockInlineImage
|
|
29
|
+
v-else-if="block.blockType == 'InlineImageBlock'"
|
|
30
|
+
:key="`inlineImageBlock${index}`"
|
|
31
|
+
class="lg:px-0 px-4"
|
|
32
|
+
:class="seamlessText(index) ? 'lg:mb-8 mb-5' : 'lg:mb-18 mb-10'"
|
|
33
|
+
:data="block"
|
|
34
|
+
/>
|
|
35
|
+
|
|
36
|
+
<LayoutHelper
|
|
37
|
+
v-else-if="block.blockType == 'ListBlock'"
|
|
38
|
+
:key="`listBlock${index}`"
|
|
39
|
+
indent="col-3"
|
|
40
|
+
class="lg:mb-18 mb-10"
|
|
41
|
+
>
|
|
42
|
+
<BlockListCards :data="block" />
|
|
43
|
+
</LayoutHelper>
|
|
44
|
+
|
|
45
|
+
<LayoutHelper
|
|
46
|
+
v-else-if="block.blockType == 'KeyPointBlock'"
|
|
47
|
+
:key="`keyPointBlock${index}`"
|
|
48
|
+
indent="col-3"
|
|
49
|
+
class="lg:mb-18 mb-10"
|
|
50
|
+
>
|
|
51
|
+
<BlockKeyPoints :data="block" />
|
|
52
|
+
</LayoutHelper>
|
|
53
|
+
|
|
54
|
+
<LayoutHelper
|
|
55
|
+
v-else-if="block.blockType == 'QuoteBlock'"
|
|
56
|
+
:key="`quoteBlock${index}`"
|
|
57
|
+
indent="col-4"
|
|
58
|
+
class="lg:mb-18 mb-10"
|
|
59
|
+
>
|
|
60
|
+
<BlockQuote :data="block as unknown as BlockQuoteAttributes" />
|
|
61
|
+
</LayoutHelper>
|
|
62
|
+
|
|
63
|
+
<LayoutHelper
|
|
64
|
+
v-else-if="block.blockType == 'CTABlock'"
|
|
65
|
+
:key="`ctaBlock${index}`"
|
|
66
|
+
indent="col-4"
|
|
67
|
+
class="lg:mb-18 mb-10"
|
|
68
|
+
>
|
|
69
|
+
<BlockCta :data="block" />
|
|
70
|
+
</LayoutHelper>
|
|
71
|
+
|
|
72
|
+
<LayoutHelper
|
|
73
|
+
v-else-if="block.blockType == 'TeaserBlock'"
|
|
74
|
+
:key="`teaserBlock${index}`"
|
|
75
|
+
indent="col-2"
|
|
76
|
+
class="lg:mb-18 mb-10"
|
|
77
|
+
>
|
|
78
|
+
<BlockTeaser
|
|
79
|
+
:custom-label="block.customLabel"
|
|
80
|
+
:heading="block.heading"
|
|
81
|
+
:introduction="block.introduction"
|
|
82
|
+
:button-text="block.buttonText"
|
|
83
|
+
:image="block.image"
|
|
84
|
+
:full-width="block.fullWidthImage"
|
|
85
|
+
:teaser-page="block.teaserPage"
|
|
86
|
+
/>
|
|
87
|
+
</LayoutHelper>
|
|
88
|
+
|
|
89
|
+
<LayoutHelper
|
|
90
|
+
v-else-if="block.blockType == 'CarouselBlock'"
|
|
91
|
+
:key="`carouselBlock${index}`"
|
|
92
|
+
indent="col-2"
|
|
93
|
+
class="lg:mb-18 mb-10"
|
|
94
|
+
>
|
|
95
|
+
<BlockImageCarousel
|
|
96
|
+
:items="block.blocks"
|
|
97
|
+
:block-id="block.id"
|
|
98
|
+
/>
|
|
99
|
+
</LayoutHelper>
|
|
100
|
+
|
|
101
|
+
<div
|
|
102
|
+
v-else-if="block.blockType == 'ImageGalleryBlock'"
|
|
103
|
+
:key="`imageGalleryBlock${index}`"
|
|
104
|
+
class="max-w-screen-3xl lg:mb-18 mx-auto mb-10"
|
|
105
|
+
>
|
|
106
|
+
<BlockImageGallery
|
|
107
|
+
:title="block.galleryTitle"
|
|
108
|
+
:description="block.galleryDescription"
|
|
109
|
+
:cover="block.coverImage"
|
|
110
|
+
:items="block.gallerySlides"
|
|
111
|
+
:block-id="block.id"
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<LayoutHelper
|
|
116
|
+
v-else-if="block.blockType == 'VideoBlock'"
|
|
117
|
+
:key="`videoBlock${index}`"
|
|
118
|
+
indent="col-2"
|
|
119
|
+
class="lg:mb-18 mb-10"
|
|
120
|
+
>
|
|
121
|
+
<BlockVideo :data="block" />
|
|
122
|
+
</LayoutHelper>
|
|
123
|
+
|
|
124
|
+
<LayoutHelper
|
|
125
|
+
v-else-if="block.blockType == 'VideoEmbedBlock'"
|
|
126
|
+
:key="`videoEmbedBlock${index}`"
|
|
127
|
+
indent="col-2"
|
|
128
|
+
class="lg:mb-18 mb-10"
|
|
129
|
+
>
|
|
130
|
+
<BlockVideoEmbed :data="block as unknown as VideoBlockEmbedData" />
|
|
131
|
+
</LayoutHelper>
|
|
132
|
+
|
|
133
|
+
<BlockImage
|
|
134
|
+
v-else-if="block.blockType == 'FullBleedImageBlock'"
|
|
135
|
+
:key="`fullBleedImageBlock${index}`"
|
|
136
|
+
class="lg:mb-18 mb-10"
|
|
137
|
+
:data="block"
|
|
138
|
+
:full-bleed="block.fullBleed"
|
|
139
|
+
/>
|
|
140
|
+
|
|
141
|
+
<LayoutHelper
|
|
142
|
+
v-else-if="block.blockType == 'ImageComparisonBlock'"
|
|
143
|
+
:key="`imageComparisonBlock${index}`"
|
|
144
|
+
indent="col-2"
|
|
145
|
+
class="lg:mb-18 mb-10"
|
|
146
|
+
>
|
|
147
|
+
<BlockImageComparison :data="block" />
|
|
148
|
+
</LayoutHelper>
|
|
149
|
+
|
|
150
|
+
<BlockTwitterEmbed
|
|
151
|
+
v-else-if="block.blockType == 'TwitterEmbedBlock'"
|
|
152
|
+
:key="`twitterEmbedBlock${index}`"
|
|
153
|
+
class="lg:mb-18 mb-10"
|
|
154
|
+
:data="block"
|
|
155
|
+
/>
|
|
156
|
+
|
|
157
|
+
<LayoutHelper
|
|
158
|
+
v-else-if="block.blockType == 'IframeEmbedBlock'"
|
|
159
|
+
:key="`iframeEmbedBlock${index}`"
|
|
160
|
+
indent="col-2"
|
|
161
|
+
class="lg:mb-18 mb-10"
|
|
162
|
+
>
|
|
163
|
+
<BlockIframeEmbed :data="block" />
|
|
164
|
+
</LayoutHelper>
|
|
165
|
+
|
|
166
|
+
<LayoutHelper
|
|
167
|
+
v-else-if="block.blockType == 'TableBlock'"
|
|
168
|
+
:key="`tableBlock${index}`"
|
|
169
|
+
indent="col-3"
|
|
170
|
+
class="lg:mb-18 mb-10"
|
|
171
|
+
>
|
|
172
|
+
<BlockTable :data="block" />
|
|
173
|
+
</LayoutHelper>
|
|
174
|
+
|
|
175
|
+
<LayoutHelper
|
|
176
|
+
v-else-if="block.blockType == 'RelatedLinksBlock'"
|
|
177
|
+
:key="`relatedLinksBlock${index}`"
|
|
178
|
+
indent="col-3"
|
|
179
|
+
class="lg:mb-18 mb-10"
|
|
180
|
+
>
|
|
181
|
+
<BlockRelatedLinks :data="block as any as BlockRelatedLinksObject" />
|
|
182
|
+
</LayoutHelper>
|
|
183
|
+
|
|
184
|
+
<BlockAnchor
|
|
185
|
+
v-else-if="block.blockType == 'AnchorBlock'"
|
|
186
|
+
:key="`anchorBlock${index}`"
|
|
187
|
+
:data="block"
|
|
188
|
+
/>
|
|
189
|
+
|
|
190
|
+
<div
|
|
191
|
+
v-else
|
|
192
|
+
:key="index"
|
|
193
|
+
class="lg:mb-18 p-3 mb-10 overflow-hidden border"
|
|
194
|
+
>
|
|
195
|
+
<pre>{{ block }}</pre>
|
|
196
|
+
</div>
|
|
197
|
+
</template>
|
|
198
|
+
</div>
|
|
199
|
+
</template>
|
|
200
|
+
<script lang="ts">
|
|
201
|
+
import { defineComponent } from 'vue'
|
|
202
|
+
import type { PropType } from 'vue'
|
|
203
|
+
import type { ImageObject } from '../../interfaces'
|
|
204
|
+
import type { BlockData as VideoBlockEmbedData } from './../BlockVideoEmbed/BlockVideoEmbed.vue'
|
|
205
|
+
import type { BlockQuoteAttributes } from './../BlockQuote/BlockQuote.vue'
|
|
206
|
+
import LayoutHelper from './../LayoutHelper/LayoutHelper.vue'
|
|
207
|
+
import BlockCta from './../BlockCta/BlockCta.vue'
|
|
208
|
+
import BlockHeading from './../BlockHeading/BlockHeading.vue'
|
|
209
|
+
import BlockImage from './../BlockImage/BlockImage.vue'
|
|
210
|
+
import BlockImageCarousel from './../BlockImageCarousel/BlockImageCarousel.vue'
|
|
211
|
+
import BlockImageComparison from './../BlockImageComparison/BlockImageComparison.vue'
|
|
212
|
+
import BlockImageGallery from './../BlockImageGallery/BlockImageGallery.vue'
|
|
213
|
+
import BlockInlineImage from './../BlockInlineImage/BlockInlineImage.vue'
|
|
214
|
+
import BlockKeyPoints from './../BlockKeyPoints/BlockKeyPoints.vue'
|
|
215
|
+
import BlockListCards from './../BlockListCards/BlockListCards.vue'
|
|
216
|
+
import BlockQuote from './../BlockQuote/BlockQuote.vue'
|
|
217
|
+
import BlockRelatedLinks, {
|
|
218
|
+
type BlockRelatedLinksObject
|
|
219
|
+
} from './../BlockRelatedLinks/BlockRelatedLinks.vue'
|
|
220
|
+
import BlockTable from './../BlockTable/BlockTable.vue'
|
|
221
|
+
import BlockTeaser from './../BlockTeaser/BlockTeaser.vue'
|
|
222
|
+
import BlockText from './../BlockText/BlockText.vue'
|
|
223
|
+
import BlockTwitterEmbed from './../BlockTwitterEmbed/BlockTwitterEmbed.vue'
|
|
224
|
+
import BlockIframeEmbed from './../BlockIframeEmbed/BlockIframeEmbed.vue'
|
|
225
|
+
import BlockVideo from './../BlockVideo/BlockVideo.vue'
|
|
226
|
+
import BlockVideoEmbed from './../BlockVideoEmbed/BlockVideoEmbed.vue'
|
|
227
|
+
import BlockAnchor from './../BlockAnchor/BlockAnchor.vue'
|
|
228
|
+
interface Variants {
|
|
229
|
+
[name: string]: string
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export const variants: Variants = {
|
|
233
|
+
default: '',
|
|
234
|
+
fluid: '-fluid'
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface StreamfieldBlockData {
|
|
238
|
+
blockType: string
|
|
239
|
+
id: string
|
|
240
|
+
fullBleed: boolean
|
|
241
|
+
heading: string
|
|
242
|
+
galleryTitle: string
|
|
243
|
+
galleryDescription: string
|
|
244
|
+
coverImage: ImageObject
|
|
245
|
+
gallerySlides: ImageObject[]
|
|
246
|
+
blocks: object[]
|
|
247
|
+
value: string
|
|
248
|
+
customLabel: string
|
|
249
|
+
introduction: string
|
|
250
|
+
teaserPage: object | string[]
|
|
251
|
+
image: ImageObject
|
|
252
|
+
buttonText: string
|
|
253
|
+
fullWidthImage: boolean
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export default defineComponent({
|
|
257
|
+
name: 'BlockStreamfield',
|
|
258
|
+
components: {
|
|
259
|
+
LayoutHelper,
|
|
260
|
+
BlockCta,
|
|
261
|
+
BlockHeading,
|
|
262
|
+
BlockImage,
|
|
263
|
+
BlockImageCarousel,
|
|
264
|
+
BlockImageComparison,
|
|
265
|
+
BlockImageGallery,
|
|
266
|
+
BlockInlineImage,
|
|
267
|
+
BlockKeyPoints,
|
|
268
|
+
BlockListCards,
|
|
269
|
+
BlockQuote,
|
|
270
|
+
BlockRelatedLinks,
|
|
271
|
+
BlockTable,
|
|
272
|
+
BlockTeaser,
|
|
273
|
+
BlockText,
|
|
274
|
+
BlockTwitterEmbed,
|
|
275
|
+
BlockIframeEmbed,
|
|
276
|
+
BlockVideo,
|
|
277
|
+
BlockVideoEmbed,
|
|
278
|
+
BlockAnchor
|
|
279
|
+
},
|
|
280
|
+
props: {
|
|
281
|
+
variant: {
|
|
282
|
+
type: String,
|
|
283
|
+
required: false,
|
|
284
|
+
default: 'default',
|
|
285
|
+
validator: (prop: string): boolean => Object.keys(variants).includes(prop)
|
|
286
|
+
},
|
|
287
|
+
data: {
|
|
288
|
+
type: Array as PropType<StreamfieldBlockData[]>,
|
|
289
|
+
required: false
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
computed: {
|
|
293
|
+
layoutClass(): string {
|
|
294
|
+
return variants[this.variant]
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
methods: {
|
|
298
|
+
// use with BlockText or BlockInlineImage to determine their bottom margin
|
|
299
|
+
// this is to make text appear continuous between the two.
|
|
300
|
+
seamlessText(index: number): boolean {
|
|
301
|
+
const nextIndex = index + 1
|
|
302
|
+
if (this.data && this.data[nextIndex]) {
|
|
303
|
+
const nextBlock = this.data[nextIndex] as StreamfieldBlockData
|
|
304
|
+
const nextBlockType = nextBlock.blockType
|
|
305
|
+
if (nextBlockType === 'InlineImageBlock' || nextBlockType === 'RichTextBlock') {
|
|
306
|
+
return true
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return false
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
})
|
|
313
|
+
</script>
|
|
314
|
+
<style lang="scss">
|
|
315
|
+
.BlockStreamfield {
|
|
316
|
+
// makes everything appear equal width
|
|
317
|
+
&.-fluid {
|
|
318
|
+
.LayoutHelper {
|
|
319
|
+
@apply block;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.BlockInlineImage {
|
|
323
|
+
.col-start-3 {
|
|
324
|
+
@apply col-start-1 col-span-7;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.col-start-6.col-span-5 {
|
|
328
|
+
@apply col-span-7;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import BlockTable from './BlockTable.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Blocks/BlockTable',
|
|
5
|
+
component: BlockTable,
|
|
6
|
+
excludeStories: /.*Data$/
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const BlockTableData = {
|
|
10
|
+
blockType: 'TableBlock',
|
|
11
|
+
table:
|
|
12
|
+
"{'data': [['Header 1', 'Header 2', 'Header 3'], ['Lorem ipsum dolor sit amet', 'Lorem ipsum dolor sit amet', 'Lorem ipsum dolor sit amet'], [None, None, None]], 'cell': [], 'first_row_is_table_header': True, 'first_col_is_header': False, 'table_caption': 'Third row intentionally blank to test parsing.'}"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const Table = {
|
|
16
|
+
name: 'BlockTable',
|
|
17
|
+
args: {
|
|
18
|
+
data: BlockTableData
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="data"
|
|
4
|
+
class="BlockTable"
|
|
5
|
+
>
|
|
6
|
+
<div class="overflow-x-auto scrolling-touch">
|
|
7
|
+
<table class="border-gray-light-mid w-full border-t border-b border-collapse table-auto">
|
|
8
|
+
<tr
|
|
9
|
+
v-for="(row, index_row) in table.rows"
|
|
10
|
+
:key="index_row"
|
|
11
|
+
>
|
|
12
|
+
<td
|
|
13
|
+
v-for="(col, index_col) in row.cols"
|
|
14
|
+
:key="index_col"
|
|
15
|
+
:class="
|
|
16
|
+
row.header ? 'bg-dark-blue text-subtitle text-white' : 'bg-white text-gray-dark'
|
|
17
|
+
"
|
|
18
|
+
class="border-gray-light-mid lg:p-5 p-3 border-b"
|
|
19
|
+
>
|
|
20
|
+
{{ col }}
|
|
21
|
+
</td>
|
|
22
|
+
</tr>
|
|
23
|
+
</table>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="text-gray-mid-dark text-body-sm mt-4">{{ table.caption }}</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script lang="ts">
|
|
30
|
+
// @ts-nocheck
|
|
31
|
+
import { defineComponent } from 'vue'
|
|
32
|
+
|
|
33
|
+
export default defineComponent({
|
|
34
|
+
name: 'BlockTable',
|
|
35
|
+
props: {
|
|
36
|
+
data: {
|
|
37
|
+
type: Object,
|
|
38
|
+
required: false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
computed: {
|
|
42
|
+
table() {
|
|
43
|
+
let str = this.data.table
|
|
44
|
+
str = str.replace(/'/g, '"')
|
|
45
|
+
str = str.replace(/None,/g, '"",')
|
|
46
|
+
str = str.replace(/, None/g, ',""')
|
|
47
|
+
str = str.replace(/: False/g, ': false')
|
|
48
|
+
str = str.replace(/: True/g, ': true')
|
|
49
|
+
const dict = JSON.parse(str)
|
|
50
|
+
const table = {
|
|
51
|
+
rows: [],
|
|
52
|
+
caption: dict.table_caption
|
|
53
|
+
}
|
|
54
|
+
for (let i = 0; i < dict.data.length; i++) {
|
|
55
|
+
const row = {
|
|
56
|
+
cols: dict.data[i],
|
|
57
|
+
header: i === 0 && dict.first_row_is_table_header
|
|
58
|
+
}
|
|
59
|
+
table.rows.push(row)
|
|
60
|
+
}
|
|
61
|
+
return table
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<style lang="scss">
|
|
68
|
+
@import '@explorer-1/common/src/scss/typography';
|
|
69
|
+
// required for @apply text-subtitle in _BlockTable.scss
|
|
70
|
+
@import '@explorer-1/common/src/scss/components/BlockText';
|
|
71
|
+
// required for @extend .BlockText in _BlockTable.scss
|
|
72
|
+
@import '@explorer-1/common/src/scss/components/BlockTable';
|
|
73
|
+
</style>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import BlockTeaser from './BlockTeaser.vue'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Blocks/BlockTeaser',
|
|
5
|
+
component: BlockTeaser,
|
|
6
|
+
excludeStories: /.*Data$/
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const BlockTeaserData = {
|
|
10
|
+
heading: 'Perseverance',
|
|
11
|
+
introduction: 'The mission marks humanity’s first step in returning samples from another planet.',
|
|
12
|
+
buttonText: 'Read more',
|
|
13
|
+
image: {
|
|
14
|
+
full: {
|
|
15
|
+
url: 'https://picsum.photos/1096/400',
|
|
16
|
+
width: 1096,
|
|
17
|
+
height: 400
|
|
18
|
+
},
|
|
19
|
+
half: {
|
|
20
|
+
url: 'https://picsum.photos/540/400',
|
|
21
|
+
width: 548,
|
|
22
|
+
height: 400
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
fullWidthImage: false,
|
|
26
|
+
teaserPage: [
|
|
27
|
+
{
|
|
28
|
+
blockType: 'CharBlock'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
blockType: 'TextBlock'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
blockType: 'CharBlock'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
blockType: 'ImageChooserBlock'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
blockType: 'BooleanBlock'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
blockType: 'PageChooserBlock',
|
|
44
|
+
page: {
|
|
45
|
+
label: 'Asteroid Watch Overview',
|
|
46
|
+
title: 'Asteroid Watch',
|
|
47
|
+
url: '/asteroid-watch/'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const Default = {
|
|
54
|
+
args: {
|
|
55
|
+
...BlockTeaserData
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const FullWidth = {
|
|
60
|
+
args: {
|
|
61
|
+
...BlockTeaserData,
|
|
62
|
+
fullWidth: true
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const Empty = {
|
|
67
|
+
args: {
|
|
68
|
+
teaserPage: {
|
|
69
|
+
pageType: 'Mission',
|
|
70
|
+
title: 'Perseverance',
|
|
71
|
+
url: '/missions/perseverance/'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils'
|
|
2
|
+
|
|
3
|
+
import BlockTeaser from './BlockTeaser.vue'
|
|
4
|
+
import { Empty } from './BlockTeaser.stories'
|
|
5
|
+
|
|
6
|
+
describe('BlockTeaser', () => {
|
|
7
|
+
test('renders with partial data', () => {
|
|
8
|
+
mount(BlockTeaser, {
|
|
9
|
+
propsData: { ...Empty.args }
|
|
10
|
+
})
|
|
11
|
+
})
|
|
12
|
+
})
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="BlockTeaser bg-gray-light lg:grid lg:grid-cols-10 relative z-0"
|
|
4
|
+
:style="image ? `min-height: ${theImage.height}px` : ''"
|
|
5
|
+
>
|
|
6
|
+
<div
|
|
7
|
+
v-if="fullWidth"
|
|
8
|
+
class="lg:block bg-gradient-to-l from-transparent-w50 to-transparent-black-50 absolute inset-0 z-10 hidden"
|
|
9
|
+
></div>
|
|
10
|
+
<BaseImage
|
|
11
|
+
v-if="image && theImage.url"
|
|
12
|
+
:image-class="`cover-bg${fullWidth ? ' -full' : ''}`"
|
|
13
|
+
alt=""
|
|
14
|
+
:src="theImage.url"
|
|
15
|
+
:width="theImage.width"
|
|
16
|
+
:height="theImage.height"
|
|
17
|
+
loading="lazy"
|
|
18
|
+
/>
|
|
19
|
+
<div
|
|
20
|
+
:class="`${
|
|
21
|
+
image && fullWidth ? 'relative lg:text-white lg:text-contrast z-20' : ''
|
|
22
|
+
} grid lg:col-start-2 lg:col-end-5 px-10 lg:px-0 lg:py-16 py-8`"
|
|
23
|
+
>
|
|
24
|
+
<div class="my-auto">
|
|
25
|
+
<h2
|
|
26
|
+
v-if="theLabel"
|
|
27
|
+
class="text-subtitle"
|
|
28
|
+
>
|
|
29
|
+
{{ theLabel }}
|
|
30
|
+
</h2>
|
|
31
|
+
<component
|
|
32
|
+
:is="theLabel || (theTeaserPage && theTeaserPage.label) ? 'h3' : 'h2'"
|
|
33
|
+
v-if="theHeading"
|
|
34
|
+
class="text-h3 font-semibold tracking-normal lg:mt-2 mt-3"
|
|
35
|
+
>
|
|
36
|
+
{{ theHeading }}
|
|
37
|
+
</component>
|
|
38
|
+
<p
|
|
39
|
+
v-if="introduction"
|
|
40
|
+
class="text-body-md lg:mt-2 mt-4"
|
|
41
|
+
>
|
|
42
|
+
{{ introduction }}
|
|
43
|
+
</p>
|
|
44
|
+
<BaseButton
|
|
45
|
+
v-if="theTeaserPage"
|
|
46
|
+
variant="primary"
|
|
47
|
+
:href="theTeaserPage.url"
|
|
48
|
+
class="mt-8"
|
|
49
|
+
:aria-label="`${theButtonText} - ${theHeading}`"
|
|
50
|
+
>
|
|
51
|
+
{{ theButtonText }}
|
|
52
|
+
</BaseButton>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
<script lang="ts">
|
|
58
|
+
import { defineComponent } from 'vue'
|
|
59
|
+
import BaseButton from './../BaseButton/BaseButton.vue'
|
|
60
|
+
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
61
|
+
|
|
62
|
+
type teaserPageObject = {
|
|
63
|
+
title: string
|
|
64
|
+
label: string
|
|
65
|
+
url: string
|
|
66
|
+
}
|
|
67
|
+
type teaserPageBlock = {
|
|
68
|
+
blockType: string
|
|
69
|
+
page: teaserPageObject
|
|
70
|
+
}
|
|
71
|
+
export default defineComponent({
|
|
72
|
+
name: 'BlockTeaser',
|
|
73
|
+
components: {
|
|
74
|
+
BaseButton,
|
|
75
|
+
BaseImage
|
|
76
|
+
},
|
|
77
|
+
props: {
|
|
78
|
+
// piecemeal props for reuse
|
|
79
|
+
customLabel: {
|
|
80
|
+
type: String,
|
|
81
|
+
required: false
|
|
82
|
+
},
|
|
83
|
+
label: {
|
|
84
|
+
type: String,
|
|
85
|
+
required: false
|
|
86
|
+
},
|
|
87
|
+
heading: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: false
|
|
90
|
+
},
|
|
91
|
+
introduction: {
|
|
92
|
+
type: String,
|
|
93
|
+
required: false
|
|
94
|
+
},
|
|
95
|
+
buttonText: {
|
|
96
|
+
type: String,
|
|
97
|
+
required: false
|
|
98
|
+
},
|
|
99
|
+
image: {
|
|
100
|
+
type: Object,
|
|
101
|
+
required: false
|
|
102
|
+
},
|
|
103
|
+
fullWidth: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: false
|
|
106
|
+
},
|
|
107
|
+
// ideally can pass a page object (TopicDetailPage), but sometimes (e.g. streamfield teaserblock) this will be wrapped in an array
|
|
108
|
+
teaserPage: {
|
|
109
|
+
type: [Array, Object],
|
|
110
|
+
required: false
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
computed: {
|
|
114
|
+
/**
|
|
115
|
+
* Fall back to the linked page’s label, if there is one.
|
|
116
|
+
*/
|
|
117
|
+
theLabel(): string {
|
|
118
|
+
return (
|
|
119
|
+
this.customLabel || this.label || (this.theTeaserPage && this.theTeaserPage.label) || ''
|
|
120
|
+
)
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Fall back to the linked page’s title, if there is one.
|
|
125
|
+
*/
|
|
126
|
+
theHeading(): string {
|
|
127
|
+
return this.heading || (this.theTeaserPage && this.theTeaserPage.title) || ''
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Fallback for optional field, which would compromise the usefulness of this component if missing.
|
|
132
|
+
*/
|
|
133
|
+
theButtonText(): string {
|
|
134
|
+
return this.buttonText || 'Read More'
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
theImage(): { url: string; width: string; height: string } {
|
|
138
|
+
const { url, width, height } =
|
|
139
|
+
this.image && this.fullWidth ? this.image.full : this.image ? this.image.half : undefined
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
url,
|
|
143
|
+
width,
|
|
144
|
+
height
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
// necessary as the streamfield teaser block passes an array of blocks
|
|
148
|
+
// this is necessary to retrieve the label from the teaser pages
|
|
149
|
+
theTeaserPage(): teaserPageObject | null {
|
|
150
|
+
if (this.teaserPage && typeof this.teaserPage === 'object') {
|
|
151
|
+
return this.teaserPage as teaserPageObject
|
|
152
|
+
} else if (this.teaserPage && Object.keys(this.teaserPage).length) {
|
|
153
|
+
const parsedTeaserPage = this.getTeaserPageBlock()
|
|
154
|
+
if (parsedTeaserPage) {
|
|
155
|
+
return parsedTeaserPage[0].page
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return null
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
methods: {
|
|
162
|
+
getTeaserPageBlock(): teaserPageBlock[] | null {
|
|
163
|
+
if (this.teaserPage && this.teaserPage.length) {
|
|
164
|
+
const theBlocks = this.teaserPage
|
|
165
|
+
return theBlocks.filter((block: teaserPageBlock) => block.blockType === 'PageChooserBlock')
|
|
166
|
+
}
|
|
167
|
+
return null
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
})
|
|
171
|
+
</script>
|
|
172
|
+
<style lang="scss">
|
|
173
|
+
@import '@explorer-1/common/src/scss/components/BlockTeaser';
|
|
174
|
+
</style>
|