@explorer-1/vue 0.3.4 → 0.3.7
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/CHANGELOG.md +19 -0
- package/package.json +2 -2
- package/src/components/AboutTheAuthor/AboutTheAuthor.stories.js +1 -1
- package/src/components/AboutTheAuthor/AboutTheAuthor.vue +9 -9
- package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.stories.js +2 -7
- package/src/components/AsteroidWatchWidget/AsteroidWatchWidget.vue +5 -1
- package/src/components/BackToTop/BackToTop.stories.js +1 -1
- package/src/components/BackToTop/BackToTop.vue +10 -0
- package/src/components/BaseAccordionItem/BaseAccordionItem.stories.js +24 -4
- package/src/components/BaseAccordionItem/BaseAccordionItem.vue +56 -17
- package/src/components/BaseAudio/BaseAudio.stories.js +4 -6
- package/src/components/BaseAudio/BaseAudio.vue +6 -0
- package/src/components/BaseButton/BaseButton.stories.ts +12 -23
- package/src/components/BaseButton/BaseButton.vue +34 -10
- package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.stories.js +2 -1
- package/src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue +5 -0
- package/src/components/BaseHeading/BaseHeading.stories.js +9 -17
- package/src/components/BaseHeading/BaseHeading.vue +18 -8
- package/src/components/BaseImage/BaseImage.stories.ts +7 -17
- package/src/components/BaseImage/BaseImage.vue +26 -14
- package/src/components/BaseImageCaption/BaseImageCaption.stories.js +11 -0
- package/src/components/BaseImageCaption/BaseImageCaption.vue +10 -6
- package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.stories.js +13 -15
- package/src/components/BaseImagePlaceholder/BaseImagePlaceholder.vue +13 -9
- package/src/components/BaseLink/BaseLink.stories.js +8 -7
- package/src/components/BaseLink/BaseLink.vue +32 -21
- package/src/components/BaseModal/BaseModal.stories.js +4 -7
- package/src/components/BaseModal/BaseModal.vue +1 -0
- package/src/components/BaseModal/BaseModalDialog.vue +1 -6
- package/src/components/BasePill/BasePill.stories.js +8 -22
- package/src/components/BasePill/BasePill.vue +36 -19
- package/src/components/BasePlaceholder/BasePlaceholder.stories.js +4 -7
- package/src/components/BasePlaceholder/BasePlaceholder.vue +1 -1
- package/src/components/BaseRadioGroup/BaseRadioGroup.stories.js +1 -0
- package/src/components/BaseRadioGroup/BaseRadioGroup.vue +9 -2
- package/src/components/BaseSwimlane/BaseSwimlane.stories.js +2 -1
- package/src/components/BaseSwimlane/BaseSwimlane.vue +2 -0
- package/src/components/BaseTimer/BaseTimer.stories.js +7 -2
- package/src/components/BaseTimer/BaseTimer.vue +4 -2
- package/src/components/BaseUnitToggle/BaseUnitToggle.stories.js +1 -16
- package/src/components/BaseUnitToggle/BaseUnitToggle.vue +4 -0
- package/src/components/BaseVideo/BaseVideo.vue +7 -3
- package/src/components/BlockAccordion/BlockAccordion.stories.js +4 -2
- package/src/components/BlockAccordion/BlockAccordion.vue +3 -3
- package/src/components/BlockAudio/BlockAudio.stories.js +1 -0
- package/src/components/BlockAudio/BlockAudio.vue +11 -3
- package/src/components/BlockCardGrid/BlockCardGrid.stories.js +1 -1
- package/src/components/BlockCardGrid/BlockCardGrid.vue +1 -1
- package/src/components/BlockCardGridItem/BlockCardGridItem.stories.js +3 -3
- package/src/components/BlockCardGridItem/BlockCardGridItemElement.vue +1 -1
- package/src/components/BlockCircleImageCard/BlockCircleImageCard.stories.js +3 -9
- package/src/components/BlockCsrTable/BlockCsrTable.stories.js +1 -0
- package/src/components/BlockCsrTable/BlockCsrTable.vue +1 -1
- package/src/components/BlockCta/BlockCta.stories.js +1 -0
- package/src/components/BlockCta/BlockCta.vue +9 -2
- package/src/components/BlockDialog/BlockDialog.stories.js +2 -1
- package/src/components/BlockGist/BlockGist.stories.js +3 -2
- package/src/components/BlockGist/BlockGist.vue +8 -6
- package/src/components/BlockHeading/BlockHeading.stories.js +1 -0
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.stories.js +3 -2
- package/src/components/BlockIframeEmbed/BlockIframeEmbed.vue +9 -2
- package/src/components/BlockImage/BlockImage.stories.js +1 -5
- package/src/components/BlockImage/BlockImage.vue +5 -2
- package/src/components/BlockImageCarousel/BlockImageCarousel.stories.js +3 -15
- package/src/components/BlockImageCarousel/BlockImageCarousel.vue +2 -0
- package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.stories.js +2 -16
- package/src/components/BlockImageCarouselItem/BlockImageCarouselItem.vue +7 -7
- package/src/components/BlockImageComparison/BlockImageComparison.stories.js +5 -3
- package/src/components/BlockImageComparison/BlockImageComparison.vue +11 -2
- package/src/components/BlockImageGallery/BlockImageGallery.stories.js +4 -11
- package/src/components/BlockImageGallery/BlockImageGallery.vue +5 -0
- package/src/components/BlockInlineImage/BlockInlineImage.stories.js +5 -2
- package/src/components/BlockInlineImage/BlockInlineImage.vue +20 -7
- package/src/components/BlockKeyPoints/BlockKeyPoints.stories.js +1 -0
- package/src/components/BlockKeyPoints/BlockKeyPoints.vue +12 -3
- package/src/components/BlockLinkCard/BlockLinkCard.stories.js +24 -34
- package/src/components/BlockLinkCard/BlockLinkCard.vue +28 -9
- package/src/components/BlockLinkCard/BlockLinkCardCollectionLg.vue +2 -2
- package/src/components/BlockLinkCardList/BlockLinkCardList.stories.js +1 -3
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.stories.js +2 -14
- package/src/components/BlockLinkCarousel/BlockLinkCarousel.vue +8 -8
- package/src/components/BlockLinkTile/BlockLinkTile.stories.js +3 -13
- package/src/components/BlockLinkTile/BlockLinkTile.vue +26 -13
- package/src/components/BlockListCards/BlockListCards.stories.js +1 -0
- package/src/components/BlockListCards/BlockListCards.vue +5 -4
- package/src/components/BlockNewsletterSignup/BlockNewsletterSignup.stories.js +1 -0
- package/src/components/BlockNewsletterSignup/BlockNewsletterSignup.vue +3 -2
- package/src/components/BlockQuote/BlockQuote.stories.js +1 -0
- package/src/components/BlockQuote/BlockQuote.vue +3 -2
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.stories.js +1 -0
- package/src/components/BlockRelatedLinks/BlockRelatedLinks.vue +6 -4
- package/src/components/BlockRichTable/BlockRichTable.stories.js +1 -1
- package/src/components/BlockRichTable/BlockRichTable.vue +23 -9
- package/src/components/BlockStreamfield/BlockStreamfield.stories.js +1 -11
- package/src/components/BlockStreamfield/BlockStreamfield.vue +34 -31
- package/src/components/BlockTeaser/BlockTeaser.stories.js +1 -0
- package/src/components/BlockTeaser/BlockTeaser.vue +20 -12
- package/src/components/BlockText/BlockText.stories.js +2 -9
- package/src/components/BlockText/BlockText.vue +21 -9
- package/src/components/BlockVideo/BlockVideo.stories.js +1 -0
- package/src/components/BlockVideo/BlockVideo.vue +14 -3
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.stories.js +1 -0
- package/src/components/BlockVideoEmbed/BlockVideoEmbed.vue +6 -3
- package/src/components/CalendarButton/CalendarButton.vue +7 -0
- package/src/components/DetailHeadline/DetailHeadline.stories.js +2 -20
- package/src/components/DetailHeadline/DetailHeadline.vue +16 -4
- package/src/components/DsnWidget/DsnWidget.stories.js +2 -6
- package/src/components/DsnWidget/DsnWidget.vue +18 -4
- package/src/components/EventDetailHero/EventDetailHero.stories.js +10 -7
- package/src/components/EventDetailHero/EventDetailHero.vue +4 -7
- package/src/components/FormContact/FormContact.stories.js +2 -1
- package/src/components/FormNewsletterSignup/FormNewsletterSignup.stories.js +2 -1
- package/src/components/HeroInlineMedia/HeroInlineMedia.vue +12 -8
- package/src/components/HeroLarge/HeroLarge.stories.js +27 -2
- package/src/components/HeroLarge/HeroLarge.vue +12 -5
- package/src/components/HeroListingIndex/HeroListingIndex.stories.js +1 -0
- package/src/components/HeroListingIndex/HeroListingIndex.vue +18 -13
- package/src/components/HeroMedia/HeroMedia.stories.js +14 -9
- package/src/components/HeroMedia/HeroMedia.vue +9 -8
- package/src/components/HeroMedium/HeroMedium.stories.js +19 -4
- package/src/components/HeroMedium/HeroMedium.vue +32 -14
- package/src/components/HeroMedium/HeroSmall.stories.js +20 -6
- package/src/components/HomepageCarousel/HomepageCarousel.stories.js +1 -1
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.stories.js +2 -2
- package/src/components/HomepageCarouselItem/HomepageCarouselItem.vue +2 -6
- package/src/components/HomepageEmbedBlock/HomepageEmbedBlock.vue +2 -2
- package/src/components/LogoCaltech/LogoCaltech.stories.js +14 -18
- package/src/components/LogoCaltech/LogoCaltech.vue +1 -0
- package/src/components/LogoTribrand/LogoTribrand.stories.js +66 -51
- package/src/components/LogoTribrand/LogoTribrand.vue +4 -2
- package/src/components/MetaPanel/MetaPanel.stories.js +5 -9
- package/src/components/MetaPanel/MetaPanel.vue +3 -0
- package/src/components/MetaPanelItems/MetaPanelItems.stories.js +9 -2
- package/src/components/MetaPanelItems/MetaPanelItems.vue +2 -0
- package/src/components/MetadataEduResource/MetadataEduResource.stories.js +12 -10
- package/src/components/MetadataEduResource/MetadataEduResource.vue +7 -3
- package/src/components/MetadataEvent/MetadataEvent.stories.js +1 -1
- package/src/components/MissionDetailAbout/MissionDetailAbout.vue +1 -1
- package/src/components/MissionDetailHero/MissionDetailHero.stories.js +2 -2
- package/src/components/MissionDetailHighlights/MissionDetailHighlights.stories.js +1 -0
- package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.stories.js +1 -6
- package/src/components/MissionDetailInlineImage/MissionDetailInlineImage.vue +10 -5
- package/src/components/MissionDetailStats/DistanceStats.vue +10 -5
- package/src/components/MissionDetailStats/MissionDetailStats.stories.js +4 -21
- package/src/components/MissionDetailStats/MissionDetailStats.vue +21 -5
- package/src/components/MissionDetailStreamfield/MissionDetailStreamfield.vue +4 -2
- package/src/components/MixinAnimationCaret/MixinAnimationCaret.stories.ts +7 -0
- package/src/components/MixinAnimationCaret/MixinAnimationCaret.vue +12 -6
- package/src/components/MixinCarousel/MixinCarousel.stories.js +2 -8
- package/src/components/MixinCarousel/MixinCarousel.vue +13 -16
- package/src/components/MixinVideoBg/MixinVideoBg.stories.js +1 -1
- package/src/components/MixinVideoBg/MixinVideoBg.vue +4 -7
- package/src/components/NavDesktop/NavDesktop.stories.js +1 -0
- package/src/components/NavDesktop/NavDesktop.vue +4 -4
- package/src/components/NavDesktop/NavDesktopTopHat.vue +4 -4
- package/src/components/NavDesktopEdu/NavDesktopEdu.stories.js +1 -5
- package/src/components/NavDesktopEdu/NavDesktopEdu.vue +4 -4
- package/src/components/NavHeading/NavHeading.stories.js +3 -2
- package/src/components/NavHighlight/NavHighlight.stories.js +3 -2
- package/src/components/NavJumpMenu/NavJumpMenu.stories.js +5 -2
- package/src/components/NavLinkList/NavLinkList.stories.js +3 -2
- package/src/components/NavLinkList/NavLinkList.vue +3 -3
- package/src/components/NavLogoLinks/NavLogoLinks.stories.js +1 -0
- package/src/components/NavMobile/NavMobile.stories.js +13 -2
- package/src/components/NavMobile/NavMobile.vue +18 -5
- package/src/components/NavMobile/NavMobileDropdown.vue +2 -2
- package/src/components/NavMobile/NavMobileEdu.stories.js +11 -4
- package/src/components/NavMobile/NavMobileLink.vue +4 -4
- package/src/components/NavSearchForm/NavSearchForm.stories.js +1 -0
- package/src/components/NavSecondary/NavSecondary.stories.js +1 -0
- package/src/components/NavSecondary/NavSecondary.vue +7 -4
- package/src/components/NavSecondary/NavSecondaryDropdownContent.vue +1 -1
- package/src/components/NavSocial/NavSocial.stories.js +1 -0
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.stories.js +2 -1
- package/src/components/NewsDetailMediaContact/NewsDetailMediaContact.vue +1 -1
- package/src/components/ParallaxContainer/ParallaxContainer.stories.js +2 -2
- package/src/components/ParallaxContainer/ParallaxContainer.vue +1 -0
- package/src/components/PodcastSeriesCarousel/PodcastSeriesCarousel.vue +6 -5
- package/src/components/RoboticsDetailStats/RoboticsDetailStats.stories.js +3 -8
- package/src/components/SearchFilterGroup/SearchFilterGroup.stories.js +1 -0
- package/src/components/SearchInput/SearchInput.stories.js +1 -0
- package/src/components/SearchPagination/SearchPagination.stories.js +1 -0
- package/src/components/SearchResultCard/SearchResultCard.stories.js +1 -10
- package/src/components/SearchResultCard/SearchResultCard.vue +1 -0
- package/src/components/SearchResultGridItem/SearchResultGridItem.stories.js +3 -12
- package/src/components/SearchResultGridItem/SearchResultGridItem.vue +5 -2
- package/src/components/SearchResultsList/SearchResultsList.stories.js +3 -3
- package/src/components/SearchSelectMenu/SearchSelectMenu.stories.js +2 -1
- package/src/components/SwimlaneCTA/SwimlaneCTA.vue +1 -0
- package/src/components/TextArea/TextArea.stories.js +2 -1
- package/src/components/TextInput/TextInput.stories.js +2 -1
- package/src/components/TheFooter/TheFooter.stories.js +1 -0
- package/src/components/TheFooter/TheFooter.vue +30 -4
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.stories.js +1 -1
- package/src/components/ThumbnailCarousel/ThumbnailCarousel.vue +2 -1
- package/src/components/TimelineDialog/TimelineDialog.vue +2 -2
- package/src/components/TopicDetailMissionCarousel/TopicDetailMissionCarousel.stories.js +1 -0
- package/src/components/TopicDetailMissionCarouselItem/TopicDetailMissionCarouselItem.stories.js +2 -2
- package/src/components/TopicDetailMore/TopicDetailMore.stories.js +1 -0
- package/src/components/TopicDetailMoreItem/TopicDetailMoreItem.stories.js +3 -2
- package/src/components/TopicDetailStreamfield/TopicDetailStreamfield.vue +2 -2
- package/src/constants.ts +3 -5
- package/src/docs/foundation/grid_layouthelpers.stories.js +2 -2
- package/src/docs/introduction.docs.mdx +14 -2
- package/src/interfaces.ts +31 -6
- package/src/templates/PageAudioDetail/PageAudioDetail.vue +2 -2
- package/src/templates/PageContent/PageContent.stories.js +1 -1
- package/src/templates/PageEventDetail/PageEventDetail.stories.js +1 -1
- package/src/templates/PageNewsDetail/PageNewsDetail.stories.js +2 -2
- package/src/templates/edu/PageContentEdu.stories.js +2 -2
- package/src/templates/edu/PageEduCollectionsDetail/PageEduCollectionsDetail.stories.js +2 -2
- package/src/templates/edu/PageEduEventDetail/PageEduEventDetail.stories.js +1 -1
- package/src/templates/edu/PageEduExplainerArticle/PageEduExplainerArticle.stories.js +2 -2
- package/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.stories.js +1 -1
- package/src/templates/edu/PageEduGalleryDetail/PageEduGalleryDetail.vue +10 -6
- package/src/templates/edu/PageEduHome/PageEduHome.stories.js +1 -1
- package/src/templates/edu/PageEduLesson/PageEduLesson.stories.js +2 -2
- package/src/templates/edu/PageEduMultimediaDetail/PageEduMultimediaDetail.stories.js +1 -1
- package/src/templates/edu/PageEduNewsDetail/PageEduNewsDetail.stories.js +2 -2
- package/src/templates/edu/PageEduStudentProject/PageEduStudentProject.stories.js +2 -2
- package/src/templates/edu/PageEduStudentProject/PageEduStudentProjectSection.vue +10 -6
- package/src/templates/edu/PageEduTeachableMoment/PageEduTeachableMoment.stories.js +2 -2
- package/src/templates/www/PageAsteroidWatchContent/PageAsteroidWatchContent.stories.js +2 -2
- package/src/templates/www/PageAsteroidWatchIndex/PageAsteroidWatchIndex.stories.js +2 -2
- package/src/templates/www/PageGoDirectory/PageGoDirectory.stories.js +2 -2
- package/src/templates/www/PageHomepage/PageHomepage.stories.js +2 -2
- package/src/templates/www/PageMissionDetail/PageMissionDetail.stories.js +2 -2
- package/src/templates/www/PagePodcast/PagePodcast.stories.js +2 -2
- package/src/templates/www/PagePodcastSeason/PagePodcastSeason.stories.js +2 -2
- package/src/templates/www/PagePressKitIndex/PagePressKitIndex.stories.js +2 -2
- package/src/templates/www/PageProfileDetail/PageProfileDetail.stories.js +2 -2
- package/src/templates/www/PageRoboticsDetail/PageRoboticsDetail.stories.js +2 -2
- package/src/templates/www/PageTimeline/PageTimeline.stories.js +2 -2
- package/src/templates/www/PageTopicDetail/PageTopicDetail.stories.js +2 -2
- package/src/templates/www/PageTopicDetail/PageTopicDetail.vue +2 -1
- package/src/utils/mixins.ts +7 -7
|
@@ -3,14 +3,20 @@ import EventDetailHero from './EventDetailHero.vue'
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/WWW/EventDetail/EventDetailHero',
|
|
5
5
|
component: EventDetailHero,
|
|
6
|
+
tags: ['!autodocs'],
|
|
7
|
+
argTypes: {
|
|
8
|
+
constrain: {
|
|
9
|
+
description: 'Constrain image to 16:9'
|
|
10
|
+
}
|
|
11
|
+
},
|
|
6
12
|
decorators: [
|
|
7
13
|
() => ({
|
|
8
|
-
template: `<div id="
|
|
14
|
+
template: `<div id="storyRoot" class="max-w-screen-3xl mx-auto"><story/></div>`
|
|
9
15
|
})
|
|
10
16
|
],
|
|
11
17
|
parameters: {
|
|
12
18
|
html: {
|
|
13
|
-
root: '#
|
|
19
|
+
root: '#storyRoot'
|
|
14
20
|
},
|
|
15
21
|
themes: {
|
|
16
22
|
clearable: false,
|
|
@@ -37,10 +43,6 @@ export const EventDetailHeroData = {
|
|
|
37
43
|
height: 1200
|
|
38
44
|
},
|
|
39
45
|
alt: 'The hero image'
|
|
40
|
-
},
|
|
41
|
-
startDateSplit: {
|
|
42
|
-
day: '25',
|
|
43
|
-
monthAndYear: 'Jan. 2020'
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
|
|
@@ -48,6 +50,7 @@ export const EventDetailHeroData = {
|
|
|
48
50
|
export const BaseStory = {
|
|
49
51
|
args: {
|
|
50
52
|
image: EventDetailHeroData.heroImage,
|
|
51
|
-
|
|
53
|
+
startDate: '11-11-2025',
|
|
54
|
+
endDate: '12-02-2025'
|
|
52
55
|
}
|
|
53
56
|
}
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
</template>
|
|
32
32
|
<script lang="ts">
|
|
33
|
-
import { defineComponent } from 'vue'
|
|
33
|
+
import { defineComponent, type PropType } from 'vue'
|
|
34
|
+
import type { ImageObject } from './../../interfaces.ts'
|
|
34
35
|
import BaseImage from '../BaseImage/BaseImage.vue'
|
|
35
36
|
import BaseImagePlaceholder from '../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
36
37
|
import CalendarChip from '../CalendarChip/CalendarChip.vue'
|
|
@@ -44,11 +45,6 @@ export default defineComponent({
|
|
|
44
45
|
CalendarChip
|
|
45
46
|
},
|
|
46
47
|
props: {
|
|
47
|
-
data: {
|
|
48
|
-
type: Object,
|
|
49
|
-
required: false,
|
|
50
|
-
default: undefined
|
|
51
|
-
},
|
|
52
48
|
startDate: {
|
|
53
49
|
type: String,
|
|
54
50
|
required: false,
|
|
@@ -63,10 +59,11 @@ export default defineComponent({
|
|
|
63
59
|
default: false
|
|
64
60
|
},
|
|
65
61
|
image: {
|
|
66
|
-
type: Object
|
|
62
|
+
type: Object as PropType<ImageObject>,
|
|
67
63
|
required: false,
|
|
68
64
|
default: undefined
|
|
69
65
|
},
|
|
66
|
+
/** Constrain image to 16:9 */
|
|
70
67
|
constrain: {
|
|
71
68
|
type: Boolean,
|
|
72
69
|
required: false,
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { reactive } from 'vue'
|
|
3
|
-
import BlockVideoEmbed from './../BlockVideoEmbed/BlockVideoEmbed.vue'
|
|
4
|
-
import BlockIframeEmbed
|
|
5
|
-
|
|
3
|
+
import BlockVideoEmbed, { type BlockVideoEmbedData } from './../BlockVideoEmbed/BlockVideoEmbed.vue'
|
|
4
|
+
import BlockIframeEmbed, {
|
|
5
|
+
type BlockIframeEmbedData
|
|
6
|
+
} from './../BlockIframeEmbed/BlockIframeEmbed.vue'
|
|
7
|
+
import BlockImageComparison, {
|
|
8
|
+
type BlockImageComparisonData
|
|
9
|
+
} from './../BlockImageComparison/BlockImageComparison.vue'
|
|
6
10
|
import BlockImageCarousel from './../BlockImageCarousel/BlockImageCarousel.vue'
|
|
7
11
|
import BlockImageStandard from './../BlockImage/BlockImageStandard.vue'
|
|
8
|
-
import BlockVideo from './../BlockVideo/BlockVideo.vue'
|
|
12
|
+
import BlockVideo, { type BlockVideoData } from './../BlockVideo/BlockVideo.vue'
|
|
9
13
|
import type { StreamfieldBlockData } from './../../interfaces'
|
|
10
14
|
|
|
11
15
|
interface HeroInlineMediaProps {
|
|
@@ -36,19 +40,19 @@ const { heroBlocks, constrain } = reactive(props)
|
|
|
36
40
|
/>
|
|
37
41
|
<BlockIframeEmbed
|
|
38
42
|
v-else-if="heroBlocks[0].blockType === 'IframeEmbedBlock'"
|
|
39
|
-
:data="heroBlocks[0]"
|
|
43
|
+
:data="heroBlocks[0] as BlockIframeEmbedData"
|
|
40
44
|
/>
|
|
41
45
|
<BlockVideo
|
|
42
46
|
v-else-if="heroBlocks[0].blockType === 'VideoBlock'"
|
|
43
|
-
:data="heroBlocks[0]"
|
|
47
|
+
:data="heroBlocks[0] as BlockVideoData"
|
|
44
48
|
/>
|
|
45
49
|
<BlockVideoEmbed
|
|
46
50
|
v-else-if="heroBlocks[0].blockType === 'VideoEmbedBlock'"
|
|
47
|
-
:data="heroBlocks[0]"
|
|
51
|
+
:data="heroBlocks[0] as BlockVideoEmbedData"
|
|
48
52
|
/>
|
|
49
53
|
<BlockImageComparison
|
|
50
54
|
v-else-if="heroBlocks[0].blockType === 'ImageComparisonBlock'"
|
|
51
|
-
:data="heroBlocks[0]"
|
|
55
|
+
:data="heroBlocks[0] as BlockImageComparisonData"
|
|
52
56
|
/>
|
|
53
57
|
</div>
|
|
54
58
|
</template>
|
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
import HeroLarge from './HeroLarge.vue'
|
|
2
|
+
import { eduMetadataDictionary } from './../../constants'
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
title: 'Components/Heroes/Large',
|
|
5
6
|
component: HeroLarge,
|
|
7
|
+
tags: ['heroes'],
|
|
6
8
|
excludeStories: /.*Data$/,
|
|
7
9
|
parameters: {
|
|
8
10
|
viewMode: 'canvas'
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
customPill: {
|
|
14
|
+
type: { name: 'string', required: false },
|
|
15
|
+
description: 'Text for pill (overrides label)'
|
|
16
|
+
},
|
|
17
|
+
customPillType: {
|
|
18
|
+
type: { name: 'string', required: false },
|
|
19
|
+
control: { type: 'select' },
|
|
20
|
+
options: Object.keys(eduMetadataDictionary),
|
|
21
|
+
description:
|
|
22
|
+
'Maps to EDU resource types. Label is replaced with a color-themed "pill." Must use with `.ThemeEdu`'
|
|
23
|
+
},
|
|
24
|
+
hasOverlay: {
|
|
25
|
+
type: { name: 'boolean' },
|
|
26
|
+
control: { type: 'boolean' },
|
|
27
|
+
description:
|
|
28
|
+
'If secondary nav is also on this page, more space will be added above the hero text'
|
|
29
|
+
}
|
|
9
30
|
}
|
|
10
31
|
}
|
|
11
32
|
|
|
@@ -52,15 +73,19 @@ export const HeroLargeData = {
|
|
|
52
73
|
url: 'https://picsum.photos/id/247/640/900'
|
|
53
74
|
},
|
|
54
75
|
alt: 'Robotics detail page hero image'
|
|
55
|
-
}
|
|
76
|
+
},
|
|
77
|
+
customPill: undefined,
|
|
78
|
+
customPillType: undefined,
|
|
79
|
+
hasOverlay: false
|
|
56
80
|
}
|
|
57
81
|
|
|
58
82
|
// stories
|
|
59
83
|
export const BaseStory = {
|
|
60
84
|
name: 'HeroLarge',
|
|
61
85
|
args: {
|
|
62
|
-
|
|
86
|
+
label: 'Robotics at JPL',
|
|
63
87
|
...HeroLargeData,
|
|
88
|
+
summary: HeroLargeData.description,
|
|
64
89
|
image: HeroLargeData.heroImage
|
|
65
90
|
}
|
|
66
91
|
}
|
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
:srcset="theSrcSet"
|
|
8
8
|
/>
|
|
9
9
|
<source
|
|
10
|
+
v-if="image.screenMd"
|
|
10
11
|
media="(min-width: 420px)"
|
|
11
12
|
:srcset="image.screenMd.url"
|
|
12
13
|
/>
|
|
13
|
-
<source
|
|
14
|
+
<source
|
|
15
|
+
v-if="image.screenSm"
|
|
16
|
+
:srcset="image.screenSm.url"
|
|
17
|
+
/>
|
|
14
18
|
<img
|
|
15
19
|
class="md:object-right object-cover object-bottom w-full h-full"
|
|
16
20
|
:src="image.src.url"
|
|
@@ -71,8 +75,9 @@
|
|
|
71
75
|
</div>
|
|
72
76
|
</template>
|
|
73
77
|
<script lang="ts">
|
|
74
|
-
import { defineComponent } from 'vue'
|
|
78
|
+
import { defineComponent, type PropType } from 'vue'
|
|
75
79
|
import { mixinTransparentHeader, mixinGetSrcSet } from './../../utils/mixins'
|
|
80
|
+
import type { ContentTypeKey, ImageObject } from './../../interfaces.ts'
|
|
76
81
|
import { mapStores } from 'pinia'
|
|
77
82
|
import { useThemeStore } from '../../store/theme'
|
|
78
83
|
import BasePill from './../BasePill/BasePill.vue'
|
|
@@ -88,13 +93,15 @@ export default defineComponent({
|
|
|
88
93
|
required: false,
|
|
89
94
|
default: undefined
|
|
90
95
|
},
|
|
96
|
+
/** Text for pill (overrides label) */
|
|
91
97
|
customPill: {
|
|
92
98
|
type: String,
|
|
93
99
|
required: false,
|
|
94
100
|
default: undefined
|
|
95
101
|
},
|
|
102
|
+
/** Maps to EDU resource types. Label is replaced with a color-themed "pill." Must use with `.ThemeEdu` */
|
|
96
103
|
customPillType: {
|
|
97
|
-
type: String
|
|
104
|
+
type: String as PropType<ContentTypeKey>,
|
|
98
105
|
required: false,
|
|
99
106
|
default: undefined
|
|
100
107
|
},
|
|
@@ -109,11 +116,11 @@ export default defineComponent({
|
|
|
109
116
|
default: undefined
|
|
110
117
|
},
|
|
111
118
|
image: {
|
|
112
|
-
type: Object
|
|
119
|
+
type: Object as PropType<ImageObject>,
|
|
113
120
|
required: false,
|
|
114
121
|
default: undefined
|
|
115
122
|
},
|
|
116
|
-
|
|
123
|
+
/** If secondary nav is also on this page, more space will be added above the hero text */
|
|
117
124
|
hasOverlay: {
|
|
118
125
|
type: Boolean,
|
|
119
126
|
default: false
|
|
@@ -20,13 +20,16 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
</template>
|
|
22
22
|
<script lang="ts">
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
/**
|
|
24
|
+
* HeroListingIndex
|
|
25
|
+
* Creating a wrapper for HeroMedium as HeroListingIndex needs to parse several different data shapes.
|
|
26
|
+
* Parsing occurs in the computed data and returns the appropriate data object for the media if it exists.
|
|
27
|
+
*/
|
|
28
|
+
import { defineComponent, type PropType } from 'vue'
|
|
29
|
+
import type { ImageObject, StreamfieldBlockData, VideoObject } from './../../interfaces'
|
|
27
30
|
import { useThemeStore } from '../../store/theme'
|
|
28
31
|
import { mapStores } from 'pinia'
|
|
29
|
-
import HeroMedium from '../HeroMedium/HeroMedium.vue'
|
|
32
|
+
import HeroMedium, { type FeatureObject } from '../HeroMedium/HeroMedium.vue'
|
|
30
33
|
|
|
31
34
|
export default defineComponent({
|
|
32
35
|
name: 'HeroListingIndex',
|
|
@@ -36,7 +39,7 @@ export default defineComponent({
|
|
|
36
39
|
props: {
|
|
37
40
|
// pass these directly to HeroMedium
|
|
38
41
|
pageData: {
|
|
39
|
-
type: Object
|
|
42
|
+
type: Object as PropType<FeatureObject>,
|
|
40
43
|
default: undefined
|
|
41
44
|
},
|
|
42
45
|
customLabel: {
|
|
@@ -51,24 +54,26 @@ export default defineComponent({
|
|
|
51
54
|
computed: {
|
|
52
55
|
...mapStores(useThemeStore),
|
|
53
56
|
// parses a hero streamfield block for a video (newsDetailPage model)
|
|
54
|
-
customVideo():
|
|
55
|
-
if (this.pageData && this.pageData?.heroBlocks
|
|
57
|
+
customVideo(): VideoObject | undefined {
|
|
58
|
+
if (this.pageData && this.pageData?.heroBlocks && this.pageData.heroBlocks.length > 0) {
|
|
56
59
|
if (this.pageData.heroBlocks[0].blockType === 'VideoBlock') {
|
|
57
60
|
return this.pageData.heroBlocks[0].video
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
63
|
return undefined
|
|
61
64
|
},
|
|
62
|
-
customImage():
|
|
65
|
+
customImage(): ImageObject | undefined {
|
|
63
66
|
// parse hero streamfield block for the first usable image (newsDetailPage model)
|
|
64
|
-
if (this.pageData
|
|
67
|
+
if (this.pageData && this.pageData.heroBlocks && this.pageData.heroBlocks.length > 0) {
|
|
65
68
|
const block = this.pageData?.heroBlocks[0]
|
|
66
69
|
if (block.blockType === 'ImageChooserBlock' || block.blockType === 'HeroImageBlock') {
|
|
67
|
-
return block.listingPageHeroImage
|
|
70
|
+
return (block as StreamfieldBlockData).listingPageHeroImage
|
|
68
71
|
} else if (block.blockType === 'CarouselBlock') {
|
|
69
72
|
// use the first image in the carousel
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
const carouselBlocks: ImageObject[] | undefined = (block as StreamfieldBlockData)
|
|
74
|
+
.blocks as ImageObject[]
|
|
75
|
+
if (carouselBlocks && carouselBlocks?.length > 0) {
|
|
76
|
+
return carouselBlocks[0].listingPageHeroImage
|
|
72
77
|
}
|
|
73
78
|
}
|
|
74
79
|
}
|
|
@@ -4,9 +4,10 @@ import HeroMedia from './HeroMedia.vue'
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Components/Heroes/Media Only',
|
|
6
6
|
component: HeroMedia,
|
|
7
|
+
tags: ['heroes'],
|
|
7
8
|
parameters: {
|
|
8
9
|
html: {
|
|
9
|
-
root: '#
|
|
10
|
+
root: '#storyRoot'
|
|
10
11
|
},
|
|
11
12
|
docs: {
|
|
12
13
|
description: {
|
|
@@ -77,21 +78,25 @@ export const HeroMediaData = {
|
|
|
77
78
|
displayCaption: true
|
|
78
79
|
}
|
|
79
80
|
|
|
81
|
+
const LocalHeroMediaData = { ...HeroMediaData }
|
|
82
|
+
delete LocalHeroMediaData.imageInline
|
|
83
|
+
delete LocalHeroMediaData.blockType
|
|
84
|
+
|
|
80
85
|
// stories
|
|
81
86
|
export const BaseStory = {
|
|
82
87
|
name: 'HeroMedia',
|
|
83
|
-
args:
|
|
88
|
+
args: LocalHeroMediaData
|
|
84
89
|
}
|
|
85
90
|
export const CustomImageCaption = {
|
|
86
91
|
args: {
|
|
87
|
-
...
|
|
92
|
+
...LocalHeroMediaData,
|
|
88
93
|
caption: '<p>My custom caption.</p>'
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
export const NoCaptionText = {
|
|
93
98
|
args: {
|
|
94
|
-
...
|
|
99
|
+
...LocalHeroMediaData,
|
|
95
100
|
caption: '<p>My custom caption.</p>',
|
|
96
101
|
displayCaption: false
|
|
97
102
|
}
|
|
@@ -100,7 +105,7 @@ export const NoCaptionText = {
|
|
|
100
105
|
export const NoCaptionArea = {
|
|
101
106
|
args: {
|
|
102
107
|
image: {
|
|
103
|
-
src:
|
|
108
|
+
src: LocalHeroMediaData.image.src,
|
|
104
109
|
alt: 'The hero image',
|
|
105
110
|
caption: '\n', // a lot of prod data has this for caption
|
|
106
111
|
credit: '',
|
|
@@ -113,10 +118,10 @@ export const NoCaptionArea = {
|
|
|
113
118
|
export const NoLink = {
|
|
114
119
|
args: {
|
|
115
120
|
image: {
|
|
116
|
-
src:
|
|
117
|
-
alt:
|
|
118
|
-
caption:
|
|
119
|
-
credit:
|
|
121
|
+
src: LocalHeroMediaData.image.src,
|
|
122
|
+
alt: LocalHeroMediaData.image.src,
|
|
123
|
+
caption: LocalHeroMediaData.image.caption,
|
|
124
|
+
credit: LocalHeroMediaData.image.credit,
|
|
120
125
|
detailUrl: ''
|
|
121
126
|
},
|
|
122
127
|
caption: '',
|
|
@@ -52,14 +52,16 @@
|
|
|
52
52
|
</div>
|
|
53
53
|
</template>
|
|
54
54
|
<script lang="ts">
|
|
55
|
-
|
|
55
|
+
/** Hero with no text overlay, just an image or video with a caption below. */
|
|
56
|
+
|
|
57
|
+
import { defineComponent, type PropType } from 'vue'
|
|
56
58
|
import { mapStores } from 'pinia'
|
|
57
59
|
import { useThemeStore } from '../../store/theme'
|
|
58
60
|
import MixinVideoBg from './../MixinVideoBg/MixinVideoBg.vue'
|
|
59
61
|
import BaseImageCaption from './../BaseImageCaption/BaseImageCaption.vue'
|
|
60
62
|
import IconInfo from './../Icons/IconInfo.vue'
|
|
61
63
|
import IconClose from './../Icons/IconClose.vue'
|
|
62
|
-
import type { ImageObject } from '../../interfaces'
|
|
64
|
+
import type { ImageObject, VideoObject } from '../../interfaces'
|
|
63
65
|
import { mixinGetSrcSet, mixinTransparentHeader } from './../../utils/mixins'
|
|
64
66
|
|
|
65
67
|
export default defineComponent({
|
|
@@ -77,21 +79,20 @@ export default defineComponent({
|
|
|
77
79
|
IconClose
|
|
78
80
|
},
|
|
79
81
|
props: {
|
|
80
|
-
// image object includes the image caption and credit
|
|
81
82
|
image: {
|
|
82
|
-
type: Object,
|
|
83
|
+
type: Object as () => ImageObject,
|
|
83
84
|
default: undefined
|
|
84
85
|
},
|
|
85
86
|
video: {
|
|
86
|
-
type: Object
|
|
87
|
+
type: Object as PropType<VideoObject>,
|
|
87
88
|
default: undefined
|
|
88
89
|
},
|
|
89
|
-
|
|
90
|
+
/** If a caption should even be visible */
|
|
90
91
|
displayCaption: {
|
|
91
92
|
type: Boolean,
|
|
92
93
|
default: true
|
|
93
94
|
},
|
|
94
|
-
|
|
95
|
+
/** For video heroes that pass separate caption and credit data, or to override the caption in `{ImageObject}` */
|
|
95
96
|
caption: {
|
|
96
97
|
type: String,
|
|
97
98
|
default: undefined
|
|
@@ -152,7 +153,7 @@ export default defineComponent({
|
|
|
152
153
|
return 'flex'
|
|
153
154
|
}
|
|
154
155
|
},
|
|
155
|
-
hasCaptionArea(): string | boolean {
|
|
156
|
+
hasCaptionArea(): string | boolean | undefined {
|
|
156
157
|
if (this.theImageData) {
|
|
157
158
|
if (this.themeStore.isEdu) {
|
|
158
159
|
// For EDU, only show the caption area if there is a caption
|
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
import { BaseVideoData } from './../BaseVideo/BaseVideo.stories'
|
|
2
2
|
import HeroMedium from './HeroMedium.vue'
|
|
3
|
+
import { eduMetadataDictionary } from './../../constants'
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: 'Components/Heroes/Medium',
|
|
6
7
|
component: HeroMedium,
|
|
8
|
+
tags: ['heroes'],
|
|
7
9
|
decorators: [
|
|
8
10
|
() => ({
|
|
9
|
-
template: `<div id="
|
|
11
|
+
template: `<div id="storyRoot" class="max-w-screen-3xl mx-auto"><story/></div>`
|
|
10
12
|
})
|
|
11
13
|
],
|
|
14
|
+
argTypes: {
|
|
15
|
+
customPill: {
|
|
16
|
+
type: { name: 'string', required: false },
|
|
17
|
+
description: 'Text for pill (overrides label)'
|
|
18
|
+
},
|
|
19
|
+
customPillType: {
|
|
20
|
+
type: { name: 'string', required: false },
|
|
21
|
+
control: { type: 'select' },
|
|
22
|
+
options: Object.keys(eduMetadataDictionary),
|
|
23
|
+
description:
|
|
24
|
+
'Maps to EDU resource types. Label is replaced with a color-themed "pill." Must use with `.ThemeEdu`'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
12
27
|
parameters: {
|
|
13
28
|
html: {
|
|
14
|
-
root: '#
|
|
29
|
+
root: '#storyRoot'
|
|
15
30
|
},
|
|
16
31
|
themes: {
|
|
17
32
|
clearable: false,
|
|
@@ -57,7 +72,7 @@ export const HeroMediumData = {
|
|
|
57
72
|
export const BaseStory = {
|
|
58
73
|
name: 'HeroMedium',
|
|
59
74
|
args: {
|
|
60
|
-
|
|
75
|
+
customPill: 'News',
|
|
61
76
|
customLabel: HeroMediumData.label,
|
|
62
77
|
feature: HeroMediumData.feature,
|
|
63
78
|
cta: HeroMediumData.cta,
|
|
@@ -66,7 +81,7 @@ export const BaseStory = {
|
|
|
66
81
|
}
|
|
67
82
|
export const Compact = {
|
|
68
83
|
args: {
|
|
69
|
-
|
|
84
|
+
customPill: 'News',
|
|
70
85
|
customLabel: HeroMediumData.label,
|
|
71
86
|
feature: HeroMediumData.feature,
|
|
72
87
|
cta: HeroMediumData.cta,
|
|
@@ -96,18 +96,33 @@
|
|
|
96
96
|
</section>
|
|
97
97
|
</template>
|
|
98
98
|
<script lang="ts">
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
/**
|
|
100
|
+
* HeroMedium
|
|
101
|
+
* A hero image with article link overlay
|
|
102
|
+
* For use when the hero includes a featured content item with link
|
|
103
|
+
* note: This component is very similar to a HomepageCarousel slide
|
|
104
|
+
*/
|
|
105
|
+
import { defineComponent, type PropType } from 'vue'
|
|
104
106
|
import { mixinTransparentHeader } from '../../utils/mixins'
|
|
105
|
-
import type {
|
|
107
|
+
import type {
|
|
108
|
+
ContentTypeKey,
|
|
109
|
+
ImageObject,
|
|
110
|
+
VideoObject,
|
|
111
|
+
PageObject,
|
|
112
|
+
StreamfieldBlockData
|
|
113
|
+
} from '../../interfaces'
|
|
114
|
+
import type { BlockVideoData } from './../BlockVideo/BlockVideo.vue'
|
|
106
115
|
import IconArrow from './../Icons/IconArrow.vue'
|
|
107
116
|
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
108
117
|
import BasePill from './../BasePill/BasePill.vue'
|
|
109
118
|
import MixinVideoBg from './../MixinVideoBg/MixinVideoBg.vue'
|
|
110
119
|
|
|
120
|
+
export type FeatureObject = PageObject & {
|
|
121
|
+
image?: ImageObject
|
|
122
|
+
video?: VideoObject
|
|
123
|
+
heroBlocks?: (BlockVideoData | StreamfieldBlockData)[]
|
|
124
|
+
listingPageHeroImage?: ImageObject
|
|
125
|
+
}
|
|
111
126
|
export default defineComponent({
|
|
112
127
|
name: 'HeroMedium',
|
|
113
128
|
components: {
|
|
@@ -117,18 +132,21 @@ export default defineComponent({
|
|
|
117
132
|
BasePill
|
|
118
133
|
},
|
|
119
134
|
props: {
|
|
135
|
+
/** Data for the hero. Usually derived from a page's data */
|
|
120
136
|
feature: {
|
|
121
|
-
type: Object
|
|
137
|
+
type: Object as PropType<FeatureObject>,
|
|
122
138
|
required: false,
|
|
123
139
|
default: undefined
|
|
124
140
|
},
|
|
141
|
+
/** Text for pill (overrides label) */
|
|
125
142
|
customPill: {
|
|
126
143
|
type: String,
|
|
127
144
|
required: false,
|
|
128
145
|
default: undefined
|
|
129
146
|
},
|
|
147
|
+
/** Maps to EDU resource types. Label is replaced with a color-themed "pill." Must use with `.ThemeEdu` */
|
|
130
148
|
customPillType: {
|
|
131
|
-
type: String
|
|
149
|
+
type: String as PropType<ContentTypeKey>,
|
|
132
150
|
required: false,
|
|
133
151
|
default: undefined
|
|
134
152
|
},
|
|
@@ -146,21 +164,21 @@ export default defineComponent({
|
|
|
146
164
|
required: false,
|
|
147
165
|
default: false
|
|
148
166
|
},
|
|
149
|
-
|
|
150
|
-
// use-case: news detail pages use this b/c their feature hero is structured differently
|
|
167
|
+
/** Overrides feature video. Use-case: news detail pages use this b/c their feature hero is structured differently */
|
|
151
168
|
customVideo: {
|
|
152
|
-
type: Object
|
|
169
|
+
type: Object as PropType<VideoObject>,
|
|
153
170
|
required: false,
|
|
154
171
|
default: undefined
|
|
155
172
|
},
|
|
173
|
+
/** Overrides feature image. Use-case: news detail pages use this b/c their feature hero is structured differently */
|
|
156
174
|
customImage: {
|
|
157
|
-
type: Object
|
|
175
|
+
type: Object as PropType<ImageObject>,
|
|
158
176
|
required: false,
|
|
159
177
|
default: undefined
|
|
160
178
|
}
|
|
161
179
|
},
|
|
162
180
|
computed: {
|
|
163
|
-
theVideo():
|
|
181
|
+
theVideo(): VideoObject | null {
|
|
164
182
|
if (this.customVideo) {
|
|
165
183
|
return this.customVideo
|
|
166
184
|
} else if (this.feature?.video?.file) {
|
|
@@ -168,7 +186,7 @@ export default defineComponent({
|
|
|
168
186
|
}
|
|
169
187
|
return null
|
|
170
188
|
},
|
|
171
|
-
theImage():
|
|
189
|
+
theImage(): ImageObject | null {
|
|
172
190
|
if (this.customImage) {
|
|
173
191
|
return this.customImage
|
|
174
192
|
} else if (this.feature?.image?.src) {
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import { BaseVideoData } from './../BaseVideo/BaseVideo.stories'
|
|
2
2
|
import { HeroMediumData } from './HeroMedium.stories'
|
|
3
3
|
import HeroMedium from './HeroMedium.vue'
|
|
4
|
+
import { eduMetadataDictionary } from './../../constants'
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
title: 'Components/Heroes/Small',
|
|
7
8
|
component: HeroMedium,
|
|
9
|
+
tags: ['heroes'],
|
|
8
10
|
decorators: [
|
|
9
11
|
() => ({
|
|
10
|
-
template: `<div id="
|
|
12
|
+
template: `<div id="storyRoot" class="max-w-screen-3xl mx-auto"><story/></div>`
|
|
11
13
|
})
|
|
12
14
|
],
|
|
15
|
+
argTypes: {
|
|
16
|
+
customPill: {
|
|
17
|
+
type: { name: 'string', required: false },
|
|
18
|
+
description: 'Text for pill (overrides label)'
|
|
19
|
+
},
|
|
20
|
+
customPillType: {
|
|
21
|
+
type: { name: 'string', required: false },
|
|
22
|
+
control: { type: 'select' },
|
|
23
|
+
options: Object.keys(eduMetadataDictionary),
|
|
24
|
+
description:
|
|
25
|
+
'Maps to EDU resource types. Label is replaced with a color-themed "pill." Must use with `.ThemeEdu`'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
13
28
|
parameters: {
|
|
14
29
|
html: {
|
|
15
|
-
root: '#
|
|
30
|
+
root: '#storyRoot'
|
|
16
31
|
},
|
|
17
32
|
themes: {
|
|
18
33
|
clearable: false,
|
|
@@ -27,8 +42,7 @@ export default {
|
|
|
27
42
|
},
|
|
28
43
|
docs: {
|
|
29
44
|
description: {
|
|
30
|
-
component:
|
|
31
|
-
'`HeroSmall` is the same component as `HeroMedium, but with `compact` set to `true`.'
|
|
45
|
+
component: 'This is the same component as `HeroMedium, but with `compact` set to `true`.'
|
|
32
46
|
}
|
|
33
47
|
}
|
|
34
48
|
},
|
|
@@ -38,7 +52,7 @@ export default {
|
|
|
38
52
|
export const BaseStory = {
|
|
39
53
|
name: 'HeroMedium (compact)',
|
|
40
54
|
args: {
|
|
41
|
-
|
|
55
|
+
customPill: 'News',
|
|
42
56
|
customLabel: HeroMediumData.label,
|
|
43
57
|
feature: HeroMediumData.feature,
|
|
44
58
|
cta: HeroMediumData.cta,
|
|
@@ -48,7 +62,7 @@ export const BaseStory = {
|
|
|
48
62
|
}
|
|
49
63
|
export const Video = {
|
|
50
64
|
args: {
|
|
51
|
-
|
|
65
|
+
customPill: 'News',
|
|
52
66
|
customLabel: HeroMediumData.label,
|
|
53
67
|
feature: HeroMediumData.feature,
|
|
54
68
|
cta: HeroMediumData.cta,
|
|
@@ -4,7 +4,7 @@ import HomepageCarousel from './HomepageCarousel.vue'
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Components/WWW/Homepage/HomepageCarousel',
|
|
6
6
|
component: HomepageCarousel,
|
|
7
|
-
tags: ['
|
|
7
|
+
tags: ['carousel'],
|
|
8
8
|
excludeStories: /.*Data$/,
|
|
9
9
|
parameters: {
|
|
10
10
|
viewMode: 'canvas'
|