@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
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
<div
|
|
179
179
|
v-if="!large"
|
|
180
180
|
class="BlockLinkCard__CardArrow ThemeVariantLight can-hover:block can-hover:-ml-3 can-hover:group-hover:delay-200 can-hover:opacity-0 can-hover:group-hover:ml-0 can-hover:group-hover:opacity-100 hidden -mt-1 text-2xl leading-normal transition-all duration-200 ease-in"
|
|
181
|
-
:class="metadataAttrs ? `text-${metadataAttrs.icons}` : 'text-
|
|
181
|
+
:class="metadataAttrs ? `text-${metadataAttrs.icons}` : 'text-action'"
|
|
182
182
|
>
|
|
183
183
|
<IconArrow />
|
|
184
184
|
</div>
|
|
@@ -189,7 +189,12 @@
|
|
|
189
189
|
|
|
190
190
|
<script lang="ts">
|
|
191
191
|
import type { PropType } from 'vue'
|
|
192
|
-
import type {
|
|
192
|
+
import type {
|
|
193
|
+
ContentTypeKey,
|
|
194
|
+
Card,
|
|
195
|
+
EventCardObject,
|
|
196
|
+
EduResourceCardObject
|
|
197
|
+
} from './../../interfaces.ts'
|
|
193
198
|
import { defineComponent } from 'vue'
|
|
194
199
|
import { mapStores } from 'pinia'
|
|
195
200
|
import { useThemeStore } from '../../store/theme'
|
|
@@ -223,88 +228,102 @@ export default defineComponent({
|
|
|
223
228
|
BlockLinkCardCollectionLg
|
|
224
229
|
},
|
|
225
230
|
props: {
|
|
231
|
+
/** Card data (can accept page data with key `page`) */
|
|
226
232
|
data: {
|
|
227
233
|
type: Object as PropType<Card>,
|
|
228
234
|
required: false,
|
|
229
235
|
default: undefined
|
|
230
236
|
},
|
|
231
|
-
|
|
232
|
-
// so we can use this component in search results
|
|
237
|
+
/** Overrides `data` */
|
|
233
238
|
url: {
|
|
234
239
|
type: String,
|
|
235
240
|
required: false,
|
|
236
241
|
default: undefined
|
|
237
242
|
},
|
|
243
|
+
/** Overrides `data` */
|
|
238
244
|
externalLink: {
|
|
239
245
|
type: String,
|
|
240
246
|
required: false,
|
|
241
247
|
default: undefined
|
|
242
248
|
},
|
|
249
|
+
/** Overrides `data` */
|
|
243
250
|
thumbnailImage: {
|
|
244
251
|
type: Object,
|
|
245
252
|
required: false,
|
|
246
253
|
default: undefined
|
|
247
254
|
},
|
|
255
|
+
/** Overrides `data` */
|
|
248
256
|
label: {
|
|
249
257
|
type: String,
|
|
250
258
|
required: false,
|
|
251
259
|
default: undefined
|
|
252
260
|
},
|
|
261
|
+
/** Overrides `data` */
|
|
253
262
|
title: {
|
|
254
263
|
type: String,
|
|
255
264
|
required: false,
|
|
256
265
|
default: undefined
|
|
257
266
|
},
|
|
267
|
+
/** Overrides `data` */
|
|
258
268
|
date: {
|
|
259
269
|
type: String,
|
|
260
270
|
required: false,
|
|
261
271
|
default: undefined
|
|
262
272
|
},
|
|
273
|
+
/** Events: overrides `data` */
|
|
263
274
|
eventType: {
|
|
264
275
|
type: String,
|
|
265
276
|
default: undefined
|
|
266
277
|
},
|
|
278
|
+
/** Events: overrides `data` */
|
|
267
279
|
startDate: {
|
|
268
280
|
type: String,
|
|
269
281
|
required: false,
|
|
270
282
|
default: undefined
|
|
271
283
|
},
|
|
284
|
+
/** Events: overrides `data` */
|
|
272
285
|
endDate: {
|
|
273
286
|
type: String,
|
|
274
287
|
required: false,
|
|
275
288
|
default: undefined
|
|
276
289
|
},
|
|
290
|
+
/** Events: overrides `data` */
|
|
277
291
|
ongoing: {
|
|
278
292
|
type: Boolean,
|
|
279
293
|
default: false
|
|
280
294
|
},
|
|
295
|
+
/** Events: overrides `data` */
|
|
281
296
|
startDatetime: {
|
|
282
297
|
type: String,
|
|
283
298
|
default: undefined
|
|
284
299
|
},
|
|
300
|
+
/** Events: overrides `data` */
|
|
285
301
|
endDatetime: {
|
|
286
302
|
type: String,
|
|
287
303
|
default: undefined
|
|
288
304
|
},
|
|
305
|
+
/** Events: overrides `data` */
|
|
289
306
|
location: {
|
|
290
307
|
type: String,
|
|
291
308
|
default: undefined
|
|
292
309
|
},
|
|
293
|
-
|
|
310
|
+
/** Compactness of styling. `sm` and `md` recommended for grids or horizontal lists. `lg` is a horizontal layout recommended for wide lists */
|
|
294
311
|
size: {
|
|
295
|
-
type: String
|
|
312
|
+
type: String as PropType<'sm' | 'md' | 'lg'>,
|
|
296
313
|
default: 'md'
|
|
297
314
|
},
|
|
298
|
-
|
|
315
|
+
/** Heading level for semantic markup. This does not affect the style of the heading. No heading element is used if `undefined` */
|
|
299
316
|
headingLevel: {
|
|
300
317
|
type: (String as PropType<HeadingLevel>) || null,
|
|
301
318
|
required: false,
|
|
302
319
|
default: undefined
|
|
303
320
|
},
|
|
321
|
+
/** Events: overrides `data` */
|
|
304
322
|
showCalendarChip: {
|
|
305
323
|
type: Boolean,
|
|
306
324
|
default: false
|
|
307
325
|
},
|
|
326
|
+
/** Currently only applies to EDU Collection cards. If "featured" styles are turned on, the card background and text colors will be inverted. */
|
|
308
327
|
useFeaturedStyles: {
|
|
309
328
|
type: Boolean,
|
|
310
329
|
default: false
|
|
@@ -374,11 +393,11 @@ export default defineComponent({
|
|
|
374
393
|
}
|
|
375
394
|
return undefined
|
|
376
395
|
},
|
|
377
|
-
metadataType() {
|
|
396
|
+
metadataType(): ContentTypeKey | undefined {
|
|
378
397
|
// checks that this is a valid metadata type
|
|
379
398
|
const validContentTypes = Object.keys(eduMetadataDictionary)
|
|
380
399
|
return this.data?.page?.__typename && validContentTypes.includes(this.data?.page?.__typename)
|
|
381
|
-
? this.data?.page?.__typename
|
|
400
|
+
? (this.data?.page?.__typename as ContentTypeKey)
|
|
382
401
|
: undefined
|
|
383
402
|
},
|
|
384
403
|
metadataAttrs() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, reactive } from 'vue'
|
|
3
|
-
import type { EduResourceCardObject } from '../../interfaces'
|
|
3
|
+
import type { ContentTypeKey, EduResourceCardObject } from '../../interfaces'
|
|
4
4
|
import type { HeadingLevel } from './../BaseHeading/BaseHeading.vue'
|
|
5
5
|
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
6
6
|
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
@@ -10,7 +10,7 @@ import MetadataEduResource from './../MetadataEduResource/MetadataEduResource.vu
|
|
|
10
10
|
|
|
11
11
|
interface BlockLinkCardCollectionLgProps {
|
|
12
12
|
theItem?: EduResourceCardObject
|
|
13
|
-
metadataType?:
|
|
13
|
+
metadataType?: ContentTypeKey
|
|
14
14
|
metadataAttrs?: any
|
|
15
15
|
headingLevel?: HeadingLevel
|
|
16
16
|
size?: string
|
|
@@ -3,7 +3,7 @@ import BlockLinkCardList from './BlockLinkCardList.vue'
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Blocks/BlockLinkCardList',
|
|
5
5
|
component: BlockLinkCardList,
|
|
6
|
-
tags: ['
|
|
6
|
+
tags: ['wagtail-blocks', 'listings'],
|
|
7
7
|
excludeStories: /.*Data$/
|
|
8
8
|
}
|
|
9
9
|
export const BlockLinkCardData = {
|
|
@@ -103,8 +103,6 @@ export const BlockLinkCardCarouselData = [
|
|
|
103
103
|
export const BaseStory = {
|
|
104
104
|
name: 'BlockLinkCardList',
|
|
105
105
|
args: {
|
|
106
|
-
itemType: 'cards',
|
|
107
|
-
heading: 'Related Pages',
|
|
108
106
|
items: BlockLinkCardCarouselData
|
|
109
107
|
}
|
|
110
108
|
}
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import BlockLinkCarousel
|
|
1
|
+
import BlockLinkCarousel from './BlockLinkCarousel.vue'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/Blocks/BlockLinkCarousel',
|
|
5
5
|
component: BlockLinkCarousel,
|
|
6
|
-
|
|
7
|
-
itemType: {
|
|
8
|
-
type: 'string',
|
|
9
|
-
description: 'Type of item used for each slide',
|
|
10
|
-
control: {
|
|
11
|
-
type: 'select'
|
|
12
|
-
},
|
|
13
|
-
options: Object.keys(itemTypes),
|
|
14
|
-
table: {
|
|
15
|
-
defaultValue: { summary: 'cards' }
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
6
|
+
tags: ['wagtail-blocks', 'carousels', 'listings'],
|
|
19
7
|
excludeStories: /.*Data$/
|
|
20
8
|
}
|
|
21
9
|
|
|
@@ -15,20 +15,19 @@
|
|
|
15
15
|
</MixinCarousel>
|
|
16
16
|
</template>
|
|
17
17
|
<script lang="ts">
|
|
18
|
-
import { defineComponent, resolveComponent } from 'vue'
|
|
18
|
+
import { defineComponent, resolveComponent, type PropType } from 'vue'
|
|
19
|
+
import type { Card } from './../../interfaces.ts'
|
|
19
20
|
import MixinCarousel from './../MixinCarousel/MixinCarousel.vue'
|
|
20
21
|
import BlockLinkCard from './../BlockLinkCard/BlockLinkCard.vue'
|
|
21
22
|
import BlockLinkTile from './../BlockLinkTile/BlockLinkTile.vue'
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
[key: string]: string
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const itemTypes: Variants = {
|
|
24
|
+
export const itemTypes = {
|
|
28
25
|
cards: 'BlockLinkCard',
|
|
29
26
|
tiles: 'BlockLinkTile'
|
|
30
27
|
}
|
|
31
28
|
|
|
29
|
+
type ItemTypesKey = keyof typeof itemTypes
|
|
30
|
+
|
|
32
31
|
export default defineComponent({
|
|
33
32
|
name: 'BlockLinkCarousel',
|
|
34
33
|
components: {
|
|
@@ -37,14 +36,15 @@ export default defineComponent({
|
|
|
37
36
|
BlockLinkTile
|
|
38
37
|
},
|
|
39
38
|
props: {
|
|
39
|
+
/** Type of item used for each slide */
|
|
40
40
|
itemType: {
|
|
41
|
-
type: String
|
|
41
|
+
type: String as PropType<ItemTypesKey>,
|
|
42
42
|
required: false,
|
|
43
43
|
default: 'cards',
|
|
44
44
|
validator: (prop: string): boolean => Object.keys(itemTypes).includes(prop)
|
|
45
45
|
},
|
|
46
46
|
items: {
|
|
47
|
-
type: Array
|
|
47
|
+
type: Array as PropType<Card[]>,
|
|
48
48
|
required: false,
|
|
49
49
|
default: undefined
|
|
50
50
|
},
|
|
@@ -5,25 +5,15 @@ import BlockLinkTile from './BlockLinkTile.vue'
|
|
|
5
5
|
export default {
|
|
6
6
|
title: 'Components/Cards/BlockLinkTile',
|
|
7
7
|
component: BlockLinkTile,
|
|
8
|
+
tags: ['cards'],
|
|
8
9
|
decorators: [
|
|
9
10
|
() => ({
|
|
10
|
-
template: `<div id="
|
|
11
|
+
template: `<div id="storyRoot" class="relative grid grid-cols-2 gap-3 lg:grid-cols-3"><story/></div>`
|
|
11
12
|
})
|
|
12
13
|
],
|
|
13
|
-
tags: ['!autodocs'],
|
|
14
|
-
argTypes: {
|
|
15
|
-
headingLevel: {
|
|
16
|
-
description:
|
|
17
|
-
'Change the heading level for semantic markup. This does not affect the style of the heading.',
|
|
18
|
-
control: {
|
|
19
|
-
type: 'select'
|
|
20
|
-
},
|
|
21
|
-
options: [null, 'h1', 'h2', 'h3', 'h4', 'h5']
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
14
|
parameters: {
|
|
25
15
|
html: {
|
|
26
|
-
root: '#
|
|
16
|
+
root: '#storyRoot'
|
|
27
17
|
}
|
|
28
18
|
},
|
|
29
19
|
excludeStories: /.*Data$/
|
|
@@ -99,47 +99,60 @@ export default defineComponent({
|
|
|
99
99
|
BaseImagePlaceholder
|
|
100
100
|
},
|
|
101
101
|
props: {
|
|
102
|
-
|
|
102
|
+
/** Card data (can accept page data with key `page`) */
|
|
103
103
|
data: {
|
|
104
104
|
type: Object as PropType<Card | EventCardObject>,
|
|
105
|
-
required: false
|
|
105
|
+
required: false,
|
|
106
|
+
default: undefined
|
|
106
107
|
},
|
|
107
|
-
|
|
108
|
-
// so we can use this component in search results
|
|
108
|
+
/** Overrides `data` */
|
|
109
109
|
url: {
|
|
110
110
|
type: String,
|
|
111
|
-
required: false
|
|
111
|
+
required: false,
|
|
112
|
+
default: undefined
|
|
112
113
|
},
|
|
114
|
+
/** Overrides `data` */
|
|
113
115
|
externalLink: {
|
|
114
116
|
type: String,
|
|
115
|
-
required: false
|
|
117
|
+
required: false,
|
|
118
|
+
default: undefined
|
|
116
119
|
},
|
|
120
|
+
/** Overrides `data` */
|
|
117
121
|
thumbnailImage: {
|
|
118
122
|
type: Object,
|
|
119
|
-
required: false
|
|
123
|
+
required: false,
|
|
124
|
+
default: undefined
|
|
120
125
|
},
|
|
126
|
+
/** Overrides `data` */
|
|
121
127
|
label: {
|
|
122
128
|
type: String,
|
|
123
|
-
required: false
|
|
129
|
+
required: false,
|
|
130
|
+
default: undefined
|
|
124
131
|
},
|
|
132
|
+
/** Overrides `data` */
|
|
125
133
|
title: {
|
|
126
134
|
type: String,
|
|
127
|
-
required: false
|
|
135
|
+
required: false,
|
|
136
|
+
default: undefined
|
|
128
137
|
},
|
|
138
|
+
/** Event: overrides `data` */
|
|
129
139
|
startDate: {
|
|
130
140
|
type: String,
|
|
131
|
-
required: false
|
|
141
|
+
required: false,
|
|
142
|
+
default: undefined
|
|
132
143
|
},
|
|
144
|
+
/** Event: overrides `data` */
|
|
133
145
|
endDate: {
|
|
134
146
|
type: String,
|
|
135
|
-
required: false
|
|
147
|
+
required: false,
|
|
148
|
+
default: undefined
|
|
136
149
|
},
|
|
137
|
-
|
|
150
|
+
/** If compact styling should be used (adjusts text size) */
|
|
138
151
|
compact: {
|
|
139
152
|
type: Boolean,
|
|
140
153
|
default: false
|
|
141
154
|
},
|
|
142
|
-
|
|
155
|
+
/** Heading level for semantic markup. This does not affect the style of the heading. No heading element is used if `undefined` */
|
|
143
156
|
headingLevel: {
|
|
144
157
|
type: (String as PropType<HeadingLevel>) || null,
|
|
145
158
|
required: false
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
</template>
|
|
97
97
|
|
|
98
98
|
<script lang="ts">
|
|
99
|
-
import { defineComponent } from 'vue'
|
|
99
|
+
import { defineComponent, type PropType } from 'vue'
|
|
100
100
|
import { mixinGetExternalLink } from './../../utils/mixins'
|
|
101
|
-
import type { RelatedLinkObject } from '../../interfaces'
|
|
101
|
+
import type { BlockData, RelatedLinkObject } from '../../interfaces'
|
|
102
102
|
import BaseHeading from './../BaseHeading/BaseHeading.vue'
|
|
103
103
|
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
104
104
|
import BaseImage from './../BaseImage/BaseImage.vue'
|
|
@@ -116,8 +116,9 @@ export default defineComponent({
|
|
|
116
116
|
},
|
|
117
117
|
props: {
|
|
118
118
|
data: {
|
|
119
|
-
type: Object
|
|
120
|
-
required: false
|
|
119
|
+
type: Object as PropType<BlockData>,
|
|
120
|
+
required: false,
|
|
121
|
+
default: undefined
|
|
121
122
|
}
|
|
122
123
|
},
|
|
123
124
|
methods: {
|
|
@@ -60,8 +60,9 @@
|
|
|
60
60
|
</template>
|
|
61
61
|
<script lang="ts">
|
|
62
62
|
// @ts-nocheck
|
|
63
|
-
import { defineComponent } from 'vue'
|
|
63
|
+
import { defineComponent, type PropType } from 'vue'
|
|
64
64
|
import { mapStores } from 'pinia'
|
|
65
|
+
import type { BlockData } from './../../interfaces.ts'
|
|
65
66
|
import { useThemeStore } from '../../store/theme'
|
|
66
67
|
import BaseButton from './../BaseButton/BaseButton.vue'
|
|
67
68
|
import BaseRadioGroup from './../BaseRadioGroup/BaseRadioGroup.vue'
|
|
@@ -115,7 +116,7 @@ export default defineComponent({
|
|
|
115
116
|
},
|
|
116
117
|
props: {
|
|
117
118
|
data: {
|
|
118
|
-
type: Object
|
|
119
|
+
type: Object as PropType<BlockData>,
|
|
119
120
|
required: true,
|
|
120
121
|
default: () => ({})
|
|
121
122
|
}
|
|
@@ -50,8 +50,9 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
</template>
|
|
52
52
|
<script lang="ts">
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
/** A big, fancy pull quote, with optional attribution and link. Can also be used for non-quotation callouts. */
|
|
54
|
+
|
|
55
|
+
import { defineComponent, type PropType } from 'vue'
|
|
55
56
|
import BaseLink from './../BaseLink/BaseLink.vue'
|
|
56
57
|
|
|
57
58
|
export interface BlockQuoteAttributes {
|
|
@@ -43,11 +43,12 @@
|
|
|
43
43
|
</div>
|
|
44
44
|
</template>
|
|
45
45
|
<script lang="ts">
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
/** A list of links formatted with background colors and icons indicating the type of link. */
|
|
47
|
+
|
|
48
|
+
import { defineComponent, type PropType } from 'vue'
|
|
48
49
|
import type { BlockData, RelatedLinkObject } from './../../interfaces'
|
|
49
50
|
import RelatedLink from './../BlockRelatedLinks/RelatedLink.vue'
|
|
50
|
-
import BaseHeading from './../BaseHeading/BaseHeading.vue'
|
|
51
|
+
import BaseHeading, { type HeadingLevel } from './../BaseHeading/BaseHeading.vue'
|
|
51
52
|
|
|
52
53
|
export interface BlockRelatedLinksObject extends BlockData {
|
|
53
54
|
heading: string
|
|
@@ -66,8 +67,9 @@ export default defineComponent({
|
|
|
66
67
|
required: true,
|
|
67
68
|
default: () => ({})
|
|
68
69
|
},
|
|
70
|
+
/** Semantic heading level. Does not affect appearance. */
|
|
69
71
|
headingSize: {
|
|
70
|
-
type: String
|
|
72
|
+
type: String as PropType<HeadingLevel>,
|
|
71
73
|
required: false,
|
|
72
74
|
default: undefined
|
|
73
75
|
}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { defineComponent } from 'vue'
|
|
2
|
+
import { defineComponent, type PropType } from 'vue'
|
|
3
|
+
import type { BlockData, ImageBlock, StreamfieldBlockData } from './../../interfaces.ts'
|
|
3
4
|
import BlockImageStandard from './../BlockImage/BlockImageStandard.vue'
|
|
4
5
|
import BlockText from './../BlockText/BlockText.vue'
|
|
5
6
|
|
|
7
|
+
type HeadCell = {
|
|
8
|
+
text?: string
|
|
9
|
+
}
|
|
10
|
+
type RichTableObject = BlockData & {
|
|
11
|
+
tableCaption?: string
|
|
12
|
+
tableContent?: {
|
|
13
|
+
tableHead?: HeadCell[]
|
|
14
|
+
tableBody?: BlockData[][]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
6
18
|
export default defineComponent({
|
|
7
19
|
name: 'BlockRichTable',
|
|
8
20
|
components: {
|
|
@@ -11,7 +23,7 @@ export default defineComponent({
|
|
|
11
23
|
},
|
|
12
24
|
props: {
|
|
13
25
|
table: {
|
|
14
|
-
type: Object
|
|
26
|
+
type: Object as PropType<RichTableObject>,
|
|
15
27
|
required: true
|
|
16
28
|
}
|
|
17
29
|
}
|
|
@@ -44,7 +56,9 @@ export default defineComponent({
|
|
|
44
56
|
scope="col"
|
|
45
57
|
class="min-w-[6rem] bg-jpl-blue-darker edu:bg-jpl-violet-darker text-subtitle text-white border-gray-light-mid lg:p-5 p-3 border-b text-left"
|
|
46
58
|
>
|
|
47
|
-
|
|
59
|
+
<template v-if="headCell">
|
|
60
|
+
{{ (headCell as HeadCell).text }}
|
|
61
|
+
</template>
|
|
48
62
|
</th>
|
|
49
63
|
</tr>
|
|
50
64
|
</thead>
|
|
@@ -60,22 +74,22 @@ export default defineComponent({
|
|
|
60
74
|
>
|
|
61
75
|
<template v-if="cell.blockType === 'CharBlock'">
|
|
62
76
|
<p class="">
|
|
63
|
-
{{ cell.value }}
|
|
77
|
+
{{ (cell as StreamfieldBlockData).value }}
|
|
64
78
|
</p>
|
|
65
79
|
</template>
|
|
66
80
|
<template v-else-if="cell.blockType === 'RichTextBlock'">
|
|
67
81
|
<BlockText
|
|
68
82
|
variant="small"
|
|
69
|
-
:text="cell.value"
|
|
83
|
+
:text="(cell as StreamfieldBlockData).value"
|
|
70
84
|
/>
|
|
71
85
|
</template>
|
|
72
86
|
<template v-else-if="cell.blockType === 'ImageBlock'">
|
|
73
87
|
<BlockImageStandard
|
|
74
88
|
class=""
|
|
75
|
-
:data="cell.image"
|
|
76
|
-
:display-caption="cell.displayCaption"
|
|
77
|
-
:caption="cell.caption"
|
|
78
|
-
:constrain="cell.constrain"
|
|
89
|
+
:data="(cell as ImageBlock).image"
|
|
90
|
+
:display-caption="(cell as ImageBlock).displayCaption"
|
|
91
|
+
:caption="(cell as ImageBlock).caption"
|
|
92
|
+
:constrain="(cell as ImageBlock).constrain"
|
|
79
93
|
/>
|
|
80
94
|
</template>
|
|
81
95
|
</td>
|
|
@@ -19,22 +19,12 @@ import { BlockVideoEmbedData } from './../BlockVideoEmbed/BlockVideoEmbed.storie
|
|
|
19
19
|
import { BlockNewsletterSignupData } from '../BlockNewsletterSignup/BlockNewsletterSignup.stories'
|
|
20
20
|
import { MixedColumnWidths } from './../BlockRichTable/BlockRichTable.stories'
|
|
21
21
|
import { BlockCsrTableData } from './../BlockCsrTable/BlockCsrTable.stories'
|
|
22
|
-
import BlockStreamfield
|
|
22
|
+
import BlockStreamfield from './BlockStreamfield.vue'
|
|
23
23
|
|
|
24
24
|
export default {
|
|
25
25
|
title: 'Components/Blocks/BlockStreamfield',
|
|
26
26
|
component: BlockStreamfield,
|
|
27
27
|
tags: ['!autodocs'],
|
|
28
|
-
argTypes: {
|
|
29
|
-
variant: {
|
|
30
|
-
control: { type: 'select' },
|
|
31
|
-
options: Object.keys(variants)
|
|
32
|
-
},
|
|
33
|
-
size: {
|
|
34
|
-
control: { type: 'select' },
|
|
35
|
-
options: ['small', 'medium', 'large']
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
28
|
parameters: {
|
|
39
29
|
layout: 'fullscreen'
|
|
40
30
|
},
|