@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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
/** The combination of BaseImage and BaseImageCaption, plus adding support for expanding the image in a lightbox and styling it to be a full-bleed image. */
|
|
3
|
+
import { defineComponent, type PropType } from 'vue'
|
|
4
|
+
import type { ImageBlock } from './../../interfaces'
|
|
3
5
|
import BlockImageStandard from './BlockImageStandard.vue'
|
|
4
6
|
import BlockImageFullBleed from './BlockImageFullBleed.vue'
|
|
5
7
|
import LayoutHelper from './../LayoutHelper/LayoutHelper.vue'
|
|
@@ -13,9 +15,10 @@ export default defineComponent({
|
|
|
13
15
|
},
|
|
14
16
|
props: {
|
|
15
17
|
data: {
|
|
16
|
-
type: Object
|
|
18
|
+
type: Object as PropType<ImageBlock>,
|
|
17
19
|
required: false
|
|
18
20
|
},
|
|
21
|
+
/** If image should be the full width of the container */
|
|
19
22
|
fullBleed: {
|
|
20
23
|
type: Boolean,
|
|
21
24
|
required: false,
|
|
@@ -3,27 +3,15 @@ import BlockImageCarousel from './BlockImageCarousel.vue'
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Blocks/BlockImageCarousel',
|
|
5
5
|
component: BlockImageCarousel,
|
|
6
|
+
tags: ['autodocs', 'wagtail-blocks', 'carousels'],
|
|
6
7
|
decorators: [
|
|
7
8
|
() => ({
|
|
8
|
-
template: `<div id="
|
|
9
|
+
template: `<div id="storyRoot" class="container"><story/></div>`
|
|
9
10
|
})
|
|
10
11
|
],
|
|
11
|
-
argTypes: {
|
|
12
|
-
blockId: {
|
|
13
|
-
text: { type: 'string' },
|
|
14
|
-
required: false,
|
|
15
|
-
description:
|
|
16
|
-
'Fancybox: the block id is used to differentiate the fancybox of this carousel from others on the page. Generated by Wagtail.'
|
|
17
|
-
},
|
|
18
|
-
showTitle: {
|
|
19
|
-
text: { type: 'string' },
|
|
20
|
-
required: false,
|
|
21
|
-
description: "Fancybox: if image titles should be displayed in the carousel's fancybox"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
12
|
parameters: {
|
|
25
13
|
html: {
|
|
26
|
-
root: '#
|
|
14
|
+
root: '#storyRoot'
|
|
27
15
|
}
|
|
28
16
|
},
|
|
29
17
|
excludeStories: /.*Data$/
|
|
@@ -101,10 +101,12 @@ export default defineComponent({
|
|
|
101
101
|
type: Number,
|
|
102
102
|
required: false
|
|
103
103
|
},
|
|
104
|
+
/** Fancybox: the block id is used to differentiate the fancybox of this carousel from others on the page. Generated by Wagtail. */
|
|
104
105
|
blockId: {
|
|
105
106
|
type: String,
|
|
106
107
|
required: false
|
|
107
108
|
},
|
|
109
|
+
/** Fancybox: if image titles should be displayed in the carousel's fancybox */
|
|
108
110
|
showTitle: {
|
|
109
111
|
type: Boolean,
|
|
110
112
|
required: false,
|
|
@@ -5,26 +5,12 @@ export default {
|
|
|
5
5
|
component: BlockImageCarouselItem,
|
|
6
6
|
decorators: [
|
|
7
7
|
() => ({
|
|
8
|
-
template: `<div id="
|
|
8
|
+
template: `<div id="storyRoot" class="container mx-auto"><story/></div>`
|
|
9
9
|
})
|
|
10
10
|
],
|
|
11
|
-
argTypes: {
|
|
12
|
-
blockId: {
|
|
13
|
-
text: { type: 'string' },
|
|
14
|
-
required: false,
|
|
15
|
-
description:
|
|
16
|
-
'Fancybox: the block id is used to differentiate the fancybox of the items in a carousel from other carousels on the page. Generated by Wagtail. Usually provided by parent component `BlockImageCarousel`.'
|
|
17
|
-
},
|
|
18
|
-
showTitle: {
|
|
19
|
-
text: { type: 'string' },
|
|
20
|
-
required: false,
|
|
21
|
-
description:
|
|
22
|
-
"Fancybox: if the image title should be displayed in the item's fancybox. Usually provided by parent component `BlockImageCarousel`."
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
11
|
parameters: {
|
|
26
12
|
html: {
|
|
27
|
-
root: '#
|
|
13
|
+
root: '#storyRoot'
|
|
28
14
|
}
|
|
29
15
|
},
|
|
30
16
|
excludeStories: /.*Data$/
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</div>
|
|
42
42
|
</template>
|
|
43
43
|
<script lang="ts">
|
|
44
|
-
import { defineComponent } from 'vue'
|
|
44
|
+
import { defineComponent, type PropType } from 'vue'
|
|
45
45
|
import type { ImageObject } from '../../interfaces'
|
|
46
46
|
import MixinFancybox from './../MixinFancybox/MixinFancybox.vue'
|
|
47
47
|
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
@@ -58,26 +58,26 @@ export default defineComponent({
|
|
|
58
58
|
},
|
|
59
59
|
props: {
|
|
60
60
|
image: {
|
|
61
|
-
type: Object
|
|
61
|
+
type: Object as PropType<ImageObject>,
|
|
62
62
|
required: true,
|
|
63
63
|
default: () => ({})
|
|
64
64
|
},
|
|
65
|
-
|
|
65
|
+
/** If caption should be visible */
|
|
66
66
|
displayCaption: {
|
|
67
67
|
type: Boolean,
|
|
68
68
|
default: true
|
|
69
69
|
},
|
|
70
|
-
|
|
70
|
+
/** Overrides caption provided by `{ImageObject}` */
|
|
71
71
|
caption: {
|
|
72
72
|
type: String,
|
|
73
73
|
required: false
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
/** 'Fancybox: the block id is used to differentiate the fancybox of the items in a carousel from other carousels on the page. Generated by Wagtail. Usually provided by parent component `BlockImageCarousel`.' */
|
|
76
76
|
blockId: {
|
|
77
77
|
type: String,
|
|
78
78
|
required: false
|
|
79
79
|
},
|
|
80
|
-
|
|
80
|
+
/** Fancybox: if the image title should be displayed in the item's fancybox. Usually provided by parent component `BlockImageCarousel`. */
|
|
81
81
|
showTitle: {
|
|
82
82
|
type: Boolean,
|
|
83
83
|
required: false,
|
|
@@ -108,7 +108,7 @@ export default defineComponent({
|
|
|
108
108
|
}
|
|
109
109
|
return null
|
|
110
110
|
},
|
|
111
|
-
hasCaptionArea(): string | boolean {
|
|
111
|
+
hasCaptionArea(): string | boolean | undefined {
|
|
112
112
|
if (this.image) {
|
|
113
113
|
return this.theCaption || this.image.credit || this.image.detailUrl
|
|
114
114
|
}
|
|
@@ -3,14 +3,15 @@ import BlockImageComparison from './BlockImageComparison.vue'
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Blocks/BlockImageComparison',
|
|
5
5
|
component: BlockImageComparison,
|
|
6
|
+
tags: ['wagtail-blocks'],
|
|
6
7
|
decorators: [
|
|
7
8
|
() => ({
|
|
8
|
-
template: `<div id="
|
|
9
|
+
template: `<div id="storyRoot" class="container mx-auto"><story/></div>`
|
|
9
10
|
})
|
|
10
11
|
],
|
|
11
12
|
parameters: {
|
|
12
13
|
html: {
|
|
13
|
-
root: '#
|
|
14
|
+
root: '#storyRoot'
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
excludeStories: /.*Data$/
|
|
@@ -41,6 +42,7 @@ export const BlockImageComparisonData = {
|
|
|
41
42
|
export const BaseStory = {
|
|
42
43
|
name: 'BlockImageComparison',
|
|
43
44
|
args: {
|
|
44
|
-
data: BlockImageComparisonData
|
|
45
|
+
data: BlockImageComparisonData,
|
|
46
|
+
customDetailUrl: 'https://www.google.com'
|
|
45
47
|
}
|
|
46
48
|
}
|
|
@@ -27,17 +27,26 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script lang="ts">
|
|
30
|
-
import { defineComponent } from 'vue'
|
|
30
|
+
import { defineComponent, type PropType } from 'vue'
|
|
31
|
+
import type { BlockData, ImageObject } from './../../interfaces.ts'
|
|
31
32
|
import BaseImageCaption from './../BaseImageCaption/BaseImageCaption.vue'
|
|
32
33
|
|
|
34
|
+
export type BlockImageComparisonData = BlockData & {
|
|
35
|
+
beforeImage: ImageObject
|
|
36
|
+
afterImage: ImageObject
|
|
37
|
+
constrain: boolean
|
|
38
|
+
caption: string
|
|
39
|
+
}
|
|
40
|
+
|
|
33
41
|
export default defineComponent({
|
|
34
42
|
name: 'BlockImageComparison',
|
|
35
43
|
components: { BaseImageCaption },
|
|
36
44
|
props: {
|
|
37
45
|
data: {
|
|
38
|
-
type: Object
|
|
46
|
+
type: Object as PropType<BlockImageComparisonData>,
|
|
39
47
|
required: true
|
|
40
48
|
},
|
|
49
|
+
/** Link to more image details. Link text defaults to "Full image details" */
|
|
41
50
|
customDetailUrl: {
|
|
42
51
|
type: String,
|
|
43
52
|
default: undefined
|
|
@@ -4,23 +4,16 @@ import BlockImageGallery from './BlockImageGallery.vue'
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Components/Blocks/BlockImageGallery',
|
|
6
6
|
component: BlockImageGallery,
|
|
7
|
+
tags: ['wagtail-blocks', 'carousels'],
|
|
7
8
|
decorators: [
|
|
8
9
|
() => ({
|
|
9
|
-
template: `<div id="
|
|
10
|
+
template: `<div id="storyRoot" class="max-w-screen-3xl mx-auto"><story/></div>`
|
|
10
11
|
})
|
|
11
12
|
],
|
|
12
|
-
argTypes: {
|
|
13
|
-
blockId: {
|
|
14
|
-
text: { type: 'string' },
|
|
15
|
-
required: false,
|
|
16
|
-
description:
|
|
17
|
-
'Fancybox: the block id is used to differentiate the fancybox of this gallery from others on the page. Generated by Wagtail.'
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
13
|
|
|
21
14
|
parameters: {
|
|
22
15
|
html: {
|
|
23
|
-
root: '#
|
|
16
|
+
root: '#storyRoot'
|
|
24
17
|
}
|
|
25
18
|
},
|
|
26
19
|
excludeStories: /.*Data$/
|
|
@@ -41,7 +34,7 @@ export const BlockImageGalleryData = {
|
|
|
41
34
|
|
|
42
35
|
export const ImageGalleryData = {
|
|
43
36
|
label: 'Mars',
|
|
44
|
-
|
|
37
|
+
blockId: 'x121p1yuly',
|
|
45
38
|
title: 'Image Gallery',
|
|
46
39
|
description:
|
|
47
40
|
'Gallery description, maximus quis nibh eu, luctus ultrices nulla. Curabitur tempus, massa vitae porttitor porttitor, tortor erat tincidunt magna, vulputate varius nulla leo et mauris.',
|
|
@@ -86,18 +86,22 @@ export default defineComponent({
|
|
|
86
86
|
BlockImageCarousel
|
|
87
87
|
},
|
|
88
88
|
props: {
|
|
89
|
+
/** Small label text appears above the title on the gallery cover */
|
|
89
90
|
label: {
|
|
90
91
|
type: String,
|
|
91
92
|
required: false
|
|
92
93
|
},
|
|
94
|
+
/** Title of the gallery. Appears on gallery cover. */
|
|
93
95
|
title: {
|
|
94
96
|
type: String,
|
|
95
97
|
required: false
|
|
96
98
|
},
|
|
99
|
+
/** Short description of the gallery (plain text). Appears on gallery cover. */
|
|
97
100
|
description: {
|
|
98
101
|
type: String,
|
|
99
102
|
required: false
|
|
100
103
|
},
|
|
104
|
+
/** Image to use as the gallery cover */
|
|
101
105
|
cover: {
|
|
102
106
|
type: Object as PropType<ImageObject>,
|
|
103
107
|
required: false
|
|
@@ -106,6 +110,7 @@ export default defineComponent({
|
|
|
106
110
|
type: Array as PropType<ImageObject[]>,
|
|
107
111
|
required: false
|
|
108
112
|
},
|
|
113
|
+
/** Fancybox: the block id is used to differentiate the fancybox of this gallery from others on the page. Generated by Wagtail. */
|
|
109
114
|
blockId: {
|
|
110
115
|
type: String,
|
|
111
116
|
required: false
|
|
@@ -4,6 +4,7 @@ import BlockInlineImage from './BlockInlineImage.vue'
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Components/Blocks/BlockInlineImage',
|
|
6
6
|
component: BlockInlineImage,
|
|
7
|
+
tags: ['wagtail-blocks'],
|
|
7
8
|
excludeStories: /.*(Data)$/
|
|
8
9
|
}
|
|
9
10
|
|
|
@@ -30,7 +31,7 @@ export const BlockInlineImageData = {
|
|
|
30
31
|
|
|
31
32
|
export const BaseStory = {
|
|
32
33
|
name: 'Align Right',
|
|
33
|
-
args: { data: BlockInlineImageData.block }
|
|
34
|
+
args: { data: BlockInlineImageData.block, variant: 'large' }
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
export const CustomCaption = {
|
|
@@ -64,6 +65,8 @@ export const PortraitImage = {
|
|
|
64
65
|
width: 500
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
|
-
}
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
variant: 'large'
|
|
68
71
|
}
|
|
69
72
|
}
|
|
@@ -55,13 +55,22 @@
|
|
|
55
55
|
|
|
56
56
|
<script lang="ts">
|
|
57
57
|
import { defineComponent, type PropType } from 'vue'
|
|
58
|
-
import type { ImageObject } from '../../interfaces'
|
|
58
|
+
import type { BlockData, ImageObject } from '../../interfaces'
|
|
59
59
|
import { mixinGetSrcSet } from './../../utils/mixins'
|
|
60
60
|
import MixinFancybox from './../MixinFancybox/MixinFancybox.vue'
|
|
61
61
|
import BaseImagePlaceholder from './../BaseImagePlaceholder/BaseImagePlaceholder.vue'
|
|
62
62
|
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
63
63
|
import BaseImageCaption from './../BaseImageCaption/BaseImageCaption.vue'
|
|
64
|
-
import BlockText from './../BlockText/BlockText.vue'
|
|
64
|
+
import BlockText, { type VariantKey as BlockTextVariantKey } from './../BlockText/BlockText.vue'
|
|
65
|
+
|
|
66
|
+
export type BlockInlineImageData = BlockData & {
|
|
67
|
+
/** rich text */
|
|
68
|
+
text?: string
|
|
69
|
+
caption?: string
|
|
70
|
+
displayCaption: boolean
|
|
71
|
+
image?: ImageObject
|
|
72
|
+
alignTo: 'left' | 'right'
|
|
73
|
+
}
|
|
65
74
|
|
|
66
75
|
export default defineComponent({
|
|
67
76
|
name: 'BlockInlineImage',
|
|
@@ -74,11 +83,15 @@ export default defineComponent({
|
|
|
74
83
|
},
|
|
75
84
|
props: {
|
|
76
85
|
data: {
|
|
77
|
-
type: Object
|
|
78
|
-
required: false
|
|
86
|
+
type: Object as PropType<BlockInlineImageData>,
|
|
87
|
+
required: false,
|
|
88
|
+
default: undefined
|
|
79
89
|
},
|
|
90
|
+
/**
|
|
91
|
+
* Adjusts text size and vertical spacing. Corresponds with the same variants in `BlockText`
|
|
92
|
+
*/
|
|
80
93
|
variant: {
|
|
81
|
-
type: String as PropType<
|
|
94
|
+
type: String as PropType<BlockTextVariantKey>,
|
|
82
95
|
default: 'large'
|
|
83
96
|
}
|
|
84
97
|
},
|
|
@@ -93,7 +106,7 @@ export default defineComponent({
|
|
|
93
106
|
return this.data.caption
|
|
94
107
|
} else if (
|
|
95
108
|
this.data &&
|
|
96
|
-
this.data.image
|
|
109
|
+
this.data.image?.caption &&
|
|
97
110
|
this.data.image.caption.length > 2 &&
|
|
98
111
|
this.data.displayCaption
|
|
99
112
|
) {
|
|
@@ -111,7 +124,7 @@ export default defineComponent({
|
|
|
111
124
|
}
|
|
112
125
|
return null
|
|
113
126
|
},
|
|
114
|
-
hasCaptionArea(): string | false {
|
|
127
|
+
hasCaptionArea(): string | false | undefined {
|
|
115
128
|
if (this.data && this.data.image) {
|
|
116
129
|
return this.theCaption || this.data.image.credit || this.data.image.detailUrl
|
|
117
130
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
class="BlockKeyPoints border-gray-light-mid lg:py-10 py-6 border-t border-b"
|
|
5
5
|
>
|
|
6
6
|
<BlockHeading
|
|
7
|
+
v-if="data.heading"
|
|
7
8
|
class="mb-5"
|
|
8
9
|
:data="{ heading: data.heading }"
|
|
9
10
|
/>
|
|
@@ -24,10 +25,17 @@
|
|
|
24
25
|
</template>
|
|
25
26
|
|
|
26
27
|
<script lang="ts">
|
|
27
|
-
import { defineComponent } from 'vue'
|
|
28
|
+
import { defineComponent, type PropType } from 'vue'
|
|
29
|
+
import { BlockData } from './../../interfaces.ts'
|
|
28
30
|
import BlockHeading from './../BlockHeading/BlockHeading.vue'
|
|
29
31
|
import BlockText from './../BlockText/BlockText.vue'
|
|
30
32
|
|
|
33
|
+
export type BlockKeyPointsData = BlockData & {
|
|
34
|
+
listItem: {
|
|
35
|
+
text: string
|
|
36
|
+
}[]
|
|
37
|
+
}
|
|
38
|
+
|
|
31
39
|
export default defineComponent({
|
|
32
40
|
name: 'BlockKeyPoints',
|
|
33
41
|
components: {
|
|
@@ -36,8 +44,9 @@ export default defineComponent({
|
|
|
36
44
|
},
|
|
37
45
|
props: {
|
|
38
46
|
data: {
|
|
39
|
-
type: Object
|
|
40
|
-
required: false
|
|
47
|
+
type: Object as PropType<BlockKeyPointsData>,
|
|
48
|
+
required: false,
|
|
49
|
+
default: undefined
|
|
41
50
|
}
|
|
42
51
|
}
|
|
43
52
|
})
|
|
@@ -5,27 +5,11 @@ import BlockLinkCard from './BlockLinkCard.vue'
|
|
|
5
5
|
export default {
|
|
6
6
|
title: 'Components/Cards/BlockLinkCard',
|
|
7
7
|
component: BlockLinkCard,
|
|
8
|
-
tags: ['
|
|
8
|
+
tags: ['cards'],
|
|
9
9
|
excludeStories: /.*Data$/,
|
|
10
|
-
argTypes: {
|
|
11
|
-
size: {
|
|
12
|
-
control: {
|
|
13
|
-
type: 'select'
|
|
14
|
-
},
|
|
15
|
-
options: ['sm', 'md', 'lg']
|
|
16
|
-
},
|
|
17
|
-
headingLevel: {
|
|
18
|
-
description:
|
|
19
|
-
'Change the heading level for semantic markup. This does not affect the style of the heading.',
|
|
20
|
-
control: {
|
|
21
|
-
type: 'select',
|
|
22
|
-
options: [null, 'h1', 'h2', 'h3', 'h4', 'h5']
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
10
|
parameters: {
|
|
27
11
|
html: {
|
|
28
|
-
root: '#
|
|
12
|
+
root: '#storyRoot' // to omit decorators from html output
|
|
29
13
|
}
|
|
30
14
|
}
|
|
31
15
|
}
|
|
@@ -46,16 +30,14 @@ export const BlockLinkCardData = {
|
|
|
46
30
|
alt: 'Alt text'
|
|
47
31
|
}
|
|
48
32
|
},
|
|
49
|
-
headingLevel: 'h2'
|
|
50
|
-
startDate: undefined,
|
|
51
|
-
endDate: undefined
|
|
33
|
+
headingLevel: 'h2'
|
|
52
34
|
}
|
|
53
35
|
|
|
54
36
|
export const BaseStory = {
|
|
55
37
|
name: 'Single Item',
|
|
56
38
|
decorators: [
|
|
57
39
|
() => ({
|
|
58
|
-
template: `<div id="
|
|
40
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3"><story/></div>`
|
|
59
41
|
})
|
|
60
42
|
],
|
|
61
43
|
args: {
|
|
@@ -66,7 +48,7 @@ export const BaseStory = {
|
|
|
66
48
|
export const SingleItemCompactStyles = {
|
|
67
49
|
decorators: [
|
|
68
50
|
() => ({
|
|
69
|
-
template: `<div id="
|
|
51
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3"><story/></div>`
|
|
70
52
|
})
|
|
71
53
|
],
|
|
72
54
|
args: {
|
|
@@ -78,7 +60,7 @@ export const SingleItemCompactStyles = {
|
|
|
78
60
|
export const Compact = {
|
|
79
61
|
decorators: [
|
|
80
62
|
() => ({
|
|
81
|
-
template: `<div id="
|
|
63
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3"><story/></div>`
|
|
82
64
|
})
|
|
83
65
|
],
|
|
84
66
|
name: 'Compact w/ Custom Props',
|
|
@@ -110,7 +92,7 @@ export const Compact = {
|
|
|
110
92
|
export const EventItem = {
|
|
111
93
|
decorators: [
|
|
112
94
|
() => ({
|
|
113
|
-
template: `<div id="
|
|
95
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3"><story/></div>`
|
|
114
96
|
})
|
|
115
97
|
],
|
|
116
98
|
args: {
|
|
@@ -132,7 +114,7 @@ export const EventItem = {
|
|
|
132
114
|
export const EventItemWithChip = {
|
|
133
115
|
decorators: [
|
|
134
116
|
() => ({
|
|
135
|
-
template: `<div id="
|
|
117
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3"><story/></div>`
|
|
136
118
|
})
|
|
137
119
|
],
|
|
138
120
|
args: {
|
|
@@ -155,12 +137,13 @@ export const EventItemWithChip = {
|
|
|
155
137
|
export const EventWithDateNoTime = {
|
|
156
138
|
decorators: [
|
|
157
139
|
() => ({
|
|
158
|
-
template: `<div id="
|
|
140
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3"><story/></div>`
|
|
159
141
|
})
|
|
160
142
|
],
|
|
161
143
|
args: {
|
|
162
144
|
...BlockLinkCardData,
|
|
163
145
|
showCalendarChip: true,
|
|
146
|
+
|
|
164
147
|
data: {
|
|
165
148
|
page: {
|
|
166
149
|
...BlockLinkCardData.data,
|
|
@@ -172,13 +155,17 @@ export const EventWithDateNoTime = {
|
|
|
172
155
|
ongoing: false,
|
|
173
156
|
eventType: 'Workshop'
|
|
174
157
|
}
|
|
175
|
-
}
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
startDate: 1760598000000,
|
|
161
|
+
endDate: 1761894000000,
|
|
162
|
+
startDatetime: "2025-10-11T00:00:00-08:00'"
|
|
176
163
|
}
|
|
177
164
|
}
|
|
178
165
|
export const EduLesson = {
|
|
179
166
|
decorators: [
|
|
180
167
|
() => ({
|
|
181
|
-
template: `<div id="
|
|
168
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3"><story/></div>`
|
|
182
169
|
})
|
|
183
170
|
],
|
|
184
171
|
globals: { theme: 'ThemeEdu' },
|
|
@@ -208,12 +195,13 @@ export const EduLesson = {
|
|
|
208
195
|
export const EduExplainerArticle = {
|
|
209
196
|
decorators: [
|
|
210
197
|
() => ({
|
|
211
|
-
template: `<div id="
|
|
198
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3"><story/></div>`
|
|
212
199
|
})
|
|
213
200
|
],
|
|
214
201
|
globals: { theme: 'ThemeEdu' },
|
|
215
202
|
args: {
|
|
216
203
|
...BlockLinkCardData,
|
|
204
|
+
|
|
217
205
|
data: {
|
|
218
206
|
page: {
|
|
219
207
|
__typename: 'EDUExplainerArticlePage',
|
|
@@ -232,7 +220,9 @@ export const EduExplainerArticle = {
|
|
|
232
220
|
{ gradeLevel: '8' }
|
|
233
221
|
]
|
|
234
222
|
}
|
|
235
|
-
}
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
size: 'md'
|
|
236
226
|
}
|
|
237
227
|
}
|
|
238
228
|
export const LargeEduExplainerArticle = {
|
|
@@ -266,7 +256,7 @@ export const EduCollection = {
|
|
|
266
256
|
globals: { theme: 'ThemeEdu' },
|
|
267
257
|
decorators: [
|
|
268
258
|
() => ({
|
|
269
|
-
template: `<div id="
|
|
259
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3"><story/></div>`
|
|
270
260
|
})
|
|
271
261
|
],
|
|
272
262
|
args: {
|
|
@@ -336,7 +326,7 @@ export const EduNewsItem = {
|
|
|
336
326
|
globals: { theme: 'ThemeEdu' },
|
|
337
327
|
decorators: [
|
|
338
328
|
() => ({
|
|
339
|
-
template: `<div id="
|
|
329
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3"><story/></div>`
|
|
340
330
|
})
|
|
341
331
|
],
|
|
342
332
|
args: {
|
|
@@ -355,7 +345,7 @@ export const EduNewsItem = {
|
|
|
355
345
|
export const ExternalLink = {
|
|
356
346
|
decorators: [
|
|
357
347
|
() => ({
|
|
358
|
-
template: `<div id="
|
|
348
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3"><story/></div>`
|
|
359
349
|
})
|
|
360
350
|
],
|
|
361
351
|
args: {
|